]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Fix three gcc warnings.
authorBruno Haible <bruno@clisp.org>
Tue, 16 May 2006 13:12:10 +0000 (13:12 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:13:20 +0000 (12:13 +0200)
gettext-tools/src/ChangeLog
gettext-tools/src/xgettext.c

index 731e42be4627408c1f6577801df455f0031061cc..64ea6d249e06cfbc31529caf7f215fda22cda12f 100644 (file)
@@ -1,3 +1,9 @@
+2006-05-16  Bruno Haible  <bruno@clisp.org>
+
+       * 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  <bruno@clisp.org>
 
        * msgfilter.c (main): Change type of i.
index 54ebce54f4953d77e0a0826d5672c382588710d0..eef90753bc78c0bc3a87c8d896543bcd2195a4d9 100644 (file)
@@ -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);