summaryrefslogtreecommitdiff
path: root/openbox/client.c
diff options
context:
space:
mode:
authorMikael Magnusson <mikachu@gmail.com>2009-11-05 22:29:38 +0100
committerDana Jansens <danakj@orodu.net>2009-11-07 17:07:05 -0500
commitfa0ae17adbc8f73b707c33836d37841e81b9303a (patch)
treedc6aaf1f7cd386f3d0c0862bd9985486c9b58aca /openbox/client.c
parenta170ad7c85b5f23fafe64d28a3f183a7ce42ce53 (diff)
Make clang happier
Add asserts to default: in switch statements Store pointed to variables locally so it knows they don't change Remove some dead assignments Mark ob_exit_with_error as noreturn Use "%s", msg instead of just msg to printf style functions Use the c_pfocus variable
Diffstat (limited to 'openbox/client.c')
-rw-r--r--openbox/client.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/openbox/client.c b/openbox/client.c
index a62aa5b6..5bf22fb7 100644
--- a/openbox/client.c
+++ b/openbox/client.c
@@ -2378,7 +2378,7 @@ ObClient *client_search_focus_tree_full(ObClient *self)
for (it = self->parents; it; it = g_slist_next(it)) {
ObClient *c = it->data;
- if ((c = client_search_focus_tree_full(it->data))) return c;
+ if ((c = client_search_focus_tree_full(c))) return c;
}
return NULL;
@@ -3639,6 +3639,8 @@ void client_set_state(ObClient *self, Atom action, glong data1, glong data2)
value = self->demands_attention;
else if (state == OBT_PROP_ATOM(OB_WM_STATE_UNDECORATED))
value = undecorated;
+ else
+ g_assert_not_reached();
action = value ? OBT_PROP_ATOM(NET_WM_STATE_REMOVE) :
OBT_PROP_ATOM(NET_WM_STATE_ADD);
}