From 222162ddab5d9135149dde12441542899de27e78 Mon Sep 17 00:00:00 2001 From: Marty Leisner Date: Tue, 6 Aug 2019 19:03:14 -0400 Subject: [PATCH] Need to disable -Wimplicit-fallthrough to complle (compiles, untested) --- src/glb-director/shared_opt.c | 4 ++++ src/glb-director/siphash24.c | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/glb-director/shared_opt.c b/src/glb-director/shared_opt.c index 46e9307..8669b01 100644 --- a/src/glb-director/shared_opt.c +++ b/src/glb-director/shared_opt.c @@ -47,6 +47,8 @@ void get_options(char *config_file, char *forwarding_table, int argc, {"forwarding-table", required_argument, NULL, 't'}, {"debug", no_argument, NULL, 'v'}, {NULL, 0, NULL, 0}}; +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wimplicit-fallthrough" while ((opt = getopt_long(argc, argv, ":c:t:v", long_options, NULL)) != -1) @@ -71,6 +73,8 @@ void get_options(char *config_file, char *forwarding_table, int argc, abort(); } +#pragma GCC diagnostic pop + glb_log_info("Using config: %s, Using forwarding table: %s,", config_file, forwarding_table); diff --git a/src/glb-director/siphash24.c b/src/glb-director/siphash24.c index ebe785c..6055754 100644 --- a/src/glb-director/siphash24.c +++ b/src/glb-director/siphash24.c @@ -110,7 +110,8 @@ int siphash(uint8_t *out, const uint8_t *in, uint64_t inlen, const uint8_t *k) v0 ^= m; } - +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wimplicit-fallthrough" switch (left) { case 7: b |= ((uint64_t)in[6]) << 48; @@ -131,6 +132,8 @@ int siphash(uint8_t *out, const uint8_t *in, uint64_t inlen, const uint8_t *k) break; } +#pragma GCC diagnostic pop + v3 ^= b; TRACE;