From patchwork Tue Sep 15 18:56:03 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mark Wielaard X-Patchwork-Id: 518086 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 6764114018C for ; Wed, 16 Sep 2015 04:56:14 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=thPks0NU; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:subject:from:to:cc:date:in-reply-to:references :content-type:content-transfer-encoding:mime-version; q=dns; s= default; b=tEjkl1FM4zSoNHzx8BOAFDBAOE5N2iF9T8Ct3nhvq6AGIBG5bNq+h fpjBmNyKIB/CT3Ua8OebqaXyRu0ewPK4OCwUnDcbje4m3guAerkqxmGV0eASizB0 o6L/PEDqaC+6TfPpqj1fsa4ag07yWWugomPcKxRtyN4kTZaVDkq8y4= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:subject:from:to:cc:date:in-reply-to:references :content-type:content-transfer-encoding:mime-version; s=default; bh=LNepSYvtzyEue1DhpaTjk91MmbA=; b=thPks0NUUhA/xhLSHpKqwElrCCro 8gDmFC5+96cqANzz/ovnqoEwKX69GxchRcYCiGsObrmprBxkwzZMkD5kEzh280T6 y1gT0zOQoiRTspSWnudL8yqfQPjnTeW862G9QMaEw9kpV5XAo7JrPBo2xJB2srBx BSB3TG165L+8APM= Received: (qmail 57467 invoked by alias); 15 Sep 2015 18:56:07 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 57453 invoked by uid 89); 15 Sep 2015 18:56:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.7 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, SPF_HELO_PASS, T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 15 Sep 2015 18:56:06 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id 22A34157761; Tue, 15 Sep 2015 18:56:05 +0000 (UTC) Received: from bordewijk.wildebeest.org (ovpn-116-48.ams2.redhat.com [10.36.116.48]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t8FIu3hN012786 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 15 Sep 2015 14:56:04 -0400 Received: by bordewijk.wildebeest.org (Postfix, from userid 1000) id 73FBF8145851; Tue, 15 Sep 2015 20:56:03 +0200 (CEST) Message-ID: <1442343363.8165.358.camel@bordewijk.wildebeest.org> Subject: Re: [PATCH] PR28901 -Wunused-variable ignores unused const initialised variables From: Mark Wielaard To: sellcey@imgtec.com Cc: Jakub Jelinek , Bernd Schmidt , Manuel =?ISO-8859-1?Q?L=F3pez-Ib=E1=F1ez?= , GCC Patches Date: Tue, 15 Sep 2015 20:56:03 +0200 In-Reply-To: <1442342011.8165.354.camel@bordewijk.wildebeest.org> References: <55F67C3F.40503@redhat.com> <1442336535.16610.41.camel@ubuntu-sellcey> <20150915171021.GF1847@tucnak.redhat.com> <1442337649.16610.45.camel@ubuntu-sellcey> <1442342011.8165.354.camel@bordewijk.wildebeest.org> Mime-Version: 1.0 On Tue, 2015-09-15 at 20:33 +0200, Mark Wielaard wrote: > I build glibc and found 9 unused variables. They all look like they are > really not used in the code, so they can all just be removed. Someone of > course should double check they aren't unused by accident before > committing upstream. For the record there was one other issue with building glibc with current GCC6 was: tst-endian.c: In function ‘do_test’: tst-endian.c:22:30: error: self-comparison always evaluates to false [-Werror=tautological-compare] if (htole16 (le16toh (i)) != i) ^ which is fixed by: diff --git a/string/tst-endian.c b/string/tst-endian.c index 8684bb2..9d64a87 100644 --- a/string/tst-endian.c +++ b/string/tst-endian.c @@ -9,7 +9,7 @@ do_test (void) { int result = 0; - for (uint64_t i = 0; i < (~UINT64_C (0)) >> 2; i = (i << 1) + 3) + for (volatile uint64_t i = 0; i < (~UINT64_C (0)) >> 2; i = (i << 1) + 3) { if (i < UINT64_C (65536)) {