Browse Source

fix fallthough warning

I've try to fix a fallthough error with gcc (11 on my machine).
Instead of having a fallthough comment, as gcc would advice,
I've made an early exit, as using -h is generally expected to just print
help and exit.

fix #770

Signed-off-by: Matthias Gatto <matthias.gatto@protonmail.com>
pull/771/head
Matthias Gatto 3 years ago
parent
commit
3e8b16fb7b
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      apps/json_parse.c

+ 1
- 1
apps/json_parse.c View File

@@ -167,7 +167,7 @@ int main(int argc, char **argv)
case 'f': formatted_output = 1; break; case 'f': formatted_output = 1; break;
case 'n': show_output = 0; break; case 'n': show_output = 0; break;
case 's': strict_mode = 1; break; case 's': strict_mode = 1; break;
case 'h': usage(argv[0], 0, NULL);
case 'h': usage(argv[0], 0, NULL); exit(EXIT_SUCCESS);
default: /* '?' */ usage(argv[0], EXIT_FAILURE, "Unknown arguments"); default: /* '?' */ usage(argv[0], EXIT_FAILURE, "Unknown arguments");
} }
} }


Loading…
Cancel
Save