]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Avoid warnings about format string arguments.
authorBruno Haible <bruno@clisp.org>
Wed, 29 Oct 2003 11:52:11 +0000 (11:52 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:11:07 +0000 (12:11 +0200)
gettext-tools/src/ChangeLog
gettext-tools/src/read-stringtable.c
gettext-tools/src/x-sh.c

index 3f08b0605380b3f5485e586abf5556a0a51819bb..bd7da14a4c45162e0f32220043aa10a36e202846 100644 (file)
@@ -1,3 +1,9 @@
+2003-10-23  Bruno Haible  <bruno@clisp.org>
+
+       * read-stringtable.c (read_string, stringtable_parse): Cast
+       gram_pos.line_number to 'unsigned long'.
+       * x-sh.c (read_word): Case line_number to 'unsigned long'.
+
 2003-10-21  Bruno Haible  <bruno@clisp.org>
 
        * message.h (message_list_msgids_changed): New declaration.
index e938a727a517ddfd78d85013d4eea2344c3fcd32..137167d7587955c240784342ef249d212bb446e6 100644 (file)
@@ -801,8 +801,8 @@ read_string (lex_pos_ty *pos)
       if (c == UEOF)
        {
          error_with_progname = false;
-         error (0, 0, _("%s:%d: warning: unterminated string"),
-                real_file_name, gram_pos.line_number);
+         error (0, 0, _("%s:%lu: warning: unterminated string"),
+                real_file_name, (unsigned long) gram_pos.line_number);
          error_with_progname = true;
        }
     }
@@ -812,8 +812,8 @@ read_string (lex_pos_ty *pos)
       if (is_quotable (c))
        {
          error_with_progname = false;
-         error (0, 0, _("%s:%d: warning: syntax error"),
-                real_file_name, gram_pos.line_number);
+         error (0, 0, _("%s:%lu: warning: syntax error"),
+                real_file_name, (unsigned long) gram_pos.line_number);
          error_with_progname = true;
        }
       for (; c != UEOF && !is_quotable (c); c = phase4_getc ())
@@ -875,8 +875,8 @@ stringtable_parse (abstract_po_reader_ty *pop, FILE *file,
       if (c == UEOF)
        {
          error_with_progname = false;
-         error (0, 0, _("%s:%d: warning: unterminated key/value pair"),
-                real_file_name, gram_pos.line_number);
+         error (0, 0, _("%s:%lu: warning: unterminated key/value pair"),
+                real_file_name, (unsigned long) gram_pos.line_number);
          error_with_progname = true;
          break;
        }
@@ -897,8 +897,8 @@ stringtable_parse (abstract_po_reader_ty *pop, FILE *file,
          if (msgstr == NULL)
            {
              error_with_progname = false;
-             error (0, 0, _("%s:%d: warning: unterminated key/value pair"),
-                    real_file_name, gram_pos.line_number);
+             error (0, 0, _("%s:%lu: warning: unterminated key/value pair"),
+                    real_file_name, (unsigned long) gram_pos.line_number);
              error_with_progname = true;
              break;
            }
@@ -944,8 +944,8 @@ stringtable_parse (abstract_po_reader_ty *pop, FILE *file,
            {
              error_with_progname = false;
              error (0, 0, _("\
-%s:%d: warning: syntax error, expected ';' after string"),
-                    real_file_name, gram_pos.line_number);
+%s:%lu: warning: syntax error, expected ';' after string"),
+                    real_file_name, (unsigned long) gram_pos.line_number);
              error_with_progname = true;
              break;
            }
@@ -954,8 +954,8 @@ stringtable_parse (abstract_po_reader_ty *pop, FILE *file,
        {
          error_with_progname = false;
          error (0, 0, _("\
-%s:%d: warning: syntax error, expected '=' or ';' after string"),
-                real_file_name, gram_pos.line_number);
+%s:%lu: warning: syntax error, expected '=' or ';' after string"),
+                real_file_name, (unsigned long) gram_pos.line_number);
          error_with_progname = true;
          break;
        }
index 7e4eda0ac7703263381058fa836fcec99efdfa99..2d8afa743ae805957ae0160cbb2d83853ba23511 100644 (file)
@@ -1007,8 +1007,8 @@ read_word (struct word *wp, int looking_for, flag_context_ty context)
              free_token (&string);
 
              error_with_progname = false;
-             error (0, 0, _("%s:%d: warning: the syntax $\"...\" is deprecated due to security reasons; use eval_gettext instead"),
-                    pos.file_name, pos.line_number);
+             error (0, 0, _("%s:%lu: warning: the syntax $\"...\" is deprecated due to security reasons; use eval_gettext instead"),
+                    pos.file_name, (unsigned long) pos.line_number);
              error_with_progname = true;
 
              /* The result at runtime is not constant. Therefore we