diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2020-09-23 13:55:01 +0200 |
---|---|---|
committer | cgzones <cgzones@googlemail.com> | 2020-09-24 20:14:17 +0200 |
commit | 6a03cd237a2e85600275a358430ea544f53aba3e (patch) | |
tree | a1df93b77e2451df61fe5df7ad3de5a317ba82a7 | |
parent | cd1ba1422b7e3d4b07002192b7961c2d9783acc2 (diff) |
Avoid warning about unreachable break statement
htop.c:112:13: warning: 'break' will never be executed [-Wunreachable-code-break]
break;
^~~~~
htop.c:109:13: warning: 'break' will never be executed [-Wunreachable-code-break]
break;
^~~~~
-rw-r--r-- | htop.c | 8 |
1 files changed, 2 insertions, 6 deletions
@@ -29,13 +29,10 @@ in the source distribution for its full text. //#link m -ATTR_NORETURN static void printVersionFlag(void) { fputs("htop " VERSION "\n", stdout); - exit(0); } -ATTR_NORETURN static void printHelpFlag(void) { fputs("htop " VERSION "\n" "Released under the GNU GPL.\n\n" @@ -54,7 +51,6 @@ static void printHelpFlag(void) { "Press F1 inside htop for online help.\n" "See 'man htop' for more information.\n", stdout); - exit(0); } // ---------------------------------------- @@ -106,10 +102,10 @@ static CommandLineSettings parseArguments(int argc, char** argv) { switch (opt) { case 'h': printHelpFlag(); - break; + exit(0); case 'V': printVersionFlag(); - break; + exit(0); case 's': if (strcmp(optarg, "help") == 0) { for (int j = 1; j < Platform_numberOfFields; j++) { |