summaryrefslogtreecommitdiffstats
path: root/lib/jhash.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2017-07-14 16:48:01 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2017-07-14 16:59:43 +0200
commitacd738fc7f5a8ca637e691e45346d74a149b75c9 (patch)
tree62d1445b34e13fdfab132fa31cfb0ff9145b73ae /lib/jhash.c
parentMerge pull request #803 from opensourcerouting/redhat-doc-fixes-master (diff)
downloadfrr-acd738fc7f5a8ca637e691e45346d74a149b75c9.tar.xz
frr-acd738fc7f5a8ca637e691e45346d74a149b75c9.zip
*: fix GCC 7 switch/case fallthrough warnings
Need a comment on these. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'lib/jhash.c')
-rw-r--r--lib/jhash.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/jhash.c b/lib/jhash.c
index 6154c3463..33589b64e 100644
--- a/lib/jhash.c
+++ b/lib/jhash.c
@@ -74,24 +74,34 @@ jhash (const void *key, u_int32_t length, u_int32_t initval)
{
case 11:
c += ((u_int32_t) k[10] << 24);
+ /* fallthru */
case 10:
c += ((u_int32_t) k[9] << 16);
+ /* fallthru */
case 9:
c += ((u_int32_t) k[8] << 8);
+ /* fallthru */
case 8:
b += ((u_int32_t) k[7] << 24);
+ /* fallthru */
case 7:
b += ((u_int32_t) k[6] << 16);
+ /* fallthru */
case 6:
b += ((u_int32_t) k[5] << 8);
+ /* fallthru */
case 5:
b += k[4];
+ /* fallthru */
case 4:
a += ((u_int32_t) k[3] << 24);
+ /* fallthru */
case 3:
a += ((u_int32_t) k[2] << 16);
+ /* fallthru */
case 2:
a += ((u_int32_t) k[1] << 8);
+ /* fallthru */
case 1:
a += k[0];
};
@@ -129,6 +139,7 @@ jhash2 (const u_int32_t *k, u_int32_t length, u_int32_t initval)
{
case 2:
b += k[1];
+ /* fallthru */
case 1:
a += k[0];
};