From 2c315b839da3b463a0195c0d8f190242c7153714 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 26 Jun 2013 02:26:01 +0200 Subject: fix -Wall warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/argparser.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/argparser.c b/src/argparser.c index d098f80..7e92605 100644 --- a/src/argparser.c +++ b/src/argparser.c @@ -198,6 +198,7 @@ extern args_Option args_new_argumentless(int standard, int count, ...) if (standard < 0) standard += rc.alternatives_count; rc.standard = *(rc.alternatives + standard); + return rc; } /** @@ -223,6 +224,7 @@ extern args_Option args_new_argumented(char* argument, int standard, int count, if (standard < 0) standard += rc.alternatives_count; rc.standard = *(rc.alternatives + standard); + return rc; } /** @@ -248,6 +250,7 @@ extern args_Option args_new_variadic(char* argument, int standard, int count, .. if (standard < 0) standard += rc.alternatives_count; rc.standard = *(rc.alternatives + standard); + return rc; } @@ -609,7 +612,7 @@ extern void args_add_option(args_Option option, char* help) { long i = 0, n = option.alternatives_count; - for (i; i < n; i++) + for (; i < n; i++) args_optmap_put(*(option.alternatives + i), args_options_count); args_opts_put(option.standard, null); args_opts_put_count(option.standard, 0); @@ -1308,7 +1311,7 @@ extern long args_parse(int argc, char** argv) { long more = args_unrecognised_count - 5; char* option_s = more == 1 ? "option" : "options"; - fprintf(args_out, "%s: warning: %i more unrecognised %s\n", args_program, more, option_s); + fprintf(args_out, "%s: warning: %li more unrecognised %s\n", args_program, more, option_s); } return rc; -- cgit v1.2.3-70-g09d2