]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Remove duplicate initialization of field in nscd.
authorJoseph Myers <joseph@codesourcery.com>
Mon, 4 Feb 2019 14:48:43 +0000 (14:48 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Mon, 4 Feb 2019 14:49:37 +0000 (14:49 +0000)
I'm looking at the warnings from building glibc with -Wextra, to see
if we could use -Wextra by default, possibly with a few of its
warnings disabled, and so benefit from warnings in -Wextra but not in
-Wall.  (The vast bulk of the extra warnings so produced are from
-Wunused-parameter -Wsign-compare -Wmissing-field-initializers
-Wtype-limits, so I expect those would be disabled at least at first.)

Various miscellaneous warnings show up with -Wextra that it clearly
seems to make sense to fix independent of whether we add -Wextra to
the normal options for building glibc.  This patch fixes one:
"initialized field overwritten [-Woverride-init]" in nscd.

Tested for x86_64.

* nscd/connections.c (reqinfo): Initialize SHUTDOWN element only
once.

ChangeLog
nscd/connections.c

index ef9688627df533f0b8caf6b89da6fd8de423f3c1..d73c815c37351b007e7a54a8460ffb9917435546 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2019-02-04  Joseph Myers  <joseph@codesourcery.com>
+
+       * nscd/connections.c (reqinfo): Initialize SHUTDOWN element only
+       once.
+
 2019-02-04  Andreas Schwab  <schwab@suse.de>
 
        [BZ #16976]
index 61cf27e24c2f9be56fd8c32b4b68c79dacb4cdaf..a9bc00de9056c83b579c0fb7a1e29a9a98c6a5bb 100644 (file)
@@ -227,7 +227,6 @@ static struct
   [GETHOSTBYADDRv6] = { true, &dbs[hstdb] },
   [SHUTDOWN] = { false, NULL },
   [GETSTAT] = { false, NULL },
-  [SHUTDOWN] = { false, NULL },
   [GETFDPW] = { false, &dbs[pwddb] },
   [GETFDGR] = { false, &dbs[grpdb] },
   [GETFDHST] = { false, &dbs[hstdb] },