From: Bruno Haible Date: Wed, 29 Oct 2003 11:52:11 +0000 (+0000) Subject: Avoid warnings about format string arguments. X-Git-Tag: v0.13~182 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=095fe5ae1974252fb9725bb2d392958a590126fc;p=thirdparty%2Fgettext.git Avoid warnings about format string arguments. --- diff --git a/gettext-tools/src/ChangeLog b/gettext-tools/src/ChangeLog index 3f08b0605..bd7da14a4 100644 --- a/gettext-tools/src/ChangeLog +++ b/gettext-tools/src/ChangeLog @@ -1,3 +1,9 @@ +2003-10-23 Bruno Haible + + * 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 * message.h (message_list_msgids_changed): New declaration. diff --git a/gettext-tools/src/read-stringtable.c b/gettext-tools/src/read-stringtable.c index e938a727a..137167d75 100644 --- a/gettext-tools/src/read-stringtable.c +++ b/gettext-tools/src/read-stringtable.c @@ -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; } diff --git a/gettext-tools/src/x-sh.c b/gettext-tools/src/x-sh.c index 7e4eda0ac..2d8afa743 100644 --- a/gettext-tools/src/x-sh.c +++ b/gettext-tools/src/x-sh.c @@ -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