<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">https://bugs.launchpad.net/musca/+bug/1236500


--- a/musca.c
+++ b/musca.c
@@ -421,7 +421,7 @@
 	if (s-&gt;depth)
 	{
 		int *indexes = allocate(sizeof(int) * s-&gt;depth);
-		int count = 0, i; Window *w;
+		int count = 0, i; Window *w = NULL;
 		FOR_STACK (w, s, Window*, i)
 		{
 			note("%d", i);
@@ -1673,7 +1673,6 @@
 	frame *f = t-&gt;frames;
 	frame **group = NULL;
 	int i = 0, x, y, w, h;
-	ubyte changes = 0;
 	if (direction == HORIZONTAL)
 	{
 		if (f-&gt;x + f-&gt;w &gt;= t-&gt;head-&gt;screen-&gt;width - t-&gt;r)
@@ -1684,7 +1683,6 @@
 				group = frame_siblings(f, LEFT);
 				if (frame_siblings_growable(group, LEFT, size))
 				{
-					changes = 1;
 					x = f-&gt;x - size; w = size; y = f-&gt;y; h = 0;
 					for (i = 0; group[i]; i++)
 						y = MIN(y, group[i]-&gt;y), h += group[i]-&gt;h;
@@ -1702,7 +1700,6 @@
 			group = frame_siblings(f, RIGHT);
 			if (frame_siblings_growable(group, RIGHT, size))
 			{
-				changes = 1;
 				x = f-&gt;x + f-&gt;w; w = size; y = f-&gt;y; h = 0;
 				for (i = 0; group[i]; i++)
 					y = MIN(y, group[i]-&gt;y), h += group[i]-&gt;h;
@@ -1725,7 +1722,6 @@
 				group = frame_siblings(f, TOP);
 				if (frame_siblings_growable(group, TOP, size))
 				{
-					changes = 1;
 					y = f-&gt;y - size; h = size; x = f-&gt;x; w = 0;
 					for (i = 0; group[i]; i++)
 						x = MIN(x, group[i]-&gt;x), w += group[i]-&gt;w;
@@ -1743,7 +1739,6 @@
 			group = frame_siblings(f, BOTTOM);
 			if (frame_siblings_growable(group, BOTTOM, size))
 			{
-				changes = 1;
 				y = f-&gt;y + f-&gt;h; h = size; x = f-&gt;x; w = 0;
 				for (i = 0; group[i]; i++)
 					x = MIN(x, group[i]-&gt;x), w += group[i]-&gt;w;
@@ -2205,11 +2200,9 @@
 char* com_frame_split(char *cmd, regmatch_t *subs)
 {
 	group *g = heads-&gt;groups; frame *f = g-&gt;frames;
-	int sw = heads-&gt;screen-&gt;width  - g-&gt;l - g-&gt;r,
-	    sh = heads-&gt;screen-&gt;height - g-&gt;t - g-&gt;b;
 	char *mode = regsubstr(cmd, subs, 1);
-	ucell fs = f-&gt;h, ss = sh; ubyte dir = VERTICAL;
-	if (*mode == 'h') { fs = f-&gt;w; ss = sw; dir = HORIZONTAL; }
+	ucell fs = f-&gt;h; ubyte dir = VERTICAL;
+	if (*mode == 'h') { fs = f-&gt;w; dir = HORIZONTAL; }
 	dcell size = parse_size(cmd, subs, 2, fs);
 	frame_split(dir, size / fs);
 	free(mode);
@@ -2630,7 +2623,7 @@
 }
 char* com_command(char *cmd, regmatch_t *subs)
 {
-	int i; alias *a; autostr s; str_create(&amp;s);
+	int i; alias *a = NULL; autostr s; str_create(&amp;s);
 	str_print(&amp;s, strlen(command_hints)+NOTE, "%s \n", command_hints);
 	FOR_STACK (a, aliases, alias*, i) str_print(&amp;s, NOTE, "%s \n", a-&gt;name);
 	menu_wrapper(s.pad, settings[ms_run_musca_command].s);
@@ -2747,7 +2740,7 @@
 char* show_aliases()
 {
 	autostr s; str_create(&amp;s);
-	alias *a; int i;
+	alias *a = NULL; int i;
 	FOR_STACK (a, aliases, alias*, i)
 		str_print(&amp;s, strlen(a-&gt;name)+strlen(a-&gt;command)+10, "alias %s %s\n",
 			a-&gt;name, a-&gt;command);
@@ -2849,7 +2842,7 @@
 }
 char* com_place(char *cmd, regmatch_t *subs)
 {
-	placement *p; int i;
+	placement *p = NULL; int i;
 	char *class = regsubstr(cmd, subs, 1);
 	ubyte flag = parse_flag(cmd, subs, 2, 0);
 	char *group = regsubstr(cmd, subs, 3);
@@ -3441,7 +3434,7 @@
 		autostr s; str_create(&amp;s);
 		for (;;)
 		{
-			char c = getchar();
+			int c = getchar();
 			if (c == EOF) break;
 			str_push(&amp;s, c);
 		}
@@ -3530,7 +3523,7 @@
 }
 void grab_stuff()
 {
-	int i, j, k; head *h; binding *b; ucell *m;
+	int i, j, k; head *h; binding *b; ucell *m = NULL;
 	refresh_bindings();
 	ungrab_stuff();
 	ucell modifiers[] = { 0, LockMask, NumlockMask, LockMask|NumlockMask };
@@ -3550,7 +3543,7 @@
 {
 	int i;
 	command_hash = hash_create();
-	command *c; autostr str; str_create(&amp;str);
+	command *c = NULL; autostr str; str_create(&amp;str);
 	FOR_ARRAY (c, commands, command, i)
 	{
 		char *keys = c-&gt;keys;
@@ -3566,7 +3559,7 @@
 	strtrim(command_hints);
 	// compile setting regex
 	setting_hash = hash_create();
-	setting *s;
+	setting *s = NULL;
 	FOR_ARRAY (s, settings, setting, i)
 		hash_set(setting_hash, s-&gt;name, s);
 	// compile modmask regex
@@ -3597,7 +3590,7 @@
 }
 void setup_bindings()
 {
-	int i; keymap *k;
+	int i; keymap *k = NULL;
 	// prepare key bindings
 	bindings = stack_create();
 	FOR_ARRAY (k, keymaps, keymap, i)
--- a/tools.c
+++ b/tools.c
@@ -227,7 +227,7 @@
 	ucell ptr = 0;
 	for (;;)
 	{
-		byte c = fgetc(src);
+		int c = fgetc(src);
 		if (c == EOF)
 			break;
 
</pre></body></html>