Skip to content

Commit

Permalink
Merge pull request #57 from NATHAN76543217/master
Browse files Browse the repository at this point in the history
fix compilation warning
  • Loading branch information
cofyc-bot committed Mar 1, 2022
2 parents 06bd999 + da9813a commit c612dc0
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions argparse.c
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 c612dc0

Please sign in to comment.