Permalink
Browse files

Quash some new warnings from GCC 4.6.

  • Loading branch information...
frobtech committed Jun 10, 2011
1 parent b68e08d commit 5615eaf26469f20c2d8c3be5770e12564a1edfff
View
@@ -1,5 +1,42 @@
2011-06-10 Roland McGrath <roland@hack.frob.com>
+ * Makefile ($(common-objpfx)linkobj/libc.so): Break long lines with \.
+ Don't list ld.so twice in dependencies.
+
+ * posix/bug-regex31.c: Include <stdlib.h>.
+
+ * nscd/hstcache.c (cache_addhst): Remove unused variable.
+
+ * nis/nss_compat/compat-spwd.c
+ (getspent_next_nss_netgr): Remove unused variable.
+ * nis/nss_compat/compat-pwd.c (getpwent_next_nss_netgr): Likewise.
+
+ * nis/nis_print_group_entry.c (nis_print_group_entry): Fix "Implicit
+ nonmembers" output to use the right array.
+
+ * resolv/nss_dns/dns-network.c (getanswer_r): Remove unused variable.
+
+ * elf/dl-open.c (_dl_open): Quash warnings when DL_NNS==1.
+
+ * locale/programs/ld-ctype.c (ctype_read): Remove unused variable.
+ * locale/programs/ld-collate.c (add_to_tablewc): Likewise.
+ * catgets/gencat.c (read_input_file): Likewise.
+ * locale/programs/locarchive.c (enlarge_archive): Likewise.
+
+ * sunrpc/clnt_udp.c (__libc_clntudp_bufcreate): Move DONTBLOCK
+ variable definition inside #if's controlling its use.
+
+ * inet/getnetgrent_r.c (innetgr): Remove unused variable.
+
+ * resolv/res_hconf.c (_res_hconf_reorder_addrs): Fix errno restoration.
+
+ * misc/syslog.c (__vsyslog_chk): Remove unused variable.
+
+ * io/fts.c (fts_build): Use if (0 && ...) rather than #if 0 for
+ unreachable code.
+
+ * stdio-common/printf_fp.c (___printf_fp): Remove unused variable.
+
* configure.in (nss-crypt check): Use AC_LANG_PROGRAM.
* configure: Regenerated.
View
@@ -138,10 +138,16 @@ lib: $(common-objpfx)libc.so
lib: $(common-objpfx)linkobj/libc.so
-$(common-objpfx)linkobj/libc.so: $(elfobjdir)/soinit.os $(common-objpfx)linkobj/libc_pic.a $(elfobjdir)/sofini.os $(elfobjdir)/interp.os $(elfobjdir)/ld.so $(common-objpfx)shlib.lds $(common-objpfx)elf/ld.so
+$(common-objpfx)linkobj/libc.so: $(elfobjdir)/soinit.os \
+ $(common-objpfx)linkobj/libc_pic.a \
+ $(elfobjdir)/sofini.os \
+ $(elfobjdir)/interp.os \
+ $(elfobjdir)/ld.so \
+ $(common-objpfx)shlib.lds
$(build-shlib)
-$(common-objpfx)linkobj/libc_pic.a: $(common-objpfx)libc_pic.a $(common-objpfx)sunrpc/librpc_compat_pic.a
+$(common-objpfx)linkobj/libc_pic.a: $(common-objpfx)libc_pic.a \
+ $(common-objpfx)sunrpc/librpc_compat_pic.a
$(..)./scripts/mkinstalldirs $(common-objpfx)linkobj
(cd $(common-objpfx)linkobj; \
$(AR) x ../libc_pic.a; \
View
@@ -467,7 +467,6 @@ this is the first definition"));
else if (strncmp (&this_line[1], "delset", 6) == 0)
{
int cnt = sizeof ("delset");
- size_t set_number;
while (isspace (this_line[cnt]))
++cnt;
@@ -489,11 +488,8 @@ this is the first definition"));
++cnt;
if (cnt == start)
- {
- error_at_line (0, 0, fname, start_line,
- gettext ("illegal set number"));
- set_number = 0;
- }
+ error_at_line (0, 0, fname, start_line,
+ gettext ("illegal set number"));
else
{
const char *symbol;
@@ -506,7 +502,6 @@ this is the first definition"));
/* We have a symbolic set name. This name must
appear somewhere else in the catalogs read so
far. */
- set_number = 0;
for (runp = current->all_sets; runp != NULL;
runp = runp->next)
{
@@ -657,12 +652,10 @@ this is the first definition"));
else if (ident[0] != '\0')
{
struct message_list *runp;
- struct message_list *lastp;
/* Test whether the symbolic name was not used for
another message in this message set. */
runp = current->current_set->messages;
- lastp = NULL;
while (runp != NULL)
if (runp->symbol != NULL && strcmp (ident, runp->symbol) == 0)
break;
View
@@ -516,7 +516,7 @@ _dl_open (const char *file, int mode, const void *caller_dlopen, Lmid_t nsid,
if (__builtin_expect (nsid == LM_ID_NEWLM, 0))
{
/* Find a new namespace. */
- for (nsid = 1; nsid < GL(dl_nns); ++nsid)
+ for (nsid = 1; DL_NNS > 1 && nsid < GL(dl_nns); ++nsid)
if (GL(dl_ns)[nsid]._ns_loaded == NULL)
break;
@@ -528,8 +528,7 @@ _dl_open (const char *file, int mode, const void *caller_dlopen, Lmid_t nsid,
_dl_signal_error (EINVAL, file, NULL, N_("\
no more namespaces available for dlmopen()"));
}
-
- if (nsid == GL(dl_nns))
+ else if (nsid == GL(dl_nns))
{
__rtld_lock_initialize (GL(dl_ns)[nsid]._ns_unique_sym_table.lock);
++GL(dl_nns);
View
@@ -1,5 +1,5 @@
-/* Copyright (C) 1996, 1997, 1998, 1999, 2002, 2004, 2005, 2007
- Free Software Foundation, Inc.
+/* Copyright (C) 1996,1997,1998,1999,2002,2004,2005,2007,2011
+ 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
@@ -347,7 +347,6 @@ innetgr (const char *netgroup, const char *host, const char *user,
struct __netgrent entry;
int result = 0;
const char *current_group = netgroup;
- int real_entry = 0;
memset (&entry, '\0', sizeof (entry));
@@ -404,8 +403,6 @@ innetgr (const char *netgroup, const char *host, const char *user,
}
else
{
- real_entry = 1;
-
if ((entry.val.triple.host == NULL || host == NULL
|| __strcasecmp (entry.val.triple.host, host) == 0)
&& (entry.val.triple.user == NULL || user == NULL
View
@@ -748,20 +748,17 @@ mem1: saved_errno = errno;
p->fts_flags |= FTS_ISW;
#endif
-#if 0
/* Unreachable code. cderrno is only ever set to a nonnull
value if dirp is closed at the same time. But then we
cannot enter this loop. */
- if (cderrno) {
+ if (0 && cderrno) {
if (nlinks) {
p->fts_info = FTS_NS;
p->fts_errno = cderrno;
} else
p->fts_info = FTS_NSOK;
p->fts_accpath = cur->fts_accpath;
- } else
-#endif
- if (nlinks == 0
+ } else if (nlinks == 0
#if defined DT_DIR && defined _DIRENT_HAVE_D_TYPE
|| (nostat &&
dp->d_type != DT_DIR && dp->d_type != DT_UNKNOWN)
@@ -1987,7 +1987,6 @@ add_to_tablewc (uint32_t ch, struct element_t *runp)
{
/* As for the singlebyte table, we recognize sequences and
compress them. */
- struct element_t *lastp;
collidx_table_add (atwc.tablewc, ch,
-(obstack_object_size (atwc.extrapool)
@@ -2087,7 +2086,6 @@ add_to_tablewc (uint32_t ch, struct element_t *runp)
}
/* Next entry. */
- lastp = runp;
runp = runp->wcnext;
}
while (runp != NULL);
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-2006, 2007, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2006,2007,2009,2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.org>, 1995.
@@ -2209,7 +2209,6 @@ ctype_read (struct linereader *ldfile, struct localedef_t *result,
struct token *now;
enum token_t nowtok;
size_t cnt;
- struct charseq *last_seq;
uint32_t last_wch = 0;
enum token_t last_token;
enum token_t ellipsis_token;
@@ -2465,7 +2464,6 @@ ctype_read (struct linereader *ldfile, struct localedef_t *result,
}
else
last_str = NULL;
- last_seq = seq;
last_wch = wch;
memcpy (last_charcode, now->val.charcode.bytes, 16);
last_charcode_len = now->val.charcode.nbytes;
@@ -300,7 +300,6 @@ enlarge_archive (struct locarhandle *ah, const struct locarhead *head)
void *p;
unsigned int cnt, loccnt;
struct namehashent *oldnamehashtab;
- struct locrecent *oldlocrectab;
struct locarhandle new_ah;
size_t prefix_len = output_prefix ? strlen (output_prefix) : 0;
char archivefname[prefix_len + sizeof (ARCHIVE_NAME)];
@@ -431,8 +430,6 @@ enlarge_archive (struct locarhandle *ah, const struct locarhead *head)
still referenced and transfer it into the new file. */
oldnamehashtab = (struct namehashent *) ((char *) ah->addr
+ head->namehash_offset);
- oldlocrectab = (struct locrecent *) ((char *) ah->addr
- + head->locrectab_offset);
/* Sort the old locrec table in order of data position. */
struct oldlocrecent oldlocrecarray[head->namehash_size];
View
@@ -141,7 +141,7 @@ __vsyslog_chk(int pri, int flag, const char *fmt, va_list ap)
FILE *f;
char *buf = 0;
size_t bufsize = 0;
- size_t prioff, msgoff;
+ size_t msgoff;
#ifndef NO_SIGPIPE
struct sigaction action, oldaction;
int sigpipe;
@@ -192,7 +192,7 @@ __vsyslog_chk(int pri, int flag, const char *fmt, va_list ap)
else
{
__fsetlocking (f, FSETLOCKING_BYCALLER);
- prioff = fprintf (f, "<%d>", pri);
+ fprintf (f, "<%d>", pri);
(void) time (&now);
f->_IO_write_ptr += __strftime_l (f->_IO_write_ptr,
f->_IO_write_end
@@ -1,4 +1,5 @@
-/* Copyright (c) 1997, 1998, 2000, 2004, 2006 Free Software Foundation, Inc.
+/* Copyright (c) 1997,1998,2000,2004,2006,2011
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1997.
@@ -156,7 +157,7 @@ nis_print_group_entry (const_nis_name group)
{
fputs (_(" Implicit nonmembers:\n"), stdout);
for (i = 0; i < nomem_imp_cnt; ++i)
- printf ("\t%s\n", &mem_imp[i][3]);
+ printf ("\t%s\n", &nomem_imp[i][3]);
}
else
fputs (_(" No implicit nonmembers\n"), stdout);
@@ -1,4 +1,5 @@
-/* Copyright (C) 1996-1999, 2001-2006, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 1996-1999,2001-2006,2007,2011
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1996.
@@ -386,9 +387,6 @@ getpwent_next_nss_netgr (const char *name, struct passwd *result, ent_t *ent,
while (1)
{
- char *saved_cursor;
-
- saved_cursor = ent->netgrdata.cursor;
status = __internal_getnetgrent_r (&host, &user, &domain,
&ent->netgrdata, buffer, buflen,
errnop);
@@ -1,4 +1,5 @@
-/* Copyright (C) 1996-1999, 2001-2006, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 1996-1999,2001-2006,2007,2011
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1996.
@@ -344,10 +345,8 @@ getspent_next_nss_netgr (const char *name, struct spwd *result, ent_t *ent,
while (1)
{
- char *saved_cursor;
enum nss_status status;
- saved_cursor = ent->netgrdata.cursor;
status = __internal_getnetgrent_r (&host, &user, &domain,
&ent->netgrdata, buffer, buflen,
errnop);
View
@@ -190,7 +190,6 @@ cache_addhst (struct database_dyn *db, int fd, request_header *req,
size_t h_aliases_cnt;
uint32_t *h_aliases_len;
size_t h_addr_list_cnt;
- int addr_list_type;
char *addresses;
char *aliases;
char *key_copy = NULL;
@@ -409,9 +408,6 @@ cache_addhst (struct database_dyn *db, int fd, request_header *req,
+ total + req->key_len, MS_ASYNC);
}
- addr_list_type = (hst->h_length == NS_INADDRSZ
- ? GETHOSTBYADDR : GETHOSTBYADDRv6);
-
/* NB: the following code is really complicated. It has
seemlingly duplicated code paths which do the same. The
problem is that we always must add the hash table entry
View
@@ -1,6 +1,7 @@
#include <mcheck.h>
#include <regex.h>
#include <stdio.h>
+#include <stdlib.h>
#include <sys/types.h>
int
@@ -1,5 +1,5 @@
-/* Copyright (C) 1996, 1997, 1998, 1999, 2002, 2004, 2007, 2008
- Free Software Foundation, Inc.
+/* Copyright (C) 1996,1997,1998,1999,2002,2004,2007,2008,2011
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Extended from original form by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -293,7 +293,6 @@ getanswer_r (const querybuf *answer, int anslen, struct netent *result,
const unsigned char *cp = &answer->buf[HFIXEDSZ];
char **alias_pointer;
int have_answer;
- char *ans;
u_char packtmp[NS_MAXCDNAME];
if (question_count == 0)
@@ -328,7 +327,6 @@ getanswer_r (const querybuf *answer, int anslen, struct netent *result,
alias_pointer = result->n_aliases = &net_data->aliases[0];
*alias_pointer = NULL;
have_answer = 0;
- ans = NULL;
while (--answer_count >= 0 && cp < end_of_message)
{
@@ -351,7 +349,6 @@ getanswer_r (const querybuf *answer, int anslen, struct netent *result,
if (n < 0 || res_dnok (bp) == 0)
break;
cp += n;
- ans = strdupa (bp);
GETSHORT (type, cp);
GETSHORT (class, cp);
cp += INT32SZ; /* TTL */
View
@@ -1,4 +1,5 @@
-/* Copyright (C) 1993, 1995-2006, 2007, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 1993,1995-2006,2007,2009,2011
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David Mosberger (davidm@azstarnet.com).
@@ -461,7 +462,7 @@ _res_hconf_reorder_addrs (struct hostent *hp)
cleanup:
/* Release lock, preserve error value, and close socket. */
- save = errno;
+ errno = save;
num_ifs = new_num_ifs;
View
@@ -640,7 +640,6 @@ ___printf_fp (FILE *fp,
int exp10 = 0;
int explog = LDBL_MAX_10_EXP_LOG;
const struct mp_power *powers = &_fpioconst_pow10[explog + 1];
- mp_size_t used_limbs = fracsize - 1;
/* Now shift the input value to its right place. */
cy = __mpn_lshift (frac, fp_input, fracsize, to_shift);
@@ -762,7 +761,6 @@ ___printf_fp (FILE *fp,
fracsize = tmpsize - (i - 1);
}
}
- used_limbs = fracsize - 1;
}
}
--explog;
Oops, something went wrong.

0 comments on commit 5615eaf

Please sign in to comment.