[PATCH 5/5] lib/ipset.c: Fix a compilation failure when using --enable-debug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When using GCC8.2, since --enable-debug treats warnings as errors, the
compiler detects that a switch/case is falling through.

Since the fallthrough is intentional, we apply the attribute to indicate
to the compiler that this is correct behaviour.

Signed-off-by: Oliver Smith <oliver@xxxxxxxxxxxxxx>
---
 lib/ipset.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/ipset.c b/lib/ipset.c
index 4366e60..e5c7bda 100644
--- a/lib/ipset.c
+++ b/lib/ipset.c
@@ -1208,6 +1208,7 @@ ipset_parse_argv(struct ipset *ipset, int oargc, char *oargv[])
 				return ret;
 		}
 		/* Fall through to parse optional setname */
+		__attribute__ ((fallthrough));
 	case IPSET_CMD_DESTROY:
 	case IPSET_CMD_FLUSH:
 		/* Args: [setname] */
-- 
2.19.2




[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux