diff --git a/ChangeLog b/ChangeLog index d41bc245c7..ce657b8f6c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,10 +1,59 @@ +2002-09-23 Roland McGrath + + * catgets/open_catalog.c (__open_catalog): Don't use a value type + as the __builtin_expect expression, just the Boolean value. + + * sysdeps/generic/wordexp.c (parse_glob): int -> size_t for counter. + * sysdeps/unix/sysv/linux/opensock.c (__opensock): Likewise. + * resolv/res_hconf.c (arg_service_list, parse_line): Likewise. + * iconvdata/tst-loading.c (main): Likewise. + * catgets/tst-catgets.c (main): Likewise. + * stdlib/tst-xpg-basename.c (main): Likewise. + * stdlib/tst-bsearch.c (main): Likewise. + * stdio-common/test-vfprintf.c (main): Likewise. + * stdio-common/tst-rndseek.c (do_test): Likewise. + * libio/tst_swprintf.c (main): Likewise. + * libio/tst-fgetws.c (main): Likewise. + * wcsmbs/tst-mbrtowc.c (check_ascii): Likewise. + * time/tst-posixtz.c (main): Likewise. + * time/tst-strptime.c (test_tm): Likewise. + * time/tst-strptime.c (main): Likewise. + * time/tst-getdate.c (main): Likewise. + * posix/tst-mmap.c (main): Likewise. + * posix/tst-getaddrinfo.c (do_test): Likewise. + * io/tst-getcwd.c (do_test): Likewise. + * resolv/tst-aton.c (main): Likewise. + * inet/tst-network.c (main): Likewise. + * libio/tst-fgetws.c (main): Likewise. + * sysdeps/posix/sprofil.c (add_region): int -> unsigned int for I. + * sysdeps/unix/sysv/linux/ptsname.c (__ptsname_r): int -> unsigned int + for PTYNO. + + * stdlib/msort.c (qsort): Add a cast to silence warning. + * stdio-common/vfprintf.c (process_string_arg): Likewise. + * libio/oldfileops.c (_IO_old_do_write): Likewise. + * sysdeps/unix/sysv/linux/getcwd.c (__getcwd): Likewise. + * sysdeps/unix/sysv/linux/ttyname.c (ttyname): Likewise. + * sysdeps/unix/sysv/linux/gethostid.c (gethostid): Likewise. + * argp/argp-fmtstream.c (__argp_fmtstream_printf): Likewise. + * nscd/nscd_getgr_r.c (nscd_getgr_r): Likewise. + * sysdeps/unix/grantpt.c (grantpt): Likewise. + * libio/tst-widetext.c (main): Likewise. + * libio/tst-mmap2-eofsync.c (do_test): Likewise. + * rt/tst-aio.c (test_file): Likewise. + * rt/tst-aio64.c (test_file): Likewise. + * resolv/tst-aton.c (main): Likewise. + + * catgets/catgetsinfo.h (CATGETS_MAGIC): Use U suffix on the constant. + + * ctype/ctype.c (__ctype_tolower, __ctype_toupper): Cast to int32_t + instead of uint32_t in these macros. + 2002-09-22 Bruno Haible * iconv/iconv_prog.c (main): Provide an error message that identifies the wrong encoding. -2002-09-22 Bruno Haible - * iconvdata/tscii.c: New file. * iconvdata/testdata/TSCII: New file. * iconvdata/testdata/TSCII..UTF8: New file. @@ -18,16 +67,12 @@ * iconvdata/tst-tables.sh: Add TSCII. * iconvdata/TESTS: Add TSCII. -2002-09-22 Bruno Haible - Revert 2002-04-18 patch. * iconvdata/euc-jisx0213.c (EMIT_SHIFT_TO_INIT, BODY for FROM_DIRECTION): Make the FROM direction stateful again. * iconvdata/shift_jisx0213.c (EMIT_SHIFT_TO_INIT, BODY for FROM_DIRECTION): Likewise. -2002-09-22 Bruno Haible - * iconvdata/tst-e2big.c: New file. * iconvdata/Makefile (tests): Add tst-e2big. diff --git a/argp/argp-fmtstream.c b/argp/argp-fmtstream.c index c3d3787d18..6d461aa984 100644 --- a/argp/argp-fmtstream.c +++ b/argp/argp-fmtstream.c @@ -415,10 +415,10 @@ __argp_fmtstream_printf (struct argp_fmtstream *fs, const char *fmt, ...) avail = fs->end - fs->p; out = __vsnprintf (fs->p, avail, fmt, args); va_end (args); - if (out >= avail) + if ((size_t) out >= avail) size_guess = out + 1; } - while (out >= avail); + while ((size_t) out >= avail); fs->p += out; diff --git a/catgets/catgetsinfo.h b/catgets/catgetsinfo.h index 4fdf47aace..5c993f753a 100644 --- a/catgets/catgetsinfo.h +++ b/catgets/catgetsinfo.h @@ -48,7 +48,7 @@ typedef struct catalog_info /* The magic number to signal we really have a catalog file. */ -#define CATGETS_MAGIC 0x960408de +#define CATGETS_MAGIC 0x960408deU /* Prototypes for helper functions. */ diff --git a/catgets/open_catalog.c b/catgets/open_catalog.c index cdcc7b83b8..674a0c1bf0 100644 --- a/catgets/open_catalog.c +++ b/catgets/open_catalog.c @@ -253,8 +253,7 @@ __open_catalog (const char *cat_name, const char *nlspath, const char *env_var, /* Determine whether the file is a catalog file and if yes whether it is written using the correct byte order. Else we have to swap the values. */ - if (__builtin_expect (catalog->file_ptr->magic, CATGETS_MAGIC) - == CATGETS_MAGIC) + if (__builtin_expect (catalog->file_ptr->magic == CATGETS_MAGIC, 1)) swapping = 0; else if (catalog->file_ptr->magic == SWAPU32 (CATGETS_MAGIC)) swapping = 1; diff --git a/catgets/tst-catgets.c b/catgets/tst-catgets.c index 249e89f7e0..9936554200 100644 --- a/catgets/tst-catgets.c +++ b/catgets/tst-catgets.c @@ -26,7 +26,7 @@ main (void) for (rnd = 0; rnd < ROUNDS; ++rnd) { nl_catd cd = catopen ("libc", 0); - int cnt; + size_t cnt; if (cd == (nl_catd) -1) { diff --git a/iconvdata/tst-loading.c b/iconvdata/tst-loading.c index 0d55e812d1..95a7f07b1a 100644 --- a/iconvdata/tst-loading.c +++ b/iconvdata/tst-loading.c @@ -1,5 +1,5 @@ /* Tests for loading and unloading of iconv modules. - Copyright (C) 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2000. @@ -118,7 +118,7 @@ static const char inbuf[] = int main (void) { - int count = TEST_ROUNDS; + size_t count = TEST_ROUNDS; int result = 0; mtrace (); diff --git a/inet/tst-network.c b/inet/tst-network.c index 71ef031c78..4283888057 100644 --- a/inet/tst-network.c +++ b/inet/tst-network.c @@ -1,5 +1,5 @@ /* Test for inet_network. - Copyright (C) 2000 Free Software Foundation, Inc. + Copyright (C) 2000, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Jaeger , 2000. @@ -51,7 +51,7 @@ int main (void) { int errors = 0; - int i; + size_t i; uint32_t res; for (i = 0; i < sizeof (tests) / sizeof (tests[0]); ++i) diff --git a/io/tst-getcwd.c b/io/tst-getcwd.c index 33ea8adc59..f53f93cf0a 100644 --- a/io/tst-getcwd.c +++ b/io/tst-getcwd.c @@ -1,5 +1,5 @@ /* Test of getcwd function. - Copyright (C) 2000 Free Software Foundation, Inc. + Copyright (C) 2000, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2000. @@ -36,8 +36,7 @@ do_test (void) char *bufs[10]; size_t lens[10]; size_t sbs; - size_t len; - int i; + size_t len, i; if (getcwd (thepath, sizeof thepath) == NULL) { diff --git a/libio/oldfileops.c b/libio/oldfileops.c index 8998ee9b0d..2efbadb44e 100644 --- a/libio/oldfileops.c +++ b/libio/oldfileops.c @@ -266,7 +266,7 @@ _IO_old_do_write (fp, data, to_do) const char *data; _IO_size_t to_do; { - return (to_do == 0 || old_do_write (fp, data, to_do) == to_do) + return (to_do == 0 || (_IO_size_t) old_do_write (fp, data, to_do) == to_do) ? 0 : EOF; } diff --git a/libio/tst-fgetws.c b/libio/tst-fgetws.c index 88b6261bb8..66fb9d1d8e 100644 --- a/libio/tst-fgetws.c +++ b/libio/tst-fgetws.c @@ -13,7 +13,7 @@ int main (int argc, char *argv[]) { - int i; + size_t i; FILE *fp; wchar_t *ret, wcs[WIDE_STR_LEN]; int result = 0; @@ -123,7 +123,7 @@ main (int argc, char *argv[]) } else { - int i; + size_t i; printf ("Return Value: %p\n", ret); for (i = 0; i < wcslen (wcs) + 1; i++) diff --git a/libio/tst-mmap2-eofsync.c b/libio/tst-mmap2-eofsync.c index 60bad94027..f3699656ab 100644 --- a/libio/tst-mmap2-eofsync.c +++ b/libio/tst-mmap2-eofsync.c @@ -78,7 +78,7 @@ do_test (void) } c = write (temp_fd, pages + pagesize, pagesize); - if (c == pagesize) + if (c == (ssize_t) pagesize) printf ("wrote more to file\n"); else { diff --git a/libio/tst-widetext.c b/libio/tst-widetext.c index ed196317a9..48444380d8 100644 --- a/libio/tst-widetext.c +++ b/libio/tst-widetext.c @@ -89,7 +89,7 @@ main (void) exit (1); } - if ((size_t) nonr == -1 ) + if (nonr == (size_t) -1) { printf ("\ %u: iconv returned with %Zd and errno = %m (inleft: %Zd, outleft: %Zd)\n", diff --git a/libio/tst_swprintf.c b/libio/tst_swprintf.c index a82ef88e7c..4dadd58741 100644 --- a/libio/tst_swprintf.c +++ b/libio/tst_swprintf.c @@ -21,7 +21,7 @@ static const struct int main (int argc, char *argv[]) { - int n; + size_t n; int result = 0; puts ("test 1"); diff --git a/nscd/nscd_getgr_r.c b/nscd/nscd_getgr_r.c index cb57bc1496..ab9eef4e24 100644 --- a/nscd/nscd_getgr_r.c +++ b/nscd/nscd_getgr_r.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1998. @@ -114,7 +114,7 @@ nscd_getgr_r (const char *key, size_t keylen, request_type type, vec[1].iov_base = (void *) key; vec[1].iov_len = keylen; - if (__writev (sock, vec, 2) != sizeof (request_header) + keylen) + if ((size_t) __writev (sock, vec, 2) != sizeof (request_header) + keylen) { __close (sock); return -1; @@ -182,7 +182,7 @@ nscd_getgr_r (const char *key, size_t keylen, request_type type, total_len += gr_resp.gr_name_len + gr_resp.gr_passwd_len; /* Get this data. */ - if (__readv (sock, vec, 2) != total_len) + if ((size_t) __readv (sock, vec, 2) != total_len) { __close (sock); return -1; diff --git a/posix/tst-getaddrinfo.c b/posix/tst-getaddrinfo.c index 9300cc6740..565621ed9e 100644 --- a/posix/tst-getaddrinfo.c +++ b/posix/tst-getaddrinfo.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -28,7 +28,8 @@ do_test (void) { const int family[2] = { AF_INET, AF_INET6 }; int result = 0; - int gaierr, index; + int gaierr; + size_t index; struct addrinfo hints, *ai, *aitop; for (index = 0; index < sizeof (family) / sizeof (family[0]); ++index) diff --git a/posix/tst-mmap.c b/posix/tst-mmap.c index 7a57366903..e4db364301 100644 --- a/posix/tst-mmap.c +++ b/posix/tst-mmap.c @@ -11,10 +11,10 @@ main (void) { int result = 0; FILE *fp; - int c; + size_t c; char buf[1000]; int fd; - char *ptr; + unsigned char *ptr; size_t ps = sysconf (_SC_PAGESIZE); void *mem; diff --git a/resolv/res_hconf.c b/resolv/res_hconf.c index 8da2727a79..132dda7599 100644 --- a/resolv/res_hconf.c +++ b/resolv/res_hconf.c @@ -112,7 +112,7 @@ arg_service_list (const char *fname, int line_num, const char *args, enum Name_Service service; const char *start; size_t len; - int i; + size_t i; static struct { const char * name; @@ -339,7 +339,7 @@ parse_line (const char *fname, int line_num, const char *str) const char *start; struct cmd *c = 0; size_t len; - int i; + size_t i; str = skip_ws (str); diff --git a/resolv/tst-aton.c b/resolv/tst-aton.c index 3469b19260..6cb5960496 100644 --- a/resolv/tst-aton.c +++ b/resolv/tst-aton.c @@ -39,7 +39,7 @@ static struct tests { "1.2.256.4", 0, 0 }, { "1.2.3.0x100", 0, 0 }, { "323543357756889", 0, 0 }, - { "10.1.2.3.4", 0, 0}, + { "10.1.2.3.4", 0, 0}, }; @@ -47,13 +47,13 @@ int main (int argc, char *argv[]) { int result = 0; - int cnt; + size_t cnt; for (cnt = 0; cnt < sizeof (tests) / sizeof (tests[0]); ++cnt) { struct in_addr addr; - if (inet_aton (tests[cnt].input, &addr) != tests[cnt].valid) + if ((int) inet_aton (tests[cnt].input, &addr) != tests[cnt].valid) { if (tests[cnt].valid) printf ("\"%s\" not seen as valid IP address\n", tests[cnt].input); diff --git a/rt/tst-aio.c b/rt/tst-aio.c index 1b24542441..24efad3e23 100644 --- a/rt/tst-aio.c +++ b/rt/tst-aio.c @@ -76,14 +76,14 @@ test_file (const void *buf, size_t size, int fd, const char *msg) return 1; } - if (st.st_size != size) + if (st.st_size != (off_t) size) { error (0, errno, "%s: wrong size: %lu, should be %lu", msg, (unsigned long int) st.st_size, (unsigned long int) size); return 1; } - if (pread (fd, tmp, size, 0) != size) + if (pread (fd, tmp, size, 0) != (ssize_t) size) { error (0, errno, "%s: failed pread", msg); return 1; diff --git a/rt/tst-aio64.c b/rt/tst-aio64.c index 4663d75562..93e8cb2136 100644 --- a/rt/tst-aio64.c +++ b/rt/tst-aio64.c @@ -77,14 +77,14 @@ test_file (const void *buf, size_t size, int fd, const char *msg) return 1; } - if (st.st_size != size) + if (st.st_size != (off_t) size) { error (0, errno, "%s: wrong size: %lu, should be %lu", msg, (unsigned long int) st.st_size, (unsigned long int) size); return 1; } - if (pread (fd, tmp, size, 0) != size) + if (pread (fd, tmp, size, 0) != (ssize_t) size) { error (0, errno, "%s: failed pread", msg); return 1; diff --git a/stdio-common/test-vfprintf.c b/stdio-common/test-vfprintf.c index 1b9d0c0f9b..50e8b5038a 100644 --- a/stdio-common/test-vfprintf.c +++ b/stdio-common/test-vfprintf.c @@ -1,5 +1,5 @@ /* Tests of *printf for very large strings. - Copyright (C) 2000 Free Software Foundation, Inc. + Copyright (C) 2000, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2000. @@ -41,7 +41,7 @@ int main (void) { char buf[20]; - int i; + size_t i; int res = 0; int fd; diff --git a/stdio-common/tst-rndseek.c b/stdio-common/tst-rndseek.c index 60fd5094d8..61b919c002 100644 --- a/stdio-common/tst-rndseek.c +++ b/stdio-common/tst-rndseek.c @@ -67,7 +67,7 @@ do_test (void) { int fd; FILE *fp; - int i; + size_t i; int result; fd = mkstemp (fname); diff --git a/stdio-common/vfprintf.c b/stdio-common/vfprintf.c index ab7998c248..788290b803 100644 --- a/stdio-common/vfprintf.c +++ b/stdio-common/vfprintf.c @@ -1035,7 +1035,7 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap) const char *mbs = (const char *) string; \ mbstate_t mbstate; \ \ - len = prec != -1 ? prec : strlen (mbs); \ + len = prec != -1 ? (size_t) prec : strlen (mbs); \ \ /* Allocate dynamically an array which definitely is long \ enough for the wide character version. */ \ diff --git a/stdlib/msort.c b/stdlib/msort.c index 880c5d1e3d..45d6a99b83 100644 --- a/stdlib/msort.c +++ b/stdlib/msort.c @@ -130,7 +130,7 @@ qsort (void *b, size_t n, size_t s, __compar_fn_t cmp) measured in bytes. */ /* If the memory requirements are too high don't allocate memory. */ - if (size / pagesize > phys_pages) + if (size / pagesize > (size_t) phys_pages) _quicksort (b, n, s, cmp); else { diff --git a/stdlib/tst-bsearch.c b/stdlib/tst-bsearch.c index 808ab9d8e5..04ec02a411 100644 --- a/stdlib/tst-bsearch.c +++ b/stdlib/tst-bsearch.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2000. @@ -54,7 +54,7 @@ comp (const void *p1, const void *p2) int main (void) { - int cnt; + size_t cnt; int result = 0; struct entry key; struct entry *res; @@ -101,7 +101,7 @@ main (void) puts ("found an entry that's not there"); result = 1; } - + /* Now the array contains only one element - no entry should be found. */ for (cnt = 0; cnt < narr; ++cnt) { diff --git a/stdlib/tst-xpg-basename.c b/stdlib/tst-xpg-basename.c index dd22cf73b2..38f995ecb0 100644 --- a/stdlib/tst-xpg-basename.c +++ b/stdlib/tst-xpg-basename.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Jaeger , 1999. @@ -41,7 +41,7 @@ static struct int main (void) { - int i = 0; + size_t i = 0; int errors = 0; char path[1024]; char *file; diff --git a/sysdeps/generic/wordexp.c b/sysdeps/generic/wordexp.c index 691c1101aa..09f4e942d5 100644 --- a/sysdeps/generic/wordexp.c +++ b/sysdeps/generic/wordexp.c @@ -445,7 +445,7 @@ parse_glob (char **word, size_t *word_length, size_t *max_length, /* We are poised just after a '*', a '[' or a '?'. */ int error = WRDE_NOSPACE; int quoted = 0; /* 1 if singly-quoted, 2 if doubly */ - int i; + size_t i; wordexp_t glob_list; /* List of words to glob */ glob_list.we_wordc = 0; diff --git a/sysdeps/posix/sprofil.c b/sysdeps/posix/sprofil.c index d6fdd9a316..8f3270e1fc 100644 --- a/sysdeps/posix/sprofil.c +++ b/sysdeps/posix/sprofil.c @@ -239,7 +239,7 @@ add_region (struct prof *p, int prof_uint) { unsigned long int nsamples; size_t start, end; - int i; + unsigned int i; if (p->pr_scale < 2) return 0; diff --git a/sysdeps/unix/grantpt.c b/sysdeps/unix/grantpt.c index 98d601cf67..bdedbacec8 100644 --- a/sysdeps/unix/grantpt.c +++ b/sysdeps/unix/grantpt.c @@ -130,7 +130,7 @@ grantpt (int fd) } /* Get the group ID of the special `tty' group. */ - if (grbuflen == -1) + if (grbuflen == (size_t) -1L) /* `sysconf' does not support _SC_GETGR_R_SIZE_MAX. Try a moderate value. */ grbuflen = 1024; diff --git a/sysdeps/unix/sysv/linux/getcwd.c b/sysdeps/unix/sysv/linux/getcwd.c index 7c27426f3c..6725d16058 100644 --- a/sysdeps/unix/sysv/linux/getcwd.c +++ b/sysdeps/unix/sysv/linux/getcwd.c @@ -143,7 +143,7 @@ __getcwd (char *buf, size_t size) { if (path[0] == '/') { - if (n >= alloc_size - 1) + if ((size_t) n >= alloc_size - 1) { if (buf == NULL) free (path); diff --git a/sysdeps/unix/sysv/linux/gethostid.c b/sysdeps/unix/sysv/linux/gethostid.c index 09ba379f39..96a78c6da1 100644 --- a/sysdeps/unix/sysv/linux/gethostid.c +++ b/sysdeps/unix/sysv/linux/gethostid.c @@ -108,7 +108,7 @@ gethostid () in.s_addr = 0; memcpy (&in, hp->h_addr, - (int) sizeof (in) < hp->h_length ? sizeof (in) : hp->h_length); + (int) sizeof (in) < hp->h_length ? (int) sizeof (in) : hp->h_length); /* For the return value to be not exactly the IP address we do some bit fiddling. */ diff --git a/sysdeps/unix/sysv/linux/opensock.c b/sysdeps/unix/sysv/linux/opensock.c index 7913886b6c..2252980789 100644 --- a/sysdeps/unix/sysv/linux/opensock.c +++ b/sysdeps/unix/sysv/linux/opensock.c @@ -59,7 +59,7 @@ __opensock (void) char fname[sizeof "/proc/" + 14]; int result; int has_proc; - int cnt; + size_t cnt; /* We already know which family to use from the last call. Use it again. */ diff --git a/sysdeps/unix/sysv/linux/ptsname.c b/sysdeps/unix/sysv/linux/ptsname.c index 084e573260..da4809f372 100644 --- a/sysdeps/unix/sysv/linux/ptsname.c +++ b/sysdeps/unix/sysv/linux/ptsname.c @@ -75,7 +75,7 @@ __ptsname_r (int fd, char *buf, size_t buflen) { int save_errno = errno; struct stat64 st; - int ptyno; + unsigned int ptyno; if (buf == NULL) { @@ -102,7 +102,7 @@ __ptsname_r (int fd, char *buf, size_t buflen) numbuf[sizeof (numbuf) - 1] = '\0'; p = _itoa_word (ptyno, &numbuf[sizeof (numbuf) - 1], 10, 0); - if (buflen < devptslen + &numbuf[sizeof (numbuf)] - p) + if (buflen < devptslen + (&numbuf[sizeof (numbuf)] - p)) { __set_errno (ERANGE); return ERANGE; diff --git a/sysdeps/unix/sysv/linux/ttyname.c b/sysdeps/unix/sysv/linux/ttyname.c index b5e73bf1af..f8e6e925a4 100644 --- a/sysdeps/unix/sysv/linux/ttyname.c +++ b/sysdeps/unix/sysv/linux/ttyname.c @@ -141,7 +141,7 @@ ttyname (int fd) /* This is for Linux 2.0. */ && ttyname_buf[0] != '[') { - if (len >= buflen) + if ((size_t) len >= buflen) return NULL; /* readlink need not terminate the string. */ ttyname_buf[len] = '\0'; diff --git a/time/tst-getdate.c b/time/tst-getdate.c index 2518f8c75b..84223d0ec2 100644 --- a/time/tst-getdate.c +++ b/time/tst-getdate.c @@ -1,5 +1,5 @@ /* Test for getdate. - Copyright (C) 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Jaeger , 2000. @@ -77,14 +77,14 @@ int main (void) { int errors = 0; - int i; + size_t i; struct tm *tm; for (i = 0; i < sizeof (tests) / sizeof (tests[0]); ++i) { setenv ("TZ", tests[i].tz, 1); - + tm = getdate (tests[i].str); if (getdate_err != tests[i].err) diff --git a/time/tst-posixtz.c b/time/tst-posixtz.c index 8c36513b0c..ccba63e5b4 100644 --- a/time/tst-posixtz.c +++ b/time/tst-posixtz.c @@ -28,7 +28,7 @@ int main (void) { int result = 0; - int cnt; + size_t cnt; for (cnt = 0; cnt < sizeof (tests) / sizeof (tests[0]); ++cnt) { diff --git a/time/tst-strptime.c b/time/tst-strptime.c index ac692a6d67..a0b2ebedd2 100644 --- a/time/tst-strptime.c +++ b/time/tst-strptime.c @@ -1,5 +1,5 @@ /* Test for strptime. - Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. @@ -65,7 +65,7 @@ static int test_tm (void) { struct tm tm; - int i; + size_t i; int result = 0; char buf[100]; @@ -114,7 +114,7 @@ int main (int argc, char *argv[]) { struct tm tm; - int i; + size_t i; int result = 0; for (i = 0; i < sizeof (day_tests) / sizeof (day_tests[0]); ++i) diff --git a/wcsmbs/tst-mbrtowc.c b/wcsmbs/tst-mbrtowc.c index e83ac6521a..4f1d1e586d 100644 --- a/wcsmbs/tst-mbrtowc.c +++ b/wcsmbs/tst-mbrtowc.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000, 2001 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2000. @@ -171,8 +171,7 @@ check_ascii (const char *locname) char buf[MB_CUR_MAX]; wchar_t wc = 0xffffffff; mbstate_t s; - size_t n; - int i; + size_t n, i; for (i = 0; i < MB_CUR_MAX; ++i) buf[i] = c + i;