mirror of https://github.com/xzeldon/htop.git
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; ^~~~~
This commit is contained in:
parent
cd1ba1422b
commit
6a03cd237a
8
htop.c
8
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++) {
|
||||
|
|
Loading…
Reference in New Issue