Project

General

Profile

Bug #9154

libldap5: this statement may fall through

Added by Toomas Soome over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
lib - userland libraries
Start date:
2018-02-20
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:

Description

Issue found by gcc 7 build:

    ../sources/ldap/ber/io.c:872:23: error: this statement may fall through [-Werror=implicit-fallthrough=]
       sb->sb_max_incoming = *((ber_uint_t *) value);
       ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
    ../sources/ldap/ber/io.c:874:2: note: here
      case LBER_SOCKBUF_OPT_TO_FILE:
      ^~~~

    ../sources/ldap/common/getdn.c:232:16: error: this statement may fall through [-Werror=implicit-fallthrough=]
       case '+': if ( nametype != LDAP_RDN ) break;
                    ^
    ../sources/ldap/common/getdn.c:233:3: note: here
       case ';':
       ^~~~
    ../sources/ldap/common/getdn.c:315:7: error: this statement may fall through [-Werror=implicit-fallthrough=]
        if ( state == OUTQUOTE ) {
           ^
    ../sources/ldap/common/getdn.c:319:3: note: here
       default:
       ^~~~~~~

    ../sources/ldap/common/ldaputf8.c:53:18: error: this statement may fall through [-Werror=implicit-fallthrough=]
           case 6: if ((*++next & 0xC0) != 0x80) break;
                      ^
    ../sources/ldap/common/ldaputf8.c:54:7: note: here
           case 5: if ((*++next & 0xC0) != 0x80) break;
           ^~~~
    ../sources/ldap/common/ldaputf8.c:54:18: error: this statement may fall through [-Werror=implicit-fallthrough=]
           case 5: if ((*++next & 0xC0) != 0x80) break;
                      ^
    ../sources/ldap/common/ldaputf8.c:55:7: note: here
           case 4: if ((*++next & 0xC0) != 0x80) break;
           ^~~~
    ../sources/ldap/common/ldaputf8.c:55:18: error: this statement may fall through [-Werror=implicit-fallthrough=]
           case 4: if ((*++next & 0xC0) != 0x80) break;
                      ^
    ../sources/ldap/common/ldaputf8.c:56:7: note: here
           case 3: if ((*++next & 0xC0) != 0x80) break;
           ^~~~
    ../sources/ldap/common/ldaputf8.c:56:18: error: this statement may fall through [-Werror=implicit-fallthrough=]
           case 3: if ((*++next & 0xC0) != 0x80) break;
                      ^
    ../sources/ldap/common/ldaputf8.c:57:7: note: here
           case 2: if ((*++next & 0xC0) != 0x80) break;
           ^~~~
    ../sources/ldap/common/ldaputf8.c:57:18: error: this statement may fall through [-Werror=implicit-fallthrough=]
           case 2: if ((*++next & 0xC0) != 0x80) break;
                      ^
    ../sources/ldap/common/ldaputf8.c:58:7: note: here
           case 1: ++next;
           ^~~~
    ../sources/ldap/common/ldaputf8.c: In function 'ldap_utf8copy':
    ../sources/ldap/common/ldaputf8.c:90:33: error: this statement may fall through [-Werror=implicit-fallthrough=]
           case 6: *dst++ = *s++; if ((*s & 0xC0) != 0x80) break;
                                     ^
    ../sources/ldap/common/ldaputf8.c:91:7: note: here
           case 5: *dst++ = *s++; if ((*s & 0xC0) != 0x80) break;
           ^~~~
    ../sources/ldap/common/ldaputf8.c:91:33: error: this statement may fall through -[Werror=implicit-fallthrough=]
           case 5: *dst++ = *s++; if ((*s & 0xC0) != 0x80) break;
                                     ^
    ../sources/ldap/common/ldaputf8.c:92:7: note: here
           case 4: *dst++ = *s++; if ((*s & 0xC0) != 0x80) break;
           ^~~~
    ../sources/ldap/common/ldaputf8.c:92:33: error: this statement may fall through [-Werror=implicit-fallthrough=]
           case 4: *dst++ = *s++; if ((*s & 0xC0) != 0x80) break;
                                     ^
    ../sources/ldap/common/ldaputf8.c:93:7: note: here
           case 3: *dst++ = *s++; if ((*s & 0xC0) != 0x80) break;
           ^~~~
    ../sources/ldap/common/ldaputf8.c:93:33: error: this statement may fall through [-Werror=implicit-fallthrough=]
           case 3: *dst++ = *s++; if ((*s & 0xC0) != 0x80) break;
                                     ^
    ../sources/ldap/common/ldaputf8.c:94:7: note: here
           case 2: *dst++ = *s++; if ((*s & 0xC0) != 0x80) break;
           ^~~~
    ../sources/ldap/common/ldaputf8.c:94:33: error: this statement may fall through [-Werror=implicit-fallthrough=]
           case 2: *dst++ = *s++; if ((*s & 0xC0) != 0x80) break;
                                     ^
    ../sources/ldap/common/ldaputf8.c:95:7: note: here
           case 1: *dst   = *s++;
           ^~~~

    ../sources/ldap/common/friendly.c:99:10: error: this statement may fall through [-Werror=implicit-fallthrough=]
           if ( !esc )
              ^
    ../sources/ldap/common/friendly.c:102:6: note: here
          default:
          ^~~~~~~

    cc1: all warnings being treated as errors

History

#1

Updated by Toomas Soome over 1 year ago

  • Description updated (diff)
#2

Updated by Electric Monk over 1 year ago

  • Status changed from In Progress to Closed
  • % Done changed from 90 to 100

git commit d7fdecd2374114124f192b3bfc84d2d294bb45ab

commit  d7fdecd2374114124f192b3bfc84d2d294bb45ab
Author: Toomas Soome <tsoome@me.com>
Date:   2018-02-22T15:59:31.000Z

    9154 libldap5: this statement may fall through
    Reviewed by: Sebastian Wiedenroth <sebastian.wiedenroth@skylime.net>
    Reviewed by: Jason King <jason.king@joyent.com>
    Approved by: Richard Lowe <richlowe@richlowe.net>

Also available in: Atom PDF