i3 - improved tiling WM


Initialize variables to prevent (false) warnings.

Patch status: merged

Patch by Bas Pape

To apply this patch, use:
curl http://cr.i3wm.org/patch/204/raw.patch | git am

b/src/commands.c

13
@@ -1950,7 +1950,7 @@ void cmd_rename_workspace(I3_CMD, char *old_name, char *new_name) {
14
  *
15
  */
16
 bool cmd_bar_mode(char *bar_mode, char *bar_id) {
17
-    int mode;
18
+    int mode = M_DOCK;
19
     bool toggle = false;
20
     if (strcmp(bar_mode, "dock") == 0)
21
         mode = M_DOCK;
22
@@ -1995,7 +1995,7 @@ bool cmd_bar_mode(char *bar_mode, char *bar_id) {
23
  *
24
  */
25
 bool cmd_bar_hidden_state(char *bar_hidden_state, char *bar_id) {
26
-    int hidden_state;
27
+    int hidden_state = S_SHOW;
28
     bool toggle = false;
29
     if (strcmp(bar_hidden_state, "hide") == 0)
30
         hidden_state = S_HIDE;