From eec41d1276fa1ecb493035dcbc0068452b51f377 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Sun, 8 Apr 2012 20:45:49 +0200 Subject: [PATCH] Fix warning: properly initialize 'workspace' variable --- src/commands.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); -- 2.39.5