|
|
0c8692 |
From a194ecd1258b58a5fd42970bdb8f1bf4eead3b13 Mon Sep 17 00:00:00 2001
|
|
|
0c8692 |
From: Phil Sutter <phil@nwl.cc>
|
|
|
0c8692 |
Date: Wed, 13 Feb 2019 00:13:44 +0100
|
|
|
0c8692 |
Subject: [PATCH] src: Fix for implicit-fallthrough warnings
|
|
|
0c8692 |
|
|
|
0c8692 |
Mark fall through cases as such. Note that correctness of those fall
|
|
|
0c8692 |
throughs have not been verified.
|
|
|
0c8692 |
|
|
|
0c8692 |
Signed-off-by: Phil Sutter <phil@nwl.cc>
|
|
|
0c8692 |
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
|
|
0c8692 |
(cherry picked from commit e63c283c4e6a71df358bd12e4ba2fe49c1619d82)
|
|
|
0c8692 |
---
|
|
|
0c8692 |
include/jhash.h | 2 +-
|
|
|
0c8692 |
src/cache-ct.c | 2 ++
|
|
|
0c8692 |
src/cache-exp.c | 1 +
|
|
|
0c8692 |
src/tcp.c | 1 +
|
|
|
0c8692 |
4 files changed, 5 insertions(+), 1 deletion(-)
|
|
|
0c8692 |
|
|
|
0c8692 |
diff --git a/include/jhash.h b/include/jhash.h
|
|
|
0c8692 |
index d164e38bde7f6..9793452ebc23d 100644
|
|
|
0c8692 |
--- a/include/jhash.h
|
|
|
0c8692 |
+++ b/include/jhash.h
|
|
|
0c8692 |
@@ -106,7 +106,7 @@ static inline u32 jhash2(const u32 *k, u32 length, u32 initval)
|
|
|
0c8692 |
c += length * 4;
|
|
|
0c8692 |
|
|
|
0c8692 |
switch (len) {
|
|
|
0c8692 |
- case 2 : b += k[1];
|
|
|
0c8692 |
+ case 2 : b += k[1]; /* fall through */
|
|
|
0c8692 |
case 1 : a += k[0];
|
|
|
0c8692 |
};
|
|
|
0c8692 |
|
|
|
0c8692 |
diff --git a/src/cache-ct.c b/src/cache-ct.c
|
|
|
0c8692 |
index f86d143c8137d..abcfde4c8a260 100644
|
|
|
0c8692 |
--- a/src/cache-ct.c
|
|
|
0c8692 |
+++ b/src/cache-ct.c
|
|
|
0c8692 |
@@ -266,6 +266,7 @@ static int cache_ct_commit(struct cache *c, struct nfct_handle *h, int clientfd)
|
|
|
0c8692 |
STATE_SYNC(commit).stats.ok = c->stats.commit_ok;
|
|
|
0c8692 |
STATE_SYNC(commit).stats.fail = c->stats.commit_fail;
|
|
|
0c8692 |
STATE_SYNC(commit).clientfd = clientfd;
|
|
|
0c8692 |
+ /* fall through */
|
|
|
0c8692 |
case COMMIT_STATE_MASTER:
|
|
|
0c8692 |
STATE_SYNC(commit).current =
|
|
|
0c8692 |
hashtable_iterate_limit(c->h, &tmp,
|
|
|
0c8692 |
@@ -280,6 +281,7 @@ static int cache_ct_commit(struct cache *c, struct nfct_handle *h, int clientfd)
|
|
|
0c8692 |
}
|
|
|
0c8692 |
STATE_SYNC(commit).current = 0;
|
|
|
0c8692 |
STATE_SYNC(commit).state = COMMIT_STATE_RELATED;
|
|
|
0c8692 |
+ /* fall through */
|
|
|
0c8692 |
case COMMIT_STATE_RELATED:
|
|
|
0c8692 |
STATE_SYNC(commit).current =
|
|
|
0c8692 |
hashtable_iterate_limit(c->h, &tmp,
|
|
|
0c8692 |
diff --git a/src/cache-exp.c b/src/cache-exp.c
|
|
|
0c8692 |
index 9183b2c42d93f..63e344078a7c6 100644
|
|
|
0c8692 |
--- a/src/cache-exp.c
|
|
|
0c8692 |
+++ b/src/cache-exp.c
|
|
|
0c8692 |
@@ -236,6 +236,7 @@ cache_exp_commit(struct cache *c, struct nfct_handle *h, int clientfd)
|
|
|
0c8692 |
STATE_SYNC(commit).stats.ok = c->stats.commit_ok;
|
|
|
0c8692 |
STATE_SYNC(commit).stats.fail = c->stats.commit_fail;
|
|
|
0c8692 |
STATE_SYNC(commit).clientfd = clientfd;
|
|
|
0c8692 |
+ /* fall through */
|
|
|
0c8692 |
case COMMIT_STATE_MASTER:
|
|
|
0c8692 |
STATE_SYNC(commit).current =
|
|
|
0c8692 |
hashtable_iterate_limit(c->h, &tmp,
|
|
|
0c8692 |
diff --git a/src/tcp.c b/src/tcp.c
|
|
|
0c8692 |
index c8f254483aa35..91fe524542013 100644
|
|
|
0c8692 |
--- a/src/tcp.c
|
|
|
0c8692 |
+++ b/src/tcp.c
|
|
|
0c8692 |
@@ -300,6 +300,7 @@ ssize_t tcp_send(struct tcp_sock *m, const void *data, int size)
|
|
|
0c8692 |
/* we got connected :) */
|
|
|
0c8692 |
m->state = TCP_CLIENT_CONNECTED;
|
|
|
0c8692 |
}
|
|
|
0c8692 |
+ /* fall through */
|
|
|
0c8692 |
case TCP_CLIENT_CONNECTED:
|
|
|
0c8692 |
ret = sendto(m->fd, data, size, 0,
|
|
|
0c8692 |
(struct sockaddr *) &m->addr, m->sockaddr_len);
|
|
|
0c8692 |
--
|
|
|
0c8692 |
2.21.0
|
|
|
0c8692 |
|