From 67560734daab81c050a13d3b435d7eca4442c199 Mon Sep 17 00:00:00 2001 From: Xavier Simonart Date: Tue, 8 Oct 2019 17:54:22 -0400 Subject: Fix compatibility with GCC 6 and earlier fb0c44a fixed compilation on GCC 8 by using: 1) #pragma GCC diagnostic ignored "-Wstringop-truncation" 2) __attribute__ ((fallthrough)); However, -Wstringop-truncation has only been introduced in GCC 8 and __attribute__ ((fallthrough)) has only been introduced in GCC 7. Hence they caused Warnings/Errors on earlier versions. Comments about fallthough (see https://developers.redhat.com/blog/2017/03/10/wimplicit-fallthrough-in-gcc-7/) can be used on GCC 8 to prevent fall through warnings Signed-off-by: Xavier Simonart Change-Id: I6f22e023191bbf22d8b01f1812061795a6494134 --- VNFs/DPPD-PROX/parse_utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'VNFs/DPPD-PROX/parse_utils.c') diff --git a/VNFs/DPPD-PROX/parse_utils.c b/VNFs/DPPD-PROX/parse_utils.c index 84ff8cc9..af98ec2b 100644 --- a/VNFs/DPPD-PROX/parse_utils.c +++ b/VNFs/DPPD-PROX/parse_utils.c @@ -923,12 +923,12 @@ int parse_kmg(uint32_t* val, const char *str2) if (*val >> 22) return -2; *val <<= 10; - __attribute__ ((fallthrough)); + // __attribute__ ((fallthrough)); case 'M': if (*val >> 22) return -2; *val <<= 10; - __attribute__ ((fallthrough)); + // __attribute__ ((fallthrough)); case 'K': if (*val >> 22) return -2; -- cgit 1.2.3-korg