]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fix statement may fall through warnings in dlz_ldap_dynamic.c
authorMichal Nowak <mnowak@isc.org>
Mon, 30 May 2022 13:49:34 +0000 (15:49 +0200)
committerMichal Nowak <mnowak@isc.org>
Wed, 23 Nov 2022 16:17:15 +0000 (17:17 +0100)
    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:
          |         ^~~~

contrib/dlz/modules/ldap/dlz_ldap_dynamic.c

index 48f4b632623aba5261aeabae67fc8022783993c2..ce1c50c44a3a4ba07e9857b707972fac1d3aa76a 100644 (file)
@@ -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) {