From patchwork Fri Feb 1 17:39:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 1035036 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-99688-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="keS40RW/"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43rkrq6xqwz9s6w for ; Sat, 2 Feb 2019 04:40:11 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; q=dns; s=default; b=CFfi+7l0RpISxTqBa3bZAHGf0eAQ2 s5foYm+dbZmPzlxJQaj3BijtHp6xrGdkJ4IVJChUGArsYDUBzv+WkuuXgZ59j3Te khbvfI/PuAhMh35u667bDuq0jkRb2MPqDlaZAm75rVOa44We0tDjCF+2D29uKHBW mCnAP57AcdN2ms= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; s=default; bh=G95SjGNQwFUNKbOsZ9Yuqi3rMs0=; b=keS 40RW/z3D9zGZw6+l8CcDgL7jakMvbeq6JluedVsvT5v5TsxDE+as98XvQ33MfjGW dvyQU8RfrxeRZqQzdqYA07a2x5fOE9Ya+3ogjLFaEQ3+4ChGbk+Zl37fhBokW8cz oFIBgQlca51bwaDGaiFW7jafP3M5D2nikhxdduQc= Received: (qmail 22328 invoked by alias); 1 Feb 2019 17:40:06 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 22309 invoked by uid 89); 1 Feb 2019 17:40:06 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=dbs X-HELO: relay1.mentorg.com Date: Fri, 1 Feb 2019 17:39:59 +0000 From: Joseph Myers To: Subject: Remove duplicate initialization of field in nscd Message-ID: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 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. 2019-02-01 Joseph Myers * nscd/connections.c (reqinfo): Initialize SHUTDOWN element only once. diff --git a/nscd/connections.c b/nscd/connections.c index 61cf27e24c..a9bc00de90 100644 --- a/nscd/connections.c +++ b/nscd/connections.c @@ -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] },