Skip to content

Commit

Permalink
Avoid MSVC 19 warnings
Browse files Browse the repository at this point in the history
conversion from 'size_t' to 'int', possible loss of data
  • Loading branch information
Falcosc committed Mar 13, 2021
1 parent 9ea0001 commit dfa6574
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions argparse.c
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ argparse_usage(struct argparse *self)
options = self->options;
for (; options->type != ARGPARSE_OPT_END; options++) {
size_t pos = 0;
int pad = 0;
size_t pad = 0;
if (options->type == ARGPARSE_OPT_GROUP) {
fputc('\n', stdout);
fprintf(stdout, "%s", options->help);
Expand Down Expand Up @@ -367,7 +367,7 @@ argparse_usage(struct argparse *self)
fputc('\n', stdout);
pad = usage_opts_width;
}
fprintf(stdout, "%*s%s\n", pad + 2, "", options->help);
fprintf(stdout, "%*s%s\n", (int)pad + 2, "", options->help);
}

// print epilog
Expand Down

0 comments on commit dfa6574

Please sign in to comment.