]> 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>
Mon, 5 Dec 2022 15:00:35 +0000 (16:00 +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:
          |         ^~~~

(cherry picked from commit 99912ed2f727c87c7f1e0f0062205857951d029a)

contrib/dlz/modules/ldap/dlz_ldap_dynamic.c

index 7f9231244ad37e5828afccbc48159fbbc69afcf3..eca49ffaf4bdbd8eeb9a186599f47598ed62bbf9 100644 (file)
@@ -998,11 +998,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,
@@ -1011,6 +1013,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) {