Initialize some stuff to 0 before taking their address
authorMikael Magnusson <mikachu@gmail.com>
Tue, 28 Oct 2014 04:11:17 +0000 (05:11 +0100)
committerMikael Magnusson <mikachu@gmail.com>
Tue, 28 Oct 2014 04:40:21 +0000 (05:40 +0100)
openbox/config.c
openbox/mouse.c

index 1f405e5..dad5d1b 100644 (file)
@@ -923,7 +923,7 @@ static void parse_dock(xmlNodePtr node, gpointer d)
         config_dock_show_delay = obt_xml_node_int(n);
     if ((n = obt_xml_find_node(node, "moveButton"))) {
         gchar *str = obt_xml_node_string(n);
         config_dock_show_delay = obt_xml_node_int(n);
     if ((n = obt_xml_find_node(node, "moveButton"))) {
         gchar *str = obt_xml_node_string(n);
-        guint b, s;
+        guint b = 0, s = 0;
         if (translate_button(str, &s, &b)) {
             config_dock_app_move_button = b;
             config_dock_app_move_modifiers = s;
         if (translate_button(str, &s, &b)) {
             config_dock_app_move_button = b;
             config_dock_app_move_modifiers = s;
index 2f0c8f5..4da22f3 100644 (file)
@@ -372,7 +372,7 @@ gboolean mouse_event(ObClient *client, XEvent *e)
 gboolean mouse_bind(const gchar *buttonstr, ObFrameContext context,
                     ObMouseAction mact, ObActionsAct *action)
 {
 gboolean mouse_bind(const gchar *buttonstr, ObFrameContext context,
                     ObMouseAction mact, ObActionsAct *action)
 {
-    guint state, button;
+    guint state = 0, button = 0;
     ObMouseBinding *b;
     GSList *it;
 
     ObMouseBinding *b;
     GSList *it;