don't use the ERR macro as GCC 7 only does a partial static analysis which generates false positives for fallthrough. [RT #46115]

(cherry picked from commit 0698ad8503)
This commit is contained in:
Mark Andrews
2017-11-01 19:11:48 +11:00
parent 89f63e9e10
commit 1668c3da6b

View File

@@ -327,8 +327,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);
}