From e23fb140fa58e223a341cc8a57209bd35985a63b Mon Sep 17 00:00:00 2001 From: Michal Nowak Date: Mon, 30 May 2022 15:49:34 +0200 Subject: [PATCH] Fix statement may fall through warnings in dlz_ldap_dynamic.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit dlz_ldap_dynamic.c: In function ‘dlz_create’: dlz_ldap_dynamic.c:971:20: warning: this statement may fall through [-Wimplicit-fallthrough=] 971 | if (result != ISC_R_SUCCESS) { | ^ dlz_ldap_dynamic.c:974:9: note: here 974 | case 11: | ^~~~ dlz_ldap_dynamic.c:976:20: warning: this statement may fall through [-Wimplicit-fallthrough=] 976 | if (result != ISC_R_SUCCESS) { | ^ dlz_ldap_dynamic.c:979:9: note: here 979 | case 10: | ^~~~ dlz_ldap_dynamic.c:980:20: warning: this statement may fall through [-Wimplicit-fallthrough=] 980 | if (strlen(argv[9]) > 0) { | ^ dlz_ldap_dynamic.c:987:9: note: here 987 | case 9: | ^~~~ (cherry picked from commit 99912ed2f727c87c7f1e0f0062205857951d029a) --- contrib/dlz/modules/ldap/dlz_ldap_dynamic.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/contrib/dlz/modules/ldap/dlz_ldap_dynamic.c b/contrib/dlz/modules/ldap/dlz_ldap_dynamic.c index 48f4b63262..ce1c50c44a 100644 --- a/contrib/dlz/modules/ldap/dlz_ldap_dynamic.c +++ b/contrib/dlz/modules/ldap/dlz_ldap_dynamic.c @@ -971,11 +971,13 @@ dlz_create(const char *dlzname, unsigned int argc, char *argv[], void **dbdata, if (result != ISC_R_SUCCESS) { goto cleanup; } + FALLTHROUGH; case 11: result = dlz_ldap_checkURL(ldap, argv[10], 3, "all nodes"); if (result != ISC_R_SUCCESS) { goto cleanup; } + FALLTHROUGH; case 10: if (strlen(argv[9]) > 0) { result = dlz_ldap_checkURL(ldap, argv[9], 3, @@ -984,6 +986,7 @@ dlz_create(const char *dlzname, unsigned int argc, char *argv[], void **dbdata, goto cleanup; } } + FALLTHROUGH; case 9: result = dlz_ldap_checkURL(ldap, argv[8], 3, "lookup"); if (result != ISC_R_SUCCESS) {