+2001-10-21 Bruno Haible <haible@clisp.cons.org>
+
+ Avoid warnings on platforms where size_t is larger than int.
+ * msgfmt.c (check_pair): Use an 'unsigned int' variable instead of
+ 'size_t', to avoid warnings.
+ * po-lex.h (po_gram_error): Cast line number to 'unsigned long'.
+ * po-lex.c (po_gram_error): Likewise.
+ * x-c.c (extract_c): Likewise.
+
2001-10-21 Bruno Haible <haible@clisp.cons.org>
* msgexec.c [BeOS]: Fix #ifdef conditional.
{
int has_newline;
size_t i;
+ unsigned int j;
const char *p;
/* If the msgid string is empty we have the special entry reserved for
error_with_progname = true;
exit_status = EXIT_FAILURE;
}
- for (p = msgstr, i = 0; p < msgstr + msgstr_len; p += strlen (p) + 1, i++)
+ for (p = msgstr, j = 0; p < msgstr + msgstr_len; p += strlen (p) + 1, j++)
if (TEST_NEWLINE(p) != has_newline)
{
error_with_progname = false;
error_at_line (0, 0, msgid_pos->file_name, msgid_pos->line_number,
_("\
-`msgid' and `msgstr[%u]' entries do not both begin with '\\n'"), i);
+`msgid' and `msgstr[%u]' entries do not both begin with '\\n'"), j);
error_with_progname = true;
exit_status = EXIT_FAILURE;
}
error_with_progname = true;
exit_status = EXIT_FAILURE;
}
- for (p = msgstr, i = 0; p < msgstr + msgstr_len; p += strlen (p) + 1, i++)
+ for (p = msgstr, j = 0; p < msgstr + msgstr_len; p += strlen (p) + 1, j++)
if (TEST_NEWLINE(p) != has_newline)
{
error_with_progname = false;
error_at_line (0, 0, msgid_pos->file_name, msgid_pos->line_number,
_("\
-`msgid' and `msgstr[%u]' entries do not both end with '\\n'"), i);
+`msgid' and `msgstr[%u]' entries do not both end with '\\n'"), j);
error_with_progname = true;
exit_status = EXIT_FAILURE;
}
message_list_list_ty *definitions,
message_list_ty *refmlp,
message_list_ty *resultmlp,
- struct statistics *stats, int *processed));
+ struct statistics *stats,
+ unsigned int *processed));
static msgdomain_list_ty *merge PARAMS ((const char *fn1, const char *fn2,
msgdomain_list_ty **defp));
message_list_ty *refmlp;
message_list_ty *resultmlp;
struct statistics *stats;
- int *processed;
+ unsigned int *processed;
{
size_t j;
msgdomain_list_ty *def;
msgdomain_list_ty *ref;
size_t j, k;
- size_t processed;
+ unsigned int processed;
struct statistics stats;
msgdomain_list_ty *result;
message_list_list_ty *definitions;
vasprintf (&buffer, fmt, ap);
va_end (ap);
error_with_progname = false;
- error (0, 0, "%s:%d:%d: %s" gram_pos.file_name, gram_pos.line_number,
- gram_pos_column + 1, buffer);
+ error (0, 0, "%s:%lu:%d: %s", gram_pos.file_name,
+ (unsigned long) gram_pos.line_number, gram_pos_column + 1, buffer);
error_with_progname = true;
# else
- char *totalfmt = xasprintf ("%s%s", "%s:%d:%d: ", fmt);
+ char *totalfmt = xasprintf ("%s%s", "%s:%lu:%d: ", fmt);
error_with_progname = false;
- error (0, 0, totalfmt, gram_pos.file_name, gram_pos.line_number,
- gram_pos_column + 1, a1, a2, a3, a4, a5, a6, a7, a8);
+ error (0, 0, totalfmt, gram_pos.file_name,
+ (unsigned long) gram_pos.line_number, gram_pos_column + 1,
+ a1, a2, a3, a4, a5, a6, a7, a8);
error_with_progname = true;
free (totalfmt);
# endif
# define po_gram_error(fmt, ...) \
do { \
- char *totalfmt = xasprintf ("%s%s", "%s:%d:%d: ", fmt); \
+ char *totalfmt = xasprintf ("%s%s", "%s:%lu:%d: ", fmt); \
error_with_progname = false; \
- error (0, 0, totalfmt, gram_pos.file_name, gram_pos.line_number, \
- gram_pos_column + 1, __VA_ARGS__); \
+ error (0, 0, totalfmt, gram_pos.file_name, \
+ (unsigned long) gram_pos.line_number, gram_pos_column + 1, \
+ __VA_ARGS__); \
error_with_progname = true; \
free (totalfmt); \
if (*fmt == '.') \
do { \
error_with_progname = false; \
error_at_line (0, 0, (pos)->file_name, (pos)->line_number, \
- fmt, __VA_ARGS__); \
+ fmt, __VA_ARGS__); \
error_with_progname = true; \
if (*fmt == '.') \
--error_message_count; \
{
error_with_progname = false;
error (0, 0,
- _("%s:%d: warning: keyword nested in keyword arg"),
- token.pos.file_name, token.pos.line_number);
+ _("%s:%lu: warning: keyword nested in keyword arg"),
+ token.pos.file_name,
+ (unsigned long) token.pos.line_number);
error_with_progname = true;
continue;
}
we punt and forget the outer keyword. */
error_with_progname = false;
error (0, 0,
- _("%s:%d: warning: keyword between outer keyword and its arg"),
- token.pos.file_name, token.pos.line_number);
+ _("%s:%lu: warning: keyword between outer keyword and its arg"),
+ token.pos.file_name,
+ (unsigned long) token.pos.line_number);
error_with_progname = true;
}
commas_to_skip = token.argnum1 - 1;