From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30010 invoked by alias); 16 Mar 2019 18:00:24 -0000 Mailing-List: contact dwz-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Post: List-Help: List-Subscribe: Sender: dwz-owner@sourceware.org Received: (qmail 29837 invoked by uid 89); 16 Mar 2019 18:00:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.100.2 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.9 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS autolearn=ham version=3.3.1 spammy= X-Spam-Status: No, score=-24.9 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on sourceware.org X-Spam-Level: X-HELO: mx1.suse.de X-Virus-Scanned: by amavisd-new at test-mx.suse.de Subject: [PATCH] Backport "libiberty: Fix -Wimplicit-fallthrough warnings" To: Jakub Jelinek Cc: Mark Wielaard , dwz@sourceware.org References: <61673a59-1da8-2a7f-e15e-14ff05874a39@suse.de> <20190316163108.GA2435@wildebeest.org> <20190316175245.GB2435@wildebeest.org> From: Tom de Vries Message-ID: Date: Tue, 01 Jan 2019 00:00:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 MIME-Version: 1.0 In-Reply-To: <20190316175245.GB2435@wildebeest.org> Content-Type: multipart/mixed; boundary="------------0464E7BC3B02F94C72258887" Content-Language: en-US X-SW-Source: 2019-q1/txt/msg00140.txt.bz2 This is a multi-part message in MIME format. --------------0464E7BC3B02F94C72258887 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Content-length: 345 [ was: Re: Added a buildbot for dwz ] On 16-03-19 18:52, Mark Wielaard wrote: > On all buildbot workers make check is warning free. > > On some there are some warnings about hashtab.c (implicit-fallthrough). > If that file comes from libiberty maybe we can simply remerge it? I was about to propose this patch. OK for trunk? Thanks, - Tom --------------0464E7BC3B02F94C72258887 Content-Type: text/x-patch; name="0001-Backport-libiberty-Fix-Wimplicit-fallthrough-warnings.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename*0="0001-Backport-libiberty-Fix-Wimplicit-fallthrough-warnings.p"; filename*1="atch" Content-length: 1761 Backport "libiberty: Fix -Wimplicit-fallthrough warnings" Backport gcc repo commit r241864 to fix implicit fallthrough warnings in hashtab.c. 2019-03-16 Tom de Vries Port from gcc repo trunk: 2016-11-02 Mark Wielaard * hashtab.c (iterative_hash): Add fall through comments. --- hashtab.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/hashtab.c b/hashtab.c index b775d25..a1da33e 100644 --- a/hashtab.c +++ b/hashtab.c @@ -749,17 +749,17 @@ iterative_hash (const void *k_in /* the key */, c += length; switch(len) /* all the case statements fall through */ { - case 11: c+=((hashval_t)k[10]<<24); - case 10: c+=((hashval_t)k[9]<<16); - case 9 : c+=((hashval_t)k[8]<<8); + case 11: c+=((hashval_t)k[10]<<24); /* fall through */ + case 10: c+=((hashval_t)k[9]<<16); /* fall through */ + case 9 : c+=((hashval_t)k[8]<<8); /* fall through */ /* the first byte of c is reserved for the length */ - case 8 : b+=((hashval_t)k[7]<<24); - case 7 : b+=((hashval_t)k[6]<<16); - case 6 : b+=((hashval_t)k[5]<<8); - case 5 : b+=k[4]; - case 4 : a+=((hashval_t)k[3]<<24); - case 3 : a+=((hashval_t)k[2]<<16); - case 2 : a+=((hashval_t)k[1]<<8); + case 8 : b+=((hashval_t)k[7]<<24); /* fall through */ + case 7 : b+=((hashval_t)k[6]<<16); /* fall through */ + case 6 : b+=((hashval_t)k[5]<<8); /* fall through */ + case 5 : b+=k[4]; /* fall through */ + case 4 : a+=((hashval_t)k[3]<<24); /* fall through */ + case 3 : a+=((hashval_t)k[2]<<16); /* fall through */ + case 2 : a+=((hashval_t)k[1]<<8); /* fall through */ case 1 : a+=k[0]; /* case 0: nothing left to add */ } --------------0464E7BC3B02F94C72258887--