From: Lennart Poettering Date: Tue, 13 Apr 2010 16:37:36 +0000 (+0200) Subject: execute: get rid of gcc warning X-Git-Tag: 0.git+20100605+dfd8ee-1~130 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b8d3418f7bc209427e27d76d3442987b6738cd1b;p=platform%2Fupstream%2Fsystemd.git execute: get rid of gcc warning --- diff --git a/execute.c b/execute.c index 4e01e9a..5264b50 100644 --- a/execute.c +++ b/execute.c @@ -1357,7 +1357,11 @@ int exec_command_set(ExecCommand *c, const char *path, ...) { } const char* exit_status_to_string(ExitStatus status) { - switch (status) { + + /* We cast to int here, so that -Wenum doesn't complain that + * EXIT_SUCCESS/EXIT_FAILURE aren't in the enum */ + + switch ((int) status) { case EXIT_SUCCESS: return "SUCCESS";