From: Tom de Vries <tdevries@suse.de>
To: Jakub Jelinek <jakub@redhat.com>
Cc: Mark Wielaard <mark@klomp.org>, dwz@sourceware.org
Subject: [PATCH] Backport "libiberty: Fix -Wimplicit-fallthrough warnings"
Date: Tue, 01 Jan 2019 00:00:00 -0000 [thread overview]
Message-ID: <bb59e88e-5555-6585-5408-5eefc9592db7@suse.de> (raw)
In-Reply-To: <20190316175245.GB2435@wildebeest.org>
[-- Attachment #1: Type: text/plain, Size: 345 bytes --]
[ 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
[-- Attachment #2: 0001-Backport-libiberty-Fix-Wimplicit-fallthrough-warnings.patch --]
[-- Type: text/x-patch, Size: 1761 bytes --]
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 <tdevries@suse.de>
Port from gcc repo trunk:
2016-11-02 Mark Wielaard <mjw@redhat.com>
* 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 */
}
next prev parent reply other threads:[~2019-03-16 18:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-01 0:00 Added a buildbot for dwz Tom de Vries
2019-01-01 0:00 ` Mark Wielaard
2019-01-01 0:00 ` Tom de Vries
2019-01-01 0:00 ` Mark Wielaard
2019-01-01 0:00 ` Tom de Vries [this message]
2019-01-01 0:00 ` [PATCH] Backport "libiberty: Fix -Wimplicit-fallthrough warnings" Jakub Jelinek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bb59e88e-5555-6585-5408-5eefc9592db7@suse.de \
--to=tdevries@suse.de \
--cc=dwz@sourceware.org \
--cc=jakub@redhat.com \
--cc=mark@klomp.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).