From 0698ad850316b243ff8ea129fce6a0ee24582ed0 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Wed, 1 Nov 2017 19:11:48 +1100 Subject: [PATCH] don't use the ERR macro as GCC 7 only does a partial static analysis which generates false positives for fallthrough. [RT #46115] --- lib/irs/getnameinfo.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/irs/getnameinfo.c b/lib/irs/getnameinfo.c index c5f987dd75..6e26e278fd 100644 --- a/lib/irs/getnameinfo.c +++ b/lib/irs/getnameinfo.c @@ -319,8 +319,13 @@ getnameinfo(const struct sockaddr *sa, IRS_GETNAMEINFO_SOCKLEN_T salen, case DNS_R_NOVALIDKEY: case DNS_R_NOVALIDDS: case DNS_R_NOVALIDSIG: - ERR(EAI_INSECUREDATA); - /* NOTREACHED */ + /* + * Don't use ERR as GCC 7 wants to raise a + * warning with ERR about possible falling + * through which is impossible. + */ + result = EAI_INSECUREDATA; + goto cleanup; default: ERR(EAI_FAIL); }