From: Bruno Haible Date: Mon, 21 Jan 2002 13:19:49 +0000 (+0000) Subject: Avoid some gcc warnings. X-Git-Tag: v0.11~44 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a29f4172cb60276465db3d916a449d0e31db3971;p=thirdparty%2Fgettext.git Avoid some gcc warnings. --- diff --git a/src/ChangeLog b/src/ChangeLog index f84992523..d370b1baa 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2002-01-19 Bruno Haible + + * open-po.c (open_po_file): Use 'size_t' instead of 'int'. + * x-java.l (translate_esc): Likewise. + * read-mo.c (read_mo_file): Use 'unsigned int' instead of 'int'. + 2002-01-13 Bruno Haible * msgl-iconv.c (iconv_message_list): Don't complain by a nonportable diff --git a/src/open-po.c b/src/open-po.c index 8d2e10d9d..5f3fbaa94 100644 --- a/src/open-po.c +++ b/src/open-po.c @@ -1,5 +1,5 @@ /* open-po - search for .po file along search path list and open for reading - Copyright (C) 1995-1996, 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 1995-1996, 2000-2002 Free Software Foundation, Inc. Written by Ulrich Drepper , April 1995. This program is free software; you can redistribute it and/or modify @@ -51,7 +51,8 @@ open_po_file (input_name, real_file_name_p) static const char *extension[] = { "", ".po", ".pot", }; char *file_name; FILE *ret_val; - int j, k; + int j; + size_t k; const char *dir; if (strcmp (input_name, "-") == 0 || strcmp (input_name, "/dev/stdin") == 0) diff --git a/src/read-mo.c b/src/read-mo.c index dffe573a1..590f18565 100644 --- a/src/read-mo.c +++ b/src/read-mo.c @@ -1,5 +1,5 @@ /* Reading binary .mo files. - Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 1995-1998, 2000-2002 Free Software Foundation, Inc. Written by Ulrich Drepper , April 1995. This program is free software; you can redistribute it and/or modify @@ -156,7 +156,7 @@ read_mo_file (mlp, fn) { FILE *fp; struct mo_file_header header; - int j; + unsigned int j; if (strcmp (fn, "-") == 0 || strcmp (fn, "/dev/stdin") == 0) { diff --git a/src/x-java.l b/src/x-java.l index 6e6bd998e..18d1caf0b 100644 --- a/src/x-java.l +++ b/src/x-java.l @@ -275,8 +275,8 @@ translate_esc (s) char *s; { char *n = (char *) xmalloc (strlen (s) + 1); - int i; - int j = 0; + size_t i; + size_t j = 0; for (i = 0; i < strlen (s); i++) switch (s[i])