From: Bas Pape Date: Sun, 18 Aug 2013 16:12:19 +0000 (+0200) Subject: Initialize variables to prevent (false) warnings. X-Git-Tag: 4.7~69 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a5ee699d36ba350795e6e55ed3e2451b7f2dd338;p=i3%2Fi3 Initialize variables to prevent (false) warnings. --- diff --git a/src/commands.c b/src/commands.c index cde1cd7c..9686dfe4 100644 --- a/src/commands.c +++ b/src/commands.c @@ -1950,7 +1950,7 @@ void cmd_rename_workspace(I3_CMD, char *old_name, char *new_name) { * */ bool cmd_bar_mode(char *bar_mode, char *bar_id) { - int mode; + int mode = M_DOCK; bool toggle = false; if (strcmp(bar_mode, "dock") == 0) mode = M_DOCK; @@ -1995,7 +1995,7 @@ bool cmd_bar_mode(char *bar_mode, char *bar_id) { * */ bool cmd_bar_hidden_state(char *bar_hidden_state, char *bar_id) { - int hidden_state; + int hidden_state = S_SHOW; bool toggle = false; if (strcmp(bar_hidden_state, "hide") == 0) hidden_state = S_HIDE;