Index: uspace/app/bdsh/cmds/builtin_cmds.c
===================================================================
--- uspace/app/bdsh/cmds/builtin_cmds.c	(revision 0b2d3698486f65910a760723ffb0f45e8822cc77)
+++ uspace/app/bdsh/cmds/builtin_cmds.c	(revision 05b5939308a029a5f557f811dd067aa545547cf8)
@@ -79,8 +79,7 @@
 		return (char *)NULL;
 
-	for(i=0; builtin_aliases[i] != NULL; i++) {
+	for(i=0; builtin_aliases[i] != NULL; i+=2) {
 		if (!str_cmp(builtin_aliases[i], command))
-			return (char *)builtin_aliases[++i];
-		i++;
+			return (char *)builtin_aliases[i+1];
 	}
 
Index: uspace/app/bdsh/cmds/mod_cmds.c
===================================================================
--- uspace/app/bdsh/cmds/mod_cmds.c	(revision 0b2d3698486f65910a760723ffb0f45e8822cc77)
+++ uspace/app/bdsh/cmds/mod_cmds.c	(revision 05b5939308a029a5f557f811dd067aa545547cf8)
@@ -96,8 +96,7 @@
 		return (char *)NULL;
 
-	for(i=0; mod_aliases[i] != NULL; i++) {
+	for(i=0; mod_aliases[i] != NULL; i+=2) {
 		if (!str_cmp(mod_aliases[i], command))
-			return (char *)mod_aliases[++i];
-		i++;
+			return (char *)mod_aliases[i+1];
 	}
 
Index: uspace/app/fontviewer/fontviewer.c
===================================================================
--- uspace/app/fontviewer/fontviewer.c	(revision 0b2d3698486f65910a760723ffb0f45e8822cc77)
+++ uspace/app/fontviewer/fontviewer.c	(revision 05b5939308a029a5f557f811dd067aa545547cf8)
@@ -78,5 +78,5 @@
 				points += increment;
 		
-			if ((event->key == KC_DOWN)) {
+			if (event->key == KC_DOWN) {
 				if (points <= increment) {
 					points = 1;
Index: uspace/app/sbi/src/builtin/bi_task.c
===================================================================
--- uspace/app/sbi/src/builtin/bi_task.c	(revision 0b2d3698486f65910a760723ffb0f45e8822cc77)
+++ uspace/app/sbi/src/builtin/bi_task.c	(revision 05b5939308a029a5f557f811dd067aa545547cf8)
@@ -114,5 +114,5 @@
 	}
 
-	cmd[dim] = '\0';
+	cmd[dim] = NULL;
 
 	if (os_exec((char * const *)cmd) != EOK) {
Index: uspace/app/sbi/src/run_expr.c
===================================================================
--- uspace/app/sbi/src/run_expr.c	(revision 0b2d3698486f65910a760723ffb0f45e8822cc77)
+++ uspace/app/sbi/src/run_expr.c	(revision 05b5939308a029a5f557f811dd067aa545547cf8)
@@ -2886,5 +2886,5 @@
 				/* Is it static/nonstatic? */
 				var_sn = stree_symbol_has_attr(
-				    var_to_symbol(var), sac_static);
+				    var_to_symbol(var), sac_static) ? sn_static : sn_nonstatic;
 				if (var_sn == sn) {
 					/* Compute field type. XXX Memoize. */
Index: uspace/drv/audio/sb16/dsp.c
===================================================================
--- uspace/drv/audio/sb16/dsp.c	(revision 0b2d3698486f65910a760723ffb0f45e8822cc77)
+++ uspace/drv/audio/sb16/dsp.c	(revision 05b5939308a029a5f557f811dd067aa545547cf8)
@@ -75,5 +75,5 @@
 		[DSP_NO_BUFFER] = "NO BUFFER",
 	};
-	if (state < ARRAY_SIZE(state_names))
+	if ((size_t)state < ARRAY_SIZE(state_names))
 		return state_names[state];
 	return "UNKNOWN";
@@ -144,7 +144,9 @@
 {
 	dsp_write(dsp, SET_SAMPLING_RATE_OUTPUT);
-	dsp_write(dsp, rate >> 8);
-	dsp_write(dsp, rate & 0xff);
-	ddf_log_verbose("Sampling rate: %hhx:%hhx.", rate >> 8, rate & 0xff);
+	uint8_t rate_lo = rate & 0xff;
+	uint8_t rate_hi = rate >> 8;
+	dsp_write(dsp, rate_hi);
+	dsp_write(dsp, rate_lo);
+	ddf_log_verbose("Sampling rate: %hhx:%hhx.", rate_hi, rate_lo);
 }
 
@@ -202,9 +204,4 @@
 	
 	return ret;
-}
-
-static inline size_t sample_count(pcm_sample_format_t format, size_t byte_count)
-{
-	return byte_count / pcm_sample_format_size(format);
 }
 
Index: uspace/drv/bus/isa/i8237.c
===================================================================
--- uspace/drv/bus/isa/i8237.c	(revision 0b2d3698486f65910a760723ffb0f45e8822cc77)
+++ uspace/drv/bus/isa/i8237.c	(revision 05b5939308a029a5f557f811dd067aa545547cf8)
@@ -371,5 +371,5 @@
 	
 	/* 16 bit transfers are a bit special */
-	ddf_msg(LVL_DEBUG, "Unspoiled address %#" PRIx32 " (size %" PRIu16 ")",
+	ddf_msg(LVL_DEBUG, "Unspoiled address %#" PRIx32 " (size %" PRIu32 ")",
 	    pa, size);
 	if (is_dma16(channel)) {
@@ -388,5 +388,5 @@
 	
 	ddf_msg(LVL_DEBUG, "Setting channel %u to address %#" PRIx32 " "
-	    "(size %" PRIu16 "), mode %hhx.", channel, pa, size, mode);
+	    "(size %" PRIu32 "), mode %hhx.", channel, pa, size, mode);
 	
 	/* Mask DMA request */
Index: uspace/drv/bus/usb/ohci/ohci_rh.c
===================================================================
--- uspace/drv/bus/usb/ohci/ohci_rh.c	(revision 0b2d3698486f65910a760723ffb0f45e8822cc77)
+++ uspace/drv/bus/usb/ohci/ohci_rh.c	(revision 05b5939308a029a5f557f811dd067aa545547cf8)
@@ -367,5 +367,5 @@
 	case USB_HUB_FEATURE_C_PORT_RESET:        /*20*/
 		usb_log_debug2("Clearing port C_CONNECTION, C_ENABLE, "
-		    "C_SUSPEND, C_OC or C_RESET on port %"PRIu16".\n", port);
+		    "C_SUSPEND, C_OC or C_RESET on port %u.\n", port);
 		/* Bit offsets correspond to the feature number */
 		OHCI_WR(hub->registers->rh_port_status[port],
@@ -416,5 +416,5 @@
 	case USB_HUB_FEATURE_PORT_RESET:   /*4*/
 		usb_log_debug2("Setting port POWER, ENABLE, SUSPEND or RESET "
-		    "on port %"PRIu16".\n", port);
+		    "on port %u.\n", port);
 		/* Bit offsets correspond to the feature number */
 		OHCI_WR(hub->registers->rh_port_status[port], 1 << feature);
Index: uspace/drv/fb/amdm37x_dispc/amdm37x_dispc.c
===================================================================
--- uspace/drv/fb/amdm37x_dispc/amdm37x_dispc.c	(revision 0b2d3698486f65910a760723ffb0f45e8822cc77)
+++ uspace/drv/fb/amdm37x_dispc/amdm37x_dispc.c	(revision 05b5939308a029a5f557f811dd067aa545547cf8)
@@ -267,5 +267,5 @@
 	amdm37x_dispc_t *dispc = vis->dev_ctx;
 	const visual_t visual = mode.cell_visual.pixel_visual;
-	assert(visual < sizeof(pixel2visual_table) / sizeof(pixel2visual_table[0]));
+	assert((size_t)visual < sizeof(pixel2visual_table) / sizeof(pixel2visual_table[0]));
 	const unsigned bpp = pixel2visual_table[visual].bpp;
 	pixel2visual_t p2v = pixel2visual_table[visual].func;
Index: uspace/lib/c/generic/cap.c
===================================================================
--- uspace/lib/c/generic/cap.c	(revision 0b2d3698486f65910a760723ffb0f45e8822cc77)
+++ uspace/lib/c/generic/cap.c	(revision 05b5939308a029a5f557f811dd067aa545547cf8)
@@ -185,6 +185,5 @@
 	sunit = NULL;
 
-	if (cap->cunit < 0 || cap->cunit >= CU_LIMIT)
-		assert(false);
+	assert(cap->cunit < CU_LIMIT);
 
 	rc = ipow10_u64(cap->dp, &div);
Index: uspace/lib/hound/src/client.c
===================================================================
--- uspace/lib/hound/src/client.c	(revision 0b2d3698486f65910a760723ffb0f45e8822cc77)
+++ uspace/lib/hound/src/client.c	(revision 05b5939308a029a5f557f811dd067aa545547cf8)
@@ -48,5 +48,5 @@
 
 /** Stream structure */
-typedef struct hound_stream {
+struct hound_stream {
 	/** link in context's list */
 	link_t link;
@@ -59,5 +59,5 @@
 	/** Stream flags */
 	int flags;
-} hound_stream_t;
+};
 
 /**
@@ -72,5 +72,5 @@
 
 /** Hound client context structure */
-typedef struct hound_context {
+struct hound_context {
 	/** Audio session */
 	hound_sess_t *session;
@@ -89,5 +89,5 @@
 	/** Assigned context id */
 	hound_context_id_t id;
-} hound_context_t;
+};
 
 /**
Index: uspace/lib/nettl/src/amap.c
===================================================================
--- uspace/lib/nettl/src/amap.c	(revision 0b2d3698486f65910a760723ffb0f45e8822cc77)
+++ uspace/lib/nettl/src/amap.c	(revision 05b5939308a029a5f557f811dd067aa545547cf8)
@@ -58,4 +58,10 @@
 #include <stdint.h>
 #include <stdlib.h>
+
+static portrng_flags_t aflags_to_pflags(amap_flags_t flags)
+{
+	// FIXME: either use a single type, or provide a proper conversion
+	return (portrng_flags_t) flags;
+}
 
 /** Create association map.
@@ -378,5 +384,5 @@
 	mepp = *epp;
 
-	rc = portrng_alloc(repla->portrng, epp->local.port, arg, flags,
+	rc = portrng_alloc(repla->portrng, epp->local.port, arg, aflags_to_pflags(flags),
 	    &mepp.local.port);
 	if (rc != EOK) {
@@ -422,5 +428,5 @@
 	mepp = *epp;
 
-	rc = portrng_alloc(laddr->portrng, epp->local.port, arg, flags,
+	rc = portrng_alloc(laddr->portrng, epp->local.port, arg, aflags_to_pflags(flags),
 	    &mepp.local.port);
 	if (rc != EOK) {
@@ -466,5 +472,5 @@
 	mepp = *epp;
 
-	rc = portrng_alloc(llink->portrng, epp->local.port, arg, flags,
+	rc = portrng_alloc(llink->portrng, epp->local.port, arg, aflags_to_pflags(flags),
 	    &mepp.local.port);
 	if (rc != EOK) {
@@ -498,5 +504,5 @@
 	mepp = *epp;
 
-	rc = portrng_alloc(map->unspec, epp->local.port, arg, flags,
+	rc = portrng_alloc(map->unspec, epp->local.port, arg, aflags_to_pflags(flags),
 	    &mepp.local.port);
 	if (rc != EOK) {
Index: uspace/lib/usb/src/usb.c
===================================================================
--- uspace/lib/usb/src/usb.c	(revision 0b2d3698486f65910a760723ffb0f45e8822cc77)
+++ uspace/lib/usb/src/usb.c	(revision 05b5939308a029a5f557f811dd067aa545547cf8)
@@ -73,5 +73,5 @@
 const char *usb_str_transfer_type(usb_transfer_type_t t)
 {
-	if (t >= ARRAY_SIZE(str_transfer_type)) {
+	if ((size_t)t >= ARRAY_SIZE(str_transfer_type)) {
 		return "invalid";
 	}
@@ -86,5 +86,5 @@
 const char *usb_str_transfer_type_short(usb_transfer_type_t t)
 {
-	if (t >= ARRAY_SIZE(str_transfer_type_short)) {
+	if ((size_t)t >= ARRAY_SIZE(str_transfer_type_short)) {
 		return "invl";
 	}
Index: uspace/lib/usbdev/src/devdrv.c
===================================================================
--- uspace/lib/usbdev/src/devdrv.c	(revision 0b2d3698486f65910a760723ffb0f45e8822cc77)
+++ uspace/lib/usbdev/src/devdrv.c	(revision 05b5939308a029a5f557f811dd067aa545547cf8)
@@ -53,5 +53,5 @@
 
 /** USB device structure. */
-typedef struct usb_device {
+struct usb_device {
 	/** Connection to device on USB bus */
 	usb_dev_session_t *bus_session;
@@ -95,5 +95,5 @@
 	 */
 	void *driver_data;
-} usb_device_t;
+};
 
 /** Count number of pipes the driver expects.
