From 026343b6b13024c56e9273f5012076536965bd27 Mon Sep 17 00:00:00 2001 From: Mathias Gumz Date: Tue, 22 Jul 2014 22:25:47 +0200 Subject: fix uninitialized variables --- src/CurrentWindowCmd.cc | 4 +--- src/WorkspaceCmd.cc | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/CurrentWindowCmd.cc b/src/CurrentWindowCmd.cc index 0d2e12f..9c3526d 100644 --- a/src/CurrentWindowCmd.cc +++ b/src/CurrentWindowCmd.cc @@ -532,15 +532,13 @@ FbTk::Command *ResizeCmd::parse(const string &command, const string &args, return 0; } - int dx, dy; + int dx = 0, dy = 0; bool is_relative_x = false, is_relative_y = false, ignore_x = false, ignore_y = false; if (command == "resizehorizontal") { parseToken(tokens[0], dx, is_relative_x, ignore_x); - dy = 0; } else if (command == "resizevertical") { parseToken(tokens[0], dy, is_relative_y, ignore_y); - dx = 0; } else { if (tokens.size() < 2) { return 0; diff --git a/src/WorkspaceCmd.cc b/src/WorkspaceCmd.cc index ea4d617..2af6b2f 100644 --- a/src/WorkspaceCmd.cc +++ b/src/WorkspaceCmd.cc @@ -55,7 +55,7 @@ FbTk::Command *WindowListCmd::parse(const string &command, const string &a FbTk::Command *cmd = 0; FbTk::Command *filter = 0; std::vector tokens; - int opts; + int opts = 0; string pat; FbTk::StringUtil::stringTokensBetween(tokens, args, pat, '{', '}'); -- cgit v0.11.2