diff options
-rw-r--r-- | ChangeLog | 19 | ||||
-rw-r--r-- | elf/cache.c | 2 | ||||
-rw-r--r-- | elf/dl-close.c | 2 | ||||
-rw-r--r-- | include/ctype.h | 17 | ||||
-rw-r--r-- | io/fts.c | 3 | ||||
-rw-r--r-- | locale/programs/locarchive.c | 5 | ||||
-rw-r--r-- | nscd/cache.c | 4 | ||||
-rw-r--r-- | nscd/nscd.h | 4 | ||||
-rw-r--r-- | nscd/nscd_getgr_r.c | 6 | ||||
-rw-r--r-- | nscd/nscd_getpw_r.c | 6 | ||||
-rw-r--r-- | posix/fnmatch.c | 7 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/powerpc/chown.c | 6 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c | 2 |
13 files changed, 50 insertions, 33 deletions
diff --git a/ChangeLog b/ChangeLog index 1815e944d7..82a20dd8c8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,22 @@ +2003-03-15 Roland McGrath <roland@redhat.com> + + * nscd/cache.c (cache_search): Give first arg type `request_type'. + * nscd/nscd.h: Update decl. + + * nscd/nscd_getpw_r.c (nscd_getpw_r): Add casts for signedness. + * nscd/nscd_getgr_r.c (nscd_getgr_r): Likewise. + * elf/dl-close.c (_dl_close): Likewise. + * sysdeps/unix/sysv/linux/powerpc/chown.c (__chown): int -> size_t + * io/fts.c (fts_build): Likewise. + * elf/cache.c (add_to_cache): Likewise. + * locale/programs/locarchive.c (show_archive_content): Likewise. + + * posix/fnmatch.c (fnmatch): Tweak __builtin_expect use. + + * include/ctype.h (__ctype_b_loc): Tweak type punning to make gcc 3.3 + happy. + (__ctype_toupper_loc, __ctype_tolower_loc): Likewise. + 2003-03-15 Ulrich Drepper <drepper@redhat.com> * sysdeps/unix/sysv/linux/ia64/system.c: Use the generic Linux diff --git a/elf/cache.c b/elf/cache.c index e34ea5ccf5..eda1ce2d8e 100644 --- a/elf/cache.c +++ b/elf/cache.c @@ -464,7 +464,7 @@ add_to_cache (const char *path, const char *lib, int flags, { struct cache_entry *new_entry, *ptr, *prev; char *full_path; - int len, i; + size_t len, i; new_entry = (struct cache_entry *) xmalloc (sizeof (struct cache_entry)); diff --git a/elf/dl-close.c b/elf/dl-close.c index 1d4a8c3653..5a61ad0aed 100644 --- a/elf/dl-close.c +++ b/elf/dl-close.c @@ -371,7 +371,7 @@ _dl_close (void *_map) this search list, going in either direction. When the whole chunk is at the end of the used area then we can reclaim it. */ - if (imap->l_tls_offset == tls_free_end) + if ((size_t) imap->l_tls_offset == tls_free_end) /* Extend the contiguous chunk being reclaimed. */ tls_free_end += imap->l_tls_blocksize; else if (imap->l_tls_offset + imap->l_tls_blocksize diff --git a/include/ctype.h b/include/ctype.h index ca3c3dd856..aad0aad530 100644 --- a/include/ctype.h +++ b/include/ctype.h @@ -25,31 +25,28 @@ __libc_tsd_define (extern, CTYPE_TOLOWER) CTYPE_EXTERN_INLINE const uint16_t ** __attribute__ ((const)) __ctype_b_loc (void) { - const uint16_t **tablep = - (const uint16_t **) __libc_tsd_address (CTYPE_B); + void **tablep = __libc_tsd_address (CTYPE_B); if (__builtin_expect (*tablep == NULL, 0)) - *tablep = (const uint16_t *) _NL_CURRENT (LC_CTYPE, _NL_CTYPE_CLASS) + 128; - return tablep; + *tablep = (uint16_t *) _NL_CURRENT (LC_CTYPE, _NL_CTYPE_CLASS) + 128; + return (const uint16_t **) tablep; } CTYPE_EXTERN_INLINE const int32_t ** __attribute__ ((const)) __ctype_toupper_loc (void) { - const int32_t **tablep = - (const int32_t **) __libc_tsd_address (CTYPE_TOUPPER); + void **tablep = __libc_tsd_address (CTYPE_TOUPPER); if (__builtin_expect (*tablep == NULL, 0)) *tablep = ((int32_t *) _NL_CURRENT (LC_CTYPE, _NL_CTYPE_TOUPPER) + 128); - return tablep; + return (const int32_t **) tablep; } CTYPE_EXTERN_INLINE const int32_t ** __attribute__ ((const)) __ctype_tolower_loc (void) { - const int32_t **tablep = - (const int32_t **) __libc_tsd_address (CTYPE_TOLOWER); + void **tablep = __libc_tsd_address (CTYPE_TOLOWER); if (__builtin_expect (*tablep == NULL, 0)) *tablep = ((int32_t *) _NL_CURRENT (LC_CTYPE, _NL_CTYPE_TOLOWER) + 128); - return tablep; + return (const int32_t **) tablep; } # endif /* Not NOT_IN_libc. */ diff --git a/io/fts.c b/io/fts.c index 35374a094a..91d2ef6298 100644 --- a/io/fts.c +++ b/io/fts.c @@ -581,8 +581,9 @@ fts_build(sp, type) FTSENT *cur, *tail; DIR *dirp; void *oldaddr; - int cderrno, descend, len, level, maxlen, nlinks, saved_errno, + int cderrno, descend, len, level, nlinks, saved_errno, nostat, doadjust; + size_t maxlen; char *cp; /* Set current node pointer. */ diff --git a/locale/programs/locarchive.c b/locale/programs/locarchive.c index 10017a214e..64e1467109 100644 --- a/locale/programs/locarchive.c +++ b/locale/programs/locarchive.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. @@ -1402,8 +1402,7 @@ show_archive_content (int verbose) struct locarhead *head; struct namehashent *namehashtab; struct nameent *names; - int cnt; - int used; + size_t cnt, used; /* Open the archive. This call never returns if we cannot successfully open the archive. */ diff --git a/nscd/cache.c b/nscd/cache.c index 31a867adf5..d8339e915d 100644 --- a/nscd/cache.c +++ b/nscd/cache.c @@ -1,4 +1,4 @@ -/* Copyright (c) 1998, 1999 Free Software Foundation, Inc. +/* Copyright (c) 1998, 1999, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998. @@ -39,7 +39,7 @@ This function must be called with the read-lock held. */ struct hashentry * -cache_search (int type, void *key, size_t len, struct database *table, +cache_search (request_type type, void *key, size_t len, struct database *table, uid_t owner) { unsigned long int hash = __nis_hash (key, len) % table->module; diff --git a/nscd/nscd.h b/nscd/nscd.h index 11a30176df..f500b1598f 100644 --- a/nscd/nscd.h +++ b/nscd/nscd.h @@ -1,4 +1,4 @@ -/* Copyright (c) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. +/* Copyright (c) 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk <kukuk@suse.de>, 1998. @@ -118,7 +118,7 @@ extern void send_stats (int fd, struct database dbs[lastdb]); extern int receive_print_stats (void) __attribute__ ((__noreturn__)); /* cache.c */ -extern struct hashentry *cache_search (int type, void *key, size_t len, +extern struct hashentry *cache_search (request_type, void *key, size_t len, struct database *table, uid_t owner); extern void cache_add (int type, void *key, size_t len, const void *packet, size_t iovtotal, void *data, diff --git a/nscd/nscd_getgr_r.c b/nscd/nscd_getgr_r.c index 49f4b51304..2d09ed92f2 100644 --- a/nscd/nscd_getgr_r.c +++ b/nscd/nscd_getgr_r.c @@ -114,8 +114,8 @@ nscd_getgr_r (const char *key, size_t keylen, request_type type, vec[1].iov_base = (void *) key; vec[1].iov_len = keylen; - nbytes = (size_t) TEMP_FAILURE_RETRY (__writev (sock, vec, 2)); - if (nbytes != sizeof (request_header) + keylen) + nbytes = TEMP_FAILURE_RETRY (__writev (sock, vec, 2)); + if (nbytes != (ssize_t) (sizeof (request_header) + keylen)) { __close (sock); return -1; @@ -123,7 +123,7 @@ nscd_getgr_r (const char *key, size_t keylen, request_type type, nbytes = TEMP_FAILURE_RETRY (__read (sock, &gr_resp, sizeof (gr_response_header))); - if (nbytes != sizeof (gr_response_header)) + if (nbytes != (ssize_t) sizeof (gr_response_header)) { __close (sock); return -1; diff --git a/nscd/nscd_getpw_r.c b/nscd/nscd_getpw_r.c index f4fa75fa6f..160e9ffa27 100644 --- a/nscd/nscd_getpw_r.c +++ b/nscd/nscd_getpw_r.c @@ -113,8 +113,8 @@ nscd_getpw_r (const char *key, size_t keylen, request_type type, vec[1].iov_base = (void *) key; vec[1].iov_len = keylen; - nbytes = (size_t) TEMP_FAILURE_RETRY (__writev (sock, vec, 2)); - if (nbytes != sizeof (request_header) + keylen) + nbytes = TEMP_FAILURE_RETRY (__writev (sock, vec, 2)); + if (nbytes != (ssize_t) (sizeof (request_header) + keylen)) { __close (sock); return -1; @@ -122,7 +122,7 @@ nscd_getpw_r (const char *key, size_t keylen, request_type type, nbytes = TEMP_FAILURE_RETRY (__read (sock, &pw_resp, sizeof (pw_response_header))); - if (nbytes != sizeof (pw_response_header)) + if (nbytes != (ssize_t) sizeof (pw_response_header)) { __close (sock); return -1; diff --git a/posix/fnmatch.c b/posix/fnmatch.c index b677e4bf41..c521a25b70 100644 --- a/posix/fnmatch.c +++ b/posix/fnmatch.c @@ -1,4 +1,5 @@ -/* Copyright (C) 1991-93,96-99,2000,01,02 Free Software Foundation, Inc. +/* Copyright (C) 1991,1992,1993,1996,1997,1998,1999,2000,2001,2002,2003 + 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 @@ -333,7 +334,7 @@ fnmatch (pattern, string, flags) /* Convert the strings into wide characters. */ memset (&ps, '\0', sizeof (ps)); n = mbsrtowcs (NULL, &pattern, 0, &ps); - if (__builtin_expect (n, 0) == (size_t) -1) + if (__builtin_expect (n == (size_t) -1, 0)) /* Something wrong. XXX Do we have to set `errno' to something which mbsrtows hasn't already done? */ @@ -344,7 +345,7 @@ fnmatch (pattern, string, flags) assert (mbsinit (&ps)); n = mbsrtowcs (NULL, &string, 0, &ps); - if (__builtin_expect (n, 0) == (size_t) -1) + if (__builtin_expect (n == (size_t) -1, 0)) /* Something wrong. XXX Do we have to set `errno' to something which mbsrtows hasn't already done? */ diff --git a/sysdeps/unix/sysv/linux/powerpc/chown.c b/sysdeps/unix/sysv/linux/powerpc/chown.c index 797b41f01c..182c5e787a 100644 --- a/sysdeps/unix/sysv/linux/powerpc/chown.c +++ b/sysdeps/unix/sysv/linux/powerpc/chown.c @@ -1,5 +1,5 @@ /* chown() compatibility. - Copyright (C) 1998, 2000, 2002 Free Software Foundation, Inc. + Copyright (C) 1998, 2000, 2002, 2003 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 @@ -42,7 +42,7 @@ __chown (const char *file, uid_t owner, gid_t group) char link[PATH_MAX+2]; char path[2*PATH_MAX+4]; int loopct; - int filelen; + size_t filelen; static int libc_old_chown = 0 /* -1=old linux, 1=new linux, 0=unknown */; if (libc_old_chown == 1) @@ -82,7 +82,7 @@ __chown (const char *file, uid_t owner, gid_t group) ENAMETOOLONG before this, usually. */ for (loopct = 0; loopct < 128; loopct++) { - int linklen; + size_t linklen; if (err >= PATH_MAX+1) { diff --git a/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c b/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c index 64e4e2c4d3..a548a96325 100644 --- a/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c +++ b/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c @@ -69,4 +69,4 @@ weak_extern (__cache_line_size) } while (0) #endif -#include_next <sysdeps/unix/sysv/linux/dl-sysdep.c> +#include <sysdeps/unix/sysv/linux/dl-sysdep.c> |