Skip to content

Commit

Permalink
fix compilation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
NATHAN76543217 committed Feb 28, 2022
1 parent 06bd999 commit da9813a
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions argparse.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ argparse_getvalue(struct argparse *self, const struct argparse_option *opt,
if (opt->callback) {
return opt->callback(self, opt);
}

return 0;
}

Expand All @@ -131,17 +130,17 @@ argparse_options_check(const struct argparse_option *options)
{
for (; options->type != ARGPARSE_OPT_END; options++) {
switch (options->type) {
case ARGPARSE_OPT_END:
case ARGPARSE_OPT_BOOLEAN:
case ARGPARSE_OPT_BIT:
case ARGPARSE_OPT_INTEGER:
case ARGPARSE_OPT_FLOAT:
case ARGPARSE_OPT_STRING:
case ARGPARSE_OPT_GROUP:
continue;
default:
fprintf(stderr, "wrong option type: %d", options->type);
break;
case ARGPARSE_OPT_END:
case ARGPARSE_OPT_BOOLEAN:
case ARGPARSE_OPT_BIT:
case ARGPARSE_OPT_INTEGER:
case ARGPARSE_OPT_FLOAT:
case ARGPARSE_OPT_STRING:
case ARGPARSE_OPT_GROUP:
continue;
default:
fprintf(stderr, "wrong option type: %d", options->type);
break;
}
}
}
Expand Down Expand Up @@ -383,6 +382,7 @@ argparse_help_cb_no_exit(struct argparse *self,
{
(void)option;
argparse_usage(self);
return (EXIT_SUCCESS);
}

int
Expand Down

0 comments on commit da9813a

Please sign in to comment.