diff options
| author | Mikael Magnusson <mikachu@gmail.com> | 2009-11-05 22:29:38 +0100 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2009-11-07 17:07:05 -0500 |
| commit | fa0ae17adbc8f73b707c33836d37841e81b9303a (patch) | |
| tree | dc6aaf1f7cd386f3d0c0862bd9985486c9b58aca /openbox/actions | |
| parent | a170ad7c85b5f23fafe64d28a3f183a7ce42ce53 (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/actions')
| -rw-r--r-- | openbox/actions/desktop.c | 2 | ||||
| -rw-r--r-- | openbox/actions/moverelative.c | 14 | ||||
| -rw-r--r-- | openbox/actions/session.c | 2 |
3 files changed, 10 insertions, 8 deletions
diff --git a/openbox/actions/desktop.c b/openbox/actions/desktop.c index 50caa22f..3b33afbd 100644 --- a/openbox/actions/desktop.c +++ b/openbox/actions/desktop.c @@ -179,6 +179,8 @@ static gboolean run_func(ObActionsData *data, gpointer options) d = screen_find_desktop(screen_desktop, o->u.rel.dir, o->u.rel.wrap, o->u.rel.linear); break; + default: + g_assert_not_reached(); } if (d < screen_num_desktops && d != screen_desktop) { diff --git a/openbox/actions/moverelative.c b/openbox/actions/moverelative.c index ccdff545..4e6e5998 100644 --- a/openbox/actions/moverelative.c +++ b/openbox/actions/moverelative.c @@ -42,15 +42,15 @@ static gboolean run_func(ObActionsData *data, gpointer options) gint x, y, lw, lh, w, h; c = data->client; - x = data->client->area.x + o->x; - y = data->client->area.y + o->y; - w = data->client->area.width; - h = data->client->area.height; - client_try_configure(data->client, &x, &y, &w, &h, &lw, &lh, TRUE); - client_find_onscreen(data->client, &x, &y, w, h, FALSE); + x = c->area.x + o->x; + y = c->area.y + o->y; + w = c->area.width; + h = c->area.height; + client_try_configure(c, &x, &y, &w, &h, &lw, &lh, TRUE); + client_find_onscreen(c, &x, &y, w, h, FALSE); actions_client_move(data, TRUE); - client_configure(data->client, x, y, w, h, TRUE, TRUE, FALSE); + client_configure(c, x, y, w, h, TRUE, TRUE, FALSE); actions_client_move(data, FALSE); } diff --git a/openbox/actions/session.c b/openbox/actions/session.c index 58652adb..b9e33b74 100644 --- a/openbox/actions/session.c +++ b/openbox/actions/session.c @@ -33,9 +33,9 @@ static gpointer setup_func(xmlNodePtr node) static gboolean prompt_cb(ObPrompt *p, gint result, gpointer data) { - Options *o = data; if (result) { #ifdef USE_SM + Options *o = data; session_request_logout(o->silent); #else /* TRANSLATORS: Don't translate the word "SessionLogout" as it's the |
