aboutsummaryrefslogtreecommitdiff
path: root/locale
diff options
context:
space:
mode:
Diffstat (limited to 'locale')
-rw-r--r--locale/loadarchive.c2
-rw-r--r--locale/loadlocale.c4
-rw-r--r--locale/programs/charmap.c12
-rw-r--r--locale/programs/linereader.c2
4 files changed, 10 insertions, 10 deletions
diff --git a/locale/loadarchive.c b/locale/loadarchive.c
index cad34b6..ef259b9 100644
--- a/locale/loadarchive.c
+++ b/locale/loadarchive.c
@@ -373,7 +373,7 @@ _nl_load_locale_from_archive (int category, const char **namep)
do
{
to = ranges[upper].from + ranges[upper].len;
- if (to > archive_stat.st_size)
+ if (to > (size_t) archive_stat.st_size)
/* The archive locrectab contains bogus offsets. */
return NULL;
to = (to + ps - 1) & ~(ps - 1);
diff --git a/locale/loadlocale.c b/locale/loadlocale.c
index 14f3773..ebf25f3 100644
--- a/locale/loadlocale.c
+++ b/locale/loadlocale.c
@@ -1,5 +1,5 @@
/* Functions to read locale data files.
- Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
+ Copyright (C) 1996-2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -105,7 +105,7 @@ _nl_intern_locale_data (int category, const void *data, size_t datasize)
for (cnt = 0; cnt < newdata->nstrings; ++cnt)
{
size_t idx = filedata->strindex[cnt];
- if (__builtin_expect (idx > newdata->filesize, 0))
+ if (__builtin_expect (idx > (size_t) newdata->filesize, 0))
{
puntdata:
free (newdata);
diff --git a/locale/programs/charmap.c b/locale/programs/charmap.c
index 0aa623b..8612d99 100644
--- a/locale/programs/charmap.c
+++ b/locale/programs/charmap.c
@@ -244,9 +244,9 @@ default character map file `%s' not found"), DEFAULT_CHARMAP));
do
{
- struct charseq * seq = charmap_find_symbol (result, p, 1);
+ struct charseq *seq = charmap_find_symbol (result, p, 1);
- if (seq == NULL || seq->ucs4 != *p)
+ if (seq == NULL || seq->ucs4 != (uint32_t) *p)
failed = 1;
}
while (*p++ != '\0');
@@ -962,7 +962,7 @@ charmap_new_char (struct linereader *lr, struct charmap_t *cm,
errno = 0;
newp->ucs4 = strtoul (from + 1, &endp, 16);
if (endp - from != len1
- || (newp->ucs4 == ULONG_MAX && errno == ERANGE)
+ || (newp->ucs4 == ~((uint32_t) 0) && errno == ERANGE)
|| newp->ucs4 >= 0x80000000)
/* This wasn't successful. Signal this name cannot be a
correct UCS value. */
@@ -1008,9 +1008,9 @@ hexadecimal range format should use only capital characters"));
errno = 0;
from_nr = strtoul (&from[prefix_len], &from_end, decimal_ellipsis ? 10 : 16);
- if (*from_end != '\0' || (from_nr == ULONG_MAX && errno == ERANGE)
+ if (*from_end != '\0' || (from_nr == UINT_MAX && errno == ERANGE)
|| ((to_nr = strtoul (&to[prefix_len], &to_end,
- decimal_ellipsis ? 10 : 16)) == ULONG_MAX
+ decimal_ellipsis ? 10 : 16)) == UINT_MAX
&& errno == ERANGE)
|| *to_end != '\0')
{
@@ -1057,7 +1057,7 @@ hexadecimal range format should use only capital characters"));
errno = 0;
newp->ucs4 = strtoul (name_end + 1, &endp, 16);
if (endp - name_end != len1
- || (newp->ucs4 == ULONG_MAX && errno == ERANGE)
+ || (newp->ucs4 == ~((uint32_t) 0) && errno == ERANGE)
|| newp->ucs4 >= 0x80000000)
/* This wasn't successful. Signal this name cannot be a
correct UCS value. */
diff --git a/locale/programs/linereader.c b/locale/programs/linereader.c
index e216165..2c6eb8d 100644
--- a/locale/programs/linereader.c
+++ b/locale/programs/linereader.c
@@ -381,7 +381,7 @@ get_toplvl_escape (struct linereader *lr)
bytes[nbytes++] = byte;
}
while (ch == lr->escape_char
- && nbytes < sizeof (lr->token.val.charcode.bytes));
+ && nbytes < (int) sizeof (lr->token.val.charcode.bytes));
if (!isspace (ch))
lr_error (lr, _("garbage at end of character code specification"));