Index: boot/generic/src/printf_core.c
===================================================================
--- boot/generic/src/printf_core.c	(revision 338d54a7c4a77bbe3bf0bdff3c750bad8bb1ea9a)
+++ boot/generic/src/printf_core.c	(revision 850fd32a6ced0b28470d7b2100d44accba1dce89)
@@ -547,5 +547,5 @@
 				default:
 					end = true;
-				};
+				}
 			} while (!end);
 
Index: kernel/generic/src/adt/btree.c
===================================================================
--- kernel/generic/src/adt/btree.c	(revision 338d54a7c4a77bbe3bf0bdff3c750bad8bb1ea9a)
+++ kernel/generic/src/adt/btree.c	(revision 850fd32a6ced0b28470d7b2100d44accba1dce89)
@@ -877,4 +877,5 @@
 {
 	btree_node_t *cur, *next;
+	bool descend;
 
 	/*
@@ -907,4 +908,5 @@
 			 * or it is not in the tree at all.
 			 */
+			descend = false;
 			for (i = 1; i < cur->keys; i++) {
 				if (key < cur->key[i]) {
@@ -915,7 +917,11 @@
 						return key == cur->key[i - 1] ? val : NULL;
 
-					goto descend;
+					descend = true;
+					break;
 				}
 			}
+
+			if (descend)
+				continue;
 
 			/*
@@ -929,6 +935,4 @@
 				return key == cur->key[i - 1] ? val : NULL;
 		}
-descend:
-		;
 	}
 
Index: kernel/generic/src/printf/printf_core.c
===================================================================
--- kernel/generic/src/printf/printf_core.c	(revision 338d54a7c4a77bbe3bf0bdff3c750bad8bb1ea9a)
+++ kernel/generic/src/printf/printf_core.c	(revision 850fd32a6ced0b28470d7b2100d44accba1dce89)
@@ -674,5 +674,5 @@
 				default:
 					end = true;
-				};
+				}
 			} while (!end);
 
Index: uspace/app/bdsh/util.c
===================================================================
--- uspace/app/bdsh/util.c	(revision 338d54a7c4a77bbe3bf0bdff3c750bad8bb1ea9a)
+++ uspace/app/bdsh/util.c	(revision 850fd32a6ced0b28470d7b2100d44accba1dce89)
@@ -45,5 +45,8 @@
 	unsigned int i;
 
-	for (i=0; args[i] != NULL; i++);
+	i = 0;
+	while (args[i] != NULL)
+		i++;
+
 	return i;
 }
Index: uspace/app/edit/edit.c
===================================================================
--- uspace/app/edit/edit.c	(revision 338d54a7c4a77bbe3bf0bdff3c750bad8bb1ea9a)
+++ uspace/app/edit/edit.c	(revision 850fd32a6ced0b28470d7b2100d44accba1dce89)
@@ -655,8 +655,5 @@
 
 			/* Handle key press. */
-			if (((kev->mods & KM_ALT) == 0) &&
-			     (kev->mods & KM_CTRL) != 0) {
-				;
-			} else if ((kev->mods & (KM_CTRL | KM_ALT)) == 0) {
+			if ((kev->mods & (KM_CTRL | KM_ALT)) == 0) {
 				switch (kev->key) {
 				case KC_ESCAPE:
Index: uspace/app/sbi/src/run_expr.c
===================================================================
--- uspace/app/sbi/src/run_expr.c	(revision 338d54a7c4a77bbe3bf0bdff3c750bad8bb1ea9a)
+++ uspace/app/sbi/src/run_expr.c	(revision 850fd32a6ced0b28470d7b2100d44accba1dce89)
@@ -384,5 +384,5 @@
 			 */
 			sobj = proc_ar->obj;
-			aobj = sobj->u.object_v;;
+			aobj = sobj->u.object_v;
 		}
 
Index: uspace/app/sbi/src/run_texpr.c
===================================================================
--- uspace/app/sbi/src/run_texpr.c	(revision 338d54a7c4a77bbe3bf0bdff3c750bad8bb1ea9a)
+++ uspace/app/sbi/src/run_texpr.c	(revision 850fd32a6ced0b28470d7b2100d44accba1dce89)
@@ -99,5 +99,5 @@
 	stree_symbol_t *sym;
 	tdata_item_t *targ_i = NULL;
-	tdata_item_t *titem = NULL;;
+	tdata_item_t *titem = NULL;
 	tdata_object_t *tobject;
 	tdata_deleg_t *tdeleg;
Index: uspace/app/tester/float/float2.c
===================================================================
--- uspace/app/tester/float/float2.c	(revision 338d54a7c4a77bbe3bf0bdff3c750bad8bb1ea9a)
+++ uspace/app/tester/float/float2.c	(revision 850fd32a6ced0b28470d7b2100d44accba1dce89)
@@ -449,5 +449,5 @@
 		}
 	}
-;
+
 	for (unsigned int i = 0; i < OPERANDS; i++) {
 		double res = sinh(arguments_exp[i]);
Index: uspace/app/usbinfo/main.c
===================================================================
--- uspace/app/usbinfo/main.c	(revision 338d54a7c4a77bbe3bf0bdff3c750bad8bb1ea9a)
+++ uspace/app/usbinfo/main.c	(revision 850fd32a6ced0b28470d7b2100d44accba1dce89)
@@ -153,4 +153,5 @@
 	 */
 	int opt;
+	int idx;
 	do {
 		opt = getopt_long(argc, argv,
@@ -168,6 +169,6 @@
 				print_usage(argv[0]);
 				return 0;
-			default: {
-				int idx = 0;
+			default:
+				idx = 0;
 				while (actions[idx].opt != 0) {
 					if (actions[idx].opt == opt) {
@@ -179,5 +180,4 @@
 				}
 				break;
-			}
 		}
 	} while (opt > 0);
Index: uspace/app/wavplay/dplay.c
===================================================================
--- uspace/app/wavplay/dplay.c	(revision 338d54a7c4a77bbe3bf0bdff3c750bad8bb1ea9a)
+++ uspace/app/wavplay/dplay.c	(revision 850fd32a6ced0b28470d7b2100d44accba1dce89)
@@ -176,6 +176,7 @@
 	}
 
-	for (pb->playing = true; pb->playing;
-	    fibril_condvar_wait(&pb->cv, &pb->mutex));
+	pb->playing = true;
+	while (pb->playing)
+		fibril_condvar_wait(&pb->cv, &pb->mutex);
 
 	fibril_mutex_unlock(&pb->mutex);
Index: uspace/app/wavplay/main.c
===================================================================
--- uspace/app/wavplay/main.c	(revision 338d54a7c4a77bbe3bf0bdff3c750bad8bb1ea9a)
+++ uspace/app/wavplay/main.c	(revision 850fd32a6ced0b28470d7b2100d44accba1dce89)
@@ -260,5 +260,5 @@
 			print_help(*argv);
 			return 0;
-		};
+		}
 	}
 
Index: uspace/dist/src/c/demos/edit/edit.c
===================================================================
--- uspace/dist/src/c/demos/edit/edit.c	(revision 338d54a7c4a77bbe3bf0bdff3c750bad8bb1ea9a)
+++ uspace/dist/src/c/demos/edit/edit.c	(revision 850fd32a6ced0b28470d7b2100d44accba1dce89)
@@ -48,4 +48,5 @@
 #include <macros.h>
 #include <clipboard.h>
+#include <types/common.h>
 
 #include "sheet.h"
@@ -131,8 +132,8 @@
 static void pos_handle(pos_event_t *ev);
 
-static int file_save(char const *fname);
+static errno_t file_save(char const *fname);
 static void file_save_as(void);
-static int file_insert(char *fname);
-static int file_save_range(char const *fname, spt_t const *spos,
+static errno_t file_insert(char *fname);
+static errno_t file_save_range(char const *fname, spt_t const *spos,
     spt_t const *epos);
 static char *range_get_str(spt_t const *spos, spt_t const *epos);
@@ -577,5 +578,5 @@
 
 /** Save the document. */
-static int file_save(char const *fname)
+static errno_t file_save(char const *fname)
 {
 	spt_t sp, ep;
@@ -654,8 +655,5 @@
 
 			/* Handle key press. */
-			if (((kev->mods & KM_ALT) == 0) &&
-			     (kev->mods & KM_CTRL) != 0) {
-				;
-			} else if ((kev->mods & (KM_CTRL | KM_ALT)) == 0) {
+			if ((kev->mods & (KM_CTRL | KM_ALT)) == 0) {
 				switch (kev->key) {
 				case KC_ESCAPE:
@@ -696,5 +694,5 @@
  * of the caret.
  */
-static int file_insert(char *fname)
+static errno_t file_insert(char *fname)
 {
 	FILE *f;
@@ -734,5 +732,5 @@
 
 /** Save a range of text into a file. */
-static int file_save_range(char const *fname, spt_t const *spos,
+static errno_t file_save_range(char const *fname, spt_t const *spos,
     spt_t const *epos)
 {
@@ -760,5 +758,5 @@
 	} while (!spt_equal(&bep, epos));
 
-	if (fclose(f) != EOK)
+	if (fclose(f) < 0)
 		return EIO;
 
@@ -954,4 +952,11 @@
 	coord_t coord;
 	int last_row;
+	char *fname;
+	char *p;
+	char *text;
+	size_t n;
+	int pos;
+	size_t nextra;
+	size_t fnw;
 
 	tag_get_pt(&pane.caret_pos, &caret_pt);
@@ -960,12 +965,71 @@
 	sheet_get_num_rows(doc.sh, &last_row);
 
-	const char *fname = (doc.file_name != NULL) ? doc.file_name : "<unnamed>";
+	if (doc.file_name != NULL) {
+		/* Remove directory component */
+		p = str_rchr(doc.file_name, '/');
+		if (p != NULL)
+			fname = str_dup(p + 1);
+		else
+			fname = str_dup(doc.file_name);
+	} else {
+		fname = str_dup("<unnamed>");
+	}
+
+	if (fname == NULL)
+		return;
 
 	console_set_pos(con, 0, scr_rows - 1);
 	console_set_style(con, STYLE_INVERTED);
-	int n = printf(" %d, %d (%d): File '%s'. Ctrl-Q Quit  Ctrl-S Save  "
-	    "Ctrl-E Save As", coord.row, coord.column, last_row, fname);
-
-	int pos = scr_columns - 1 - n;
+
+	/*
+	 * Make sure the status fits on the screen. This loop should
+	 * be executed at most twice.
+	 */
+	while (true) {
+		int rc = asprintf(&text, " %d, %d (%d): File '%s'. Ctrl-Q Quit  Ctrl-S Save  "
+		    "Ctrl-E Save As", coord.row, coord.column, last_row, fname);
+		if (rc < 0) {
+			n = 0;
+			goto finish;
+		}
+
+		/* If it already fits, we're done */
+		n = str_width(text);
+		if (n <= scr_columns - 2)
+			break;
+
+		/* Compute number of excess characters */
+		nextra = n - (scr_columns - 2);
+		/** With of the file name part */
+		fnw = str_width(fname);
+
+		/*
+		 * If reducing file name to two characters '..' won't help,
+		 * just give up and print a blank status.
+		 */
+		if (nextra > fnw - 2)
+			goto finish;
+
+		/* Compute position where we overwrite with '..\0' */
+		if (fnw >= nextra + 2) {
+			p = fname + str_lsize(fname, fnw - nextra - 2);
+		} else {
+			p = fname;
+		}
+
+		/* Shorten the string */
+		p[0] = p[1] = '.';
+		p[2] = '\0';
+
+		/* Need to format the string once more. */
+		free(text);
+	}
+
+	printf("%s", text);
+	free(text);
+	free(fname);
+finish:
+	/* Fill the rest of the line */
+	pos = scr_columns - 1 - n;
 	printf("%*s", pos, "");
 	console_flush(con);
@@ -1216,5 +1280,5 @@
 
 /* Search operations */
-static int search_spt_producer(void *data, wchar_t *ret)
+static errno_t search_spt_producer(void *data, wchar_t *ret)
 {
 	assert(data != NULL);
@@ -1225,5 +1289,5 @@
 }
 
-static int search_spt_reverse_producer(void *data, wchar_t *ret)
+static errno_t search_spt_reverse_producer(void *data, wchar_t *ret)
 {
 	assert(data != NULL);
@@ -1234,5 +1298,5 @@
 }
 
-static int search_spt_mark(void *data, void **mark)
+static errno_t search_spt_mark(void *data, void **mark)
 {
 	assert(data != NULL);
Index: uspace/drv/char/i8042/i8042.c
===================================================================
--- uspace/drv/char/i8042/i8042.c	(revision 338d54a7c4a77bbe3bf0bdff3c750bad8bb1ea9a)
+++ uspace/drv/char/i8042/i8042.c	(revision 850fd32a6ced0b28470d7b2100d44accba1dce89)
@@ -188,5 +188,5 @@
 		rc = ENOMEM;
 		goto error;
-	};
+	}
 
 	dev->kbd = ddf_fun_data_alloc(kbd_fun, sizeof(i8042_port_t));
Index: uspace/drv/fb/amdm37x_dispc/amdm37x_dispc.c
===================================================================
--- uspace/drv/fb/amdm37x_dispc/amdm37x_dispc.c	(revision 338d54a7c4a77bbe3bf0bdff3c750bad8bb1ea9a)
+++ uspace/drv/fb/amdm37x_dispc/amdm37x_dispc.c	(revision 850fd32a6ced0b28470d7b2100d44accba1dce89)
@@ -150,10 +150,10 @@
 
 	return EOK;
-};
+}
 
 errno_t amdm37x_dispc_fini(amdm37x_dispc_t *instance)
 {
 	return EOK;
-};
+}
 
 static errno_t amdm37x_dispc_setup_fb(amdm37x_dispc_regs_t *regs,
Index: uspace/drv/nic/e1k/e1k.c
===================================================================
--- uspace/drv/nic/e1k/e1k.c	(revision 338d54a7c4a77bbe3bf0bdff3c750bad8bb1ea9a)
+++ uspace/drv/nic/e1k/e1k.c	(revision 850fd32a6ced0b28470d7b2100d44accba1dce89)
@@ -511,5 +511,5 @@
 
 	return EOK;
-};
+}
 
 /** Set acceptance of weird frames
Index: uspace/drv/nic/rtl8139/driver.c
===================================================================
--- uspace/drv/nic/rtl8139/driver.c	(revision 338d54a7c4a77bbe3bf0bdff3c750bad8bb1ea9a)
+++ uspace/drv/nic/rtl8139/driver.c	(revision 850fd32a6ced0b28470d7b2100d44accba1dce89)
@@ -231,5 +231,5 @@
 	*mac0_dest = pio_read_32(rtl8139->io_port + MAC0);
 	*mac4_dest = pio_read_16(rtl8139->io_port + MAC0 + 4);
-};
+}
 
 /** Set MAC address to the device
@@ -423,5 +423,5 @@
 err_size:
 	return;
-};
+}
 
 
@@ -612,5 +612,5 @@
 	rtl8139_rx_reset(rtl8139);
 	return frames;
-};
+}
 
 
@@ -833,5 +833,5 @@
 	/* Turn the interrupts on again */
 	rtl8139_hw_int_set(rtl8139);
-};
+}
 
 /** Register interrupt handler for the card in the system
@@ -1039,5 +1039,5 @@
 		ddf_msg(LVL_ERROR, "%s device: unexpected irq count", ddf_dev_get_name(dev));
 		return EINVAL;
-	};
+	}
 	if (hw_resources->io_ranges.count != 1) {
 		ddf_msg(LVL_ERROR, "%s device: unexpected io ranges count", ddf_dev_get_name(dev));
@@ -1331,5 +1331,5 @@
 	rtl8139_dev_cleanup(dev);
 	return rc;
-};
+}
 
 /** Set card MAC address
@@ -1526,5 +1526,5 @@
 
 	return EOK;
-};
+}
 
 /** Set current pause frame configuration
@@ -1562,5 +1562,5 @@
 	}
 	return EOK;
-};
+}
 
 /** Set operation mode of the device
@@ -1937,5 +1937,5 @@
 
 	return EOK;
-};
+}
 
 /** Set acceptance of weird frames
@@ -1967,5 +1967,5 @@
 	fibril_mutex_unlock(&rtl8139->rx_lock);
 	return EOK;
-};
+}
 
 
@@ -2006,5 +2006,5 @@
 	default:
 		return EINVAL;
-	};
+	}
 	if(rtl8139->pm.active++ == 0)
 		rtl8139_hw_pmen_set(rtl8139, 1);
@@ -2042,5 +2042,5 @@
 	default:
 		return;
-	};
+	}
 	rtl8139->pm.active--;
 	if (rtl8139->pm.active == 0)
Index: uspace/drv/nic/rtl8139/general.c
===================================================================
--- uspace/drv/nic/rtl8139/general.c	(revision 338d54a7c4a77bbe3bf0bdff3c750bad8bb1ea9a)
+++ uspace/drv/nic/rtl8139/general.c	(revision 850fd32a6ced0b28470d7b2100d44accba1dce89)
@@ -114,5 +114,5 @@
 	ta->last_run = 1;
 	return EOK;
-};
+}
 
 
@@ -147,4 +147,4 @@
 
 	return expired;
-};
+}
 
Index: uspace/drv/nic/rtl8169/driver.c
===================================================================
--- uspace/drv/nic/rtl8169/driver.c	(revision 338d54a7c4a77bbe3bf0bdff3c750bad8bb1ea9a)
+++ uspace/drv/nic/rtl8169/driver.c	(revision 850fd32a6ced0b28470d7b2100d44accba1dce89)
@@ -208,5 +208,5 @@
 		ddf_msg(LVL_ERROR, "%s device: unexpected irq count", ddf_dev_get_name(dev));
 		return EINVAL;
-	};
+	}
 
 	if (hw_resources->io_ranges.count != 1) {
Index: uspace/lib/c/generic/double_to_str.c
===================================================================
--- uspace/lib/c/generic/double_to_str.c	(revision 338d54a7c4a77bbe3bf0bdff3c750bad8bb1ea9a)
+++ uspace/lib/c/generic/double_to_str.c	(revision 850fd32a6ced0b28470d7b2100d44accba1dce89)
@@ -665,5 +665,5 @@
 			return -1;
 		}
-	};
+	}
 
 	assert(/* 0 <= len && */ len < buf_size);
Index: uspace/lib/c/generic/io/printf_core.c
===================================================================
--- uspace/lib/c/generic/io/printf_core.c	(revision 338d54a7c4a77bbe3bf0bdff3c750bad8bb1ea9a)
+++ uspace/lib/c/generic/io/printf_core.c	(revision 850fd32a6ced0b28470d7b2100d44accba1dce89)
@@ -1388,5 +1388,5 @@
 				default:
 					end = true;
-				};
+				}
 			} while (!end);
 
Index: uspace/lib/c/generic/vfs/canonify.c
===================================================================
--- uspace/lib/c/generic/vfs/canonify.c	(revision 338d54a7c4a77bbe3bf0bdff3c750bad8bb1ea9a)
+++ uspace/lib/c/generic/vfs/canonify.c	(revision 850fd32a6ced0b28470d7b2100d44accba1dce89)
@@ -96,7 +96,8 @@
 		return ret;
 	}
-	unsigned i;
-	for (i = 1; cur->stop[i] && cur->stop[i] != '/'; i++)
-		;
+	unsigned i = 1;
+	while (cur->stop[i] && cur->stop[i] != '/')
+		i++;
+	
 	ret.kind = TK_COMP;
 	ret.start = &cur->stop[1];
Index: uspace/lib/c/generic/vfs/inbox.c
===================================================================
--- uspace/lib/c/generic/vfs/inbox.c	(revision 338d54a7c4a77bbe3bf0bdff3c750bad8bb1ea9a)
+++ uspace/lib/c/generic/vfs/inbox.c	(revision 850fd32a6ced0b28470d7b2100d44accba1dce89)
@@ -79,4 +79,5 @@
 {
 	inbox_entry *next = NULL;
+	int result;
 
 	list_foreach(inb_list, link, inbox_entry, e) {
@@ -85,6 +86,6 @@
 		case -1:
 			continue;
-		case 0:;
-			int result = e->file;
+		case 0:
+			result = e->file;
 			if (file == -1) {
 				free(e->name);
Index: uspace/lib/pcm/src/format.c
===================================================================
--- uspace/lib/pcm/src/format.c	(revision 338d54a7c4a77bbe3bf0bdff3c750bad8bb1ea9a)
+++ uspace/lib/pcm/src/format.c	(revision 850fd32a6ced0b28470d7b2100d44accba1dce89)
@@ -134,5 +134,6 @@
 	case PCM_SAMPLE_SINT24_BE:
 	case PCM_SAMPLE_FLOAT32:
-	default: ;
+	default:
+		break;
 	}
 #undef SET_NULL
Index: uspace/lib/usbdev/src/devdrv.c
===================================================================
--- uspace/lib/usbdev/src/devdrv.c	(revision 338d54a7c4a77bbe3bf0bdff3c750bad8bb1ea9a)
+++ uspace/lib/usbdev/src/devdrv.c	(revision 850fd32a6ced0b28470d7b2100d44accba1dce89)
@@ -115,6 +115,7 @@
 static inline size_t count_pipes(const usb_endpoint_description_t **endpoints)
 {
-	size_t count;
-	for (count = 0; endpoints != NULL && endpoints[count] != NULL; ++count);
+	size_t count = 0;
+	while (endpoints != NULL && endpoints[count] != NULL)
+		++count;
 	return count;
 }
Index: uspace/srv/audio/hound/audio_device.h
===================================================================
--- uspace/srv/audio/hound/audio_device.h	(revision 338d54a7c4a77bbe3bf0bdff3c750bad8bb1ea9a)
+++ uspace/srv/audio/hound/audio_device.h	(revision 850fd32a6ced0b28470d7b2100d44accba1dce89)
@@ -74,5 +74,5 @@
 {
 	return l ? list_get_instance(l, audio_device_t, link) : NULL;
-};
+}
 
 errno_t audio_device_init(audio_device_t *dev, service_id_t id, const char *name);
Index: uspace/srv/hid/compositor/compositor.c
===================================================================
--- uspace/srv/hid/compositor/compositor.c	(revision 338d54a7c4a77bbe3bf0bdff3c750bad8bb1ea9a)
+++ uspace/srv/hid/compositor/compositor.c	(revision 850fd32a6ced0b28470d7b2100d44accba1dce89)
@@ -1930,5 +1930,5 @@
 				break;
 			case KC_B:
-				event->data.resize.width = (width >= 20) ? width - 20 : 0;;
+				event->data.resize.width = (width >= 20) ? width - 20 : 0;
 				event->data.resize.height = height;
 				break;
