Index: uspace/app/tmon/burst_tests.c
===================================================================
--- uspace/app/tmon/burst_tests.c	(revision 77733a90cca3bfa17bd1a6b5986266f47fe07061)
+++ uspace/app/tmon/burst_tests.c	(revision 80f7c542f46cabfa62d4645700e924a848e61074)
@@ -128,10 +128,10 @@
 /** Static array of units with decreasing factors. */
 static const tmon_unit_t units[] = {
-	{ .prefix = 'E', .factor = 1ul << 60 },
-	{ .prefix = 'P', .factor = 1ul << 50 },
-	{ .prefix = 'T', .factor = 1ul << 40 },
-	{ .prefix = 'G', .factor = 1ul << 30 },
-	{ .prefix = 'M', .factor = 1ul << 20 },
-	{ .prefix = 'k', .factor = 1ul << 10 }
+	{ .prefix = 'E', .factor = ((uint64_t) 1) << 60 },
+	{ .prefix = 'P', .factor = ((uint64_t) 1) << 50 },
+	{ .prefix = 'T', .factor = ((uint64_t) 1) << 40 },
+	{ .prefix = 'G', .factor = ((uint64_t) 1) << 30 },
+	{ .prefix = 'M', .factor = ((uint64_t) 1) << 20 },
+	{ .prefix = 'k', .factor = ((uint64_t) 1) << 10 }
 };
 
Index: uspace/app/tmon/list.c
===================================================================
--- uspace/app/tmon/list.c	(revision 77733a90cca3bfa17bd1a6b5986266f47fe07061)
+++ uspace/app/tmon/list.c	(revision 80f7c542f46cabfa62d4645700e924a848e61074)
@@ -53,5 +53,5 @@
 
 	if ((rc = devman_fun_sid_to_handle(svc, &diag_handle))) {
-		printf(NAME ": Error resolving handle of device with SID %ld, skipping.\n", svc);
+		printf(NAME ": Error resolving handle of device with SID %" PRIun ", skipping.\n", svc);
 		return;
 	}
@@ -59,5 +59,5 @@
 	char path[MAX_PATH_LENGTH];
 	if ((rc = devman_fun_get_path(diag_handle, path, sizeof(path)))) {
-		printf(NAME ": Error resolving path of device with SID %ld, skipping.\n", svc);
+		printf(NAME ": Error resolving path of device with SID %" PRIun ", skipping.\n", svc);
 		return;
 	}
Index: uspace/app/tmon/resolve.c
===================================================================
--- uspace/app/tmon/resolve.c	(revision 77733a90cca3bfa17bd1a6b5986266f47fe07061)
+++ uspace/app/tmon/resolve.c	(revision 80f7c542f46cabfa62d4645700e924a848e61074)
@@ -69,5 +69,5 @@
 	if (count != 1) {
 		if (count) {
-			printf(NAME ": Found %ld devices. Please specify which to use.\n", count);
+			printf(NAME ": Found %zu devices. Please specify which to use.\n", count);
 		} else {
 			printf(NAME ": No diagnostic devices found.\n");
@@ -77,5 +77,6 @@
 
 	if ((rc = devman_fun_sid_to_handle(svcs[0], fun))) {
-		printf(NAME ": Error resolving handle of device with SID %ld.\n", svcs[0]);
+		printf(NAME ": Error resolving handle of device with "
+		    "SID %" PRIun ".\n", svcs[0]);
 		return rc;
 	}
Index: uspace/app/tmon/tf.c
===================================================================
--- uspace/app/tmon/tf.c	(revision 77733a90cca3bfa17bd1a6b5986266f47fe07061)
+++ uspace/app/tmon/tf.c	(revision 80f7c542f46cabfa62d4645700e924a848e61074)
@@ -69,5 +69,6 @@
 	char path[MAX_PATH_LENGTH];
 	if ((rc = devman_fun_get_path(fun, path, sizeof(path)))) {
-		printf(NAME ": Error resolving path of device with handle %ld. %s\n", fun, str_error(rc));
+		printf(NAME ": Error resolving path of device with handle "
+		    "%" PRIun ". %s\n", fun, str_error(rc));
 		return 1;
 	}
Index: uspace/drv/bus/usb/usbdiag/tests.c
===================================================================
--- uspace/drv/bus/usb/usbdiag/tests.c	(revision 77733a90cca3bfa17bd1a6b5986266f47fe07061)
+++ uspace/drv/bus/usb/usbdiag/tests.c	(revision 80f7c542f46cabfa62d4645700e924a848e61074)
@@ -187,5 +187,7 @@
 		for (size_t i = 0; i < size; i += sizeof(test_data)) {
 			if (*(uint32_t *)(buffer + i) != test_data) {
-				usb_log_error("Read of %s IN endpoint returned invald data at address %lu.", usb_str_transfer_type(pipe->desc.transfer_type), i);
+				usb_log_error("Read of %s IN endpoint returned "
+				    "invald data at address %zu.",
+				    usb_str_transfer_type(pipe->desc.transfer_type), i);
 				rc = EINVAL;
 				break;
Index: uspace/drv/bus/usb/xhci/isoch.c
===================================================================
--- uspace/drv/bus/usb/xhci/isoch.c	(revision 77733a90cca3bfa17bd1a6b5986266f47fe07061)
+++ uspace/drv/bus/usb/xhci/isoch.c	(revision 80f7c542f46cabfa62d4645700e924a848e61074)
@@ -319,5 +319,5 @@
 		case WINDOW_TOO_SOON: {
 			const suseconds_t delay = wd.offset * 125;
-			usb_log_debug("[isoch] delaying feeding buffer %lu for %ldus",
+			usb_log_debug("[isoch] delaying feeding buffer %zu for %ldus",
 				it - isoch->transfers, delay);
 			fibril_timer_set_locked(isoch->feeding_timer, delay,
@@ -327,5 +327,5 @@
 
 		case WINDOW_INSIDE:
-			usb_log_debug("[isoch] feeding buffer %lu at 0x%llx",
+			usb_log_debug("[isoch] feeding buffer %zu at 0x%llx",
 			    it - isoch->transfers, it->mfindex);
 			it->error = schedule_isochronous_trb(ep, it);
@@ -345,5 +345,5 @@
 			 * skipped.
 			 */
-			usb_log_debug("[isoch] missed feeding buffer %lu at 0x%llx by "
+			usb_log_debug("[isoch] missed feeding buffer %zu at 0x%llx by "
 				"%llu uframes", it - isoch->transfers, it->mfindex, wd.offset);
 			it->state = ISOCH_COMPLETE;
@@ -411,5 +411,5 @@
 			/* Not allowed to feed yet. Defer to later. */
 			const suseconds_t delay = wd.offset * 125;
-			usb_log_debug("[isoch] delaying feeding buffer %lu for %ldus",
+			usb_log_debug("[isoch] delaying feeding buffer %zu for %ldus",
 			    it - isoch->transfers, delay);
 			fibril_timer_set_locked(isoch->feeding_timer, delay,
@@ -419,5 +419,5 @@
 
 		case WINDOW_TOO_LATE:
-			usb_log_debug("[isoch] missed feeding buffer %lu at 0x%llx by"
+			usb_log_debug("[isoch] missed feeding buffer %zu at 0x%llx by"
 				"%llu uframes", it - isoch->transfers, it->mfindex, wd.offset);
 			/* Missed the opportunity to schedule. Schedule ASAP. */
@@ -432,5 +432,5 @@
 			isoch->last_mf = it->mfindex;
 
-			usb_log_debug("[isoch] feeding buffer %lu at 0x%llx",
+			usb_log_debug("[isoch] feeding buffer %zu at 0x%llx",
 			    it - isoch->transfers, it->mfindex);
 
