summaryrefslogtreecommitdiffstats
path: root/htop.c
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2020-09-23 13:55:01 +0200
committercgzones <cgzones@googlemail.com>2020-09-24 20:14:17 +0200
commit6a03cd237a2e85600275a358430ea544f53aba3e (patch)
treea1df93b77e2451df61fe5df7ad3de5a317ba82a7 /htop.c
parentcd1ba1422b7e3d4b07002192b7961c2d9783acc2 (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; ^~~~~
Diffstat (limited to 'htop.c')
-rw-r--r--htop.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/htop.c b/htop.c
index 7bd15291..fbd6dee4 100644
--- a/htop.c
+++ b/htop.c
@@ -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++) {

© 2014-2024 Faster IT GmbH | imprint | privacy policy