From: Bruno Haible Date: Tue, 16 May 2006 13:12:10 +0000 (+0000) Subject: Fix three gcc warnings. X-Git-Tag: v0.15~131 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=30330f33bc0afca96c1fa31850a6cd117e2f19e1;p=thirdparty%2Fgettext.git Fix three gcc warnings. --- diff --git a/gettext-tools/src/ChangeLog b/gettext-tools/src/ChangeLog index 731e42be4..64ea6d249 100644 --- a/gettext-tools/src/ChangeLog +++ b/gettext-tools/src/ChangeLog @@ -1,3 +1,9 @@ +2006-05-16 Bruno Haible + + * xgettext.c (main): Use a size_t index variable for looping over the + files. + (arglist_parser_done): Fix a format string. + 2006-05-16 Bruno Haible * msgfilter.c (main): Change type of i. diff --git a/gettext-tools/src/xgettext.c b/gettext-tools/src/xgettext.c index 54ebce54f..eef90753b 100644 --- a/gettext-tools/src/xgettext.c +++ b/gettext-tools/src/xgettext.c @@ -264,7 +264,6 @@ static const char *extension_to_language (const char *extension); int main (int argc, char *argv[]) { - int cnt; int optchar; bool do_help = false; bool do_version = false; @@ -280,6 +279,8 @@ main (int argc, char *argv[]) char *output_file = NULL; const char *language = NULL; extractor_ty extractor = { NULL, NULL, NULL, NULL }; + int cnt; + size_t i; /* Set program name for messages. */ set_program_name (argv[0]); @@ -651,12 +652,12 @@ This version was built without iconv()."), } /* Process all input files. */ - for (cnt = 0; cnt < file_list->nitems; ++cnt) + for (i = 0; i < file_list->nitems; i++) { const char *filename; extractor_ty this_file_extractor; - filename = file_list->item[cnt]; + filename = file_list->item[i]; if (extractor.func) this_file_extractor = extractor; @@ -2690,7 +2691,7 @@ arglist_parser_done (struct arglist_parser *ap, int argnum) error_at_line (0, 0, best_cp->msgid_plural_pos.file_name, best_cp->msgid_plural_pos.line_number, - _("%s:%d: context mismatch between singular and plural form")); + _("context mismatch between singular and plural form")); error_with_progname = true; } free (ctxt);