From: Michael Stapelberg Date: Sun, 8 Apr 2012 18:45:49 +0000 (+0200) Subject: Fix warning: properly initialize 'workspace' variable X-Git-Tag: 4.2~25 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=eec41d1276fa1ecb493035dcbc0068452b51f377;p=i3%2Fi3 Fix warning: properly initialize 'workspace' variable --- diff --git a/src/commands.c b/src/commands.c index e8fb7f90..1dd53cdc 100644 --- a/src/commands.c +++ b/src/commands.c @@ -407,7 +407,7 @@ void cmd_move_con_to_workspace_number(I3_CMD, char *which) { LOG("should move window to workspace with number %d\n", which); /* get the workspace */ - Con *output, *workspace; + Con *output, *workspace = NULL; char *endptr = NULL; long parsed_num = strtol(which, &endptr, 10); @@ -733,7 +733,7 @@ void cmd_workspace(I3_CMD, char *which) { * */ void cmd_workspace_number(I3_CMD, char *which) { - Con *output, *workspace; + Con *output, *workspace = NULL; char *endptr = NULL; long parsed_num = strtol(which, &endptr, 10);