X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=execute.c;h=5264b5009e73c919162d06c6e614e637f17f0337;hp=4e01e9ad69be1c08dbe6cd2c14edde70cf743c62;hb=b8d3418f7bc209427e27d76d3442987b6738cd1b;hpb=70fcff314feff469a8e61dbe5017ed74f5e0a09d diff --git a/execute.c b/execute.c index 4e01e9ad6..5264b5009 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";