Project

General

Profile

Bug #9171

lib/krb5: 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-22
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:

Description

Issue found by gcc 7 build:

    ../help.c:88:2: error: this statement may fall through [-Werror=implicit-fallthrough=]
      ss_page_stdin();
      ^~~~~~~~~~~~~~~
    ../help.c:89:5: note: here
         default:
         ^~~~~~~

    ../pager.c:55:3: error: this statement may fall through [-Werror=implicit-fallthrough=]
       ss_page_stdin();
       ^~~~~~~~~~~~~~~
    ../pager.c:56:2: note: here
      default:
      ^~~~~~~

    ../hash/hash_func.c:166:20: error: this statement may fall through [-Werror=implicit-fallthrough=]
     #define HASH4b   h = (h << 5) + h + *k++;
                      ~~^~~~~~~~~~~~~~~~~~~~
    ../hash/hash_func.c:167:15: note: in expansion of macro 'HASH4b'
     #define HASH4 HASH4b
                   ^~~~~~
    ../hash/hash_func.c:177:5: note: in expansion of macro 'HASH4'
         HASH4;
         ^~~~~
    ../hash/hash_func.c:178:3: note: here
       case 7:
       ^~~~
    ../hash/hash_func.c:166:20: error: this statement may fall through [-Werror=implicit-fallthrough=]
     #define HASH4b   h = (h << 5) + h + *k++;
                      ~~^~~~~~~~~~~~~~~~~~~~
    ../hash/hash_func.c:167:15: note: in expansion of macro 'HASH4b'
     #define HASH4 HASH4b
                   ^~~~~~
    ../hash/hash_func.c:179:5: note: in expansion of macro 'HASH4'
         HASH4;
         ^~~~~
    ../hash/hash_func.c:180:3: note: here
       case 6:
       ^~~~
    ../hash/hash_func.c:166:20: error: this statement may fall through [-Werror=implicit-fallthrough=]
     #define HASH4b   h = (h << 5) + h + *k++;
                      ~~^~~~~~~~~~~~~~~~~~~~
    ../hash/hash_func.c:167:15: note: in expansion of macro 'HASH4b'
     #define HASH4 HASH4b
                   ^~~~~~
    ../hash/hash_func.c:181:5: note: in expansion of macro 'HASH4'
         HASH4;
         ^~~~~
    ../hash/hash_func.c:182:3: note: here
       case 5:
       ^~~~
    ../hash/hash_func.c:166:20: error: this statement may fall through [-Werror=implicit-fallthrough=]
     #define HASH4b   h = (h << 5) + h + *k++;
                      ~~^~~~~~~~~~~~~~~~~~~~
    ../hash/hash_func.c:167:15: note: in expansion of macro 'HASH4b'
     #define HASH4 HASH4b
                   ^~~~~~
    ../hash/hash_func.c:183:5: note: in expansion of macro 'HASH4'
         HASH4;
         ^~~~~
    ../hash/hash_func.c:184:3: note: here
       case 4:
       ^~~~
    ../hash/hash_func.c:166:20: error: this statement may fall through [-Werror=implicit-fallthrough=]
     #define HASH4b   h = (h << 5) + h + *k++;
                      ~~^~~~~~~~~~~~~~~~~~~~
    ../hash/hash_func.c:167:15: note: in expansion of macro 'HASH4b'
     #define HASH4 HASH4b
                   ^~~~~~
    ../hash/hash_func.c:185:5: note: in expansion of macro 'HASH4'
         HASH4;
         ^~~~~
    ../hash/hash_func.c:186:3: note: here
       case 3:
       ^~~~
    ../hash/hash_func.c:166:20: error: this statement may fall through [-Werror=implicit-fallthrough=]
     #define HASH4b   h = (h << 5) + h + *k++;
                      ~~^~~~~~~~~~~~~~~~~~~~
    ../hash/hash_func.c:167:15: note: in expansion of macro 'HASH4b'
     #define HASH4 HASH4b
                   ^~~~~~
    ../hash/hash_func.c:187:5: note: in expansion of macro 'HASH4'
         HASH4;
         ^~~~~
    ../hash/hash_func.c:188:3: note: here
       case 2:
       ^~~~
    ../hash/hash_func.c:166:20: error: this statement may fall through [-Werror=implicit-fallthrough=]
     #define HASH4b   h = (h << 5) + h + *k++;
                      ~~^~~~~~~~~~~~~~~~~~~~
    ../hash/hash_func.c:167:15: note: in expansion of macro 'HASH4b'
     #define HASH4 HASH4b
                   ^~~~~~
    ../hash/hash_func.c:189:5: note: in expansion of macro 'HASH4'
         HASH4;
         ^~~~~
    ../hash/hash_func.c:190:3: note: here
       case 1:
       ^~~~

    ../kdb_db2.c:292:5: error: this statement may fall through [-Werror=implicit-fallthrough=]
      if (db != NULL)
         ^
    ../kdb_db2.c:294:5: note: here
         default:
         ^~~~~~~
    ../kdb_db2.c: In function 'krb5_db2_db_get_principal':
    ../kdb_db2.c:1006:9: error: this statement may fall through [-Werror=implicit-fallthrough=]
      retval = 0;
      ~~~~~~~^~~
    ../kdb_db2.c:1008:5: note: here
         case -1:
         ^~~~
    ../kdb_db2.c: In function 'krb5_db2_db_delete_principal':
    ../kdb_db2.c:1222:9: error: this statement may fall through [-Werror=implicit-fallthrough=]
      retval = KRB5_KDB_NOENTRY;
    ../kdb_db2.c:1224:5: note: here
         case -1:
         ^~~~

    ../adb_openclose.c:297:9: error: this statement may fall through [-Werror=implicit-fallthrough=]
        perm = 1;
        ~~~~~^~~
    ../adb_openclose.c:299:2: note: here
      case KRB5_DB_LOCKMODE_EXCLUSIVE:
      ^~~~
    ../adb_openclose.c: In function 'osa_adb_open_and_lock':
    ../adb_openclose.c:413:7: error: this statement may fall through [-Werror=implicit-fallthrough=]
        if (db->db != NULL)
           ^
    ../adb_openclose.c:415:6: note: here
          default:
          ^~~~~~~

    cc1: all warnings being treated as errors

History

#1

Updated by Electric Monk over 1 year ago

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

git commit 0b16192fc3f190a96eb5b0c4e1eb3018af728e39

commit  0b16192fc3f190a96eb5b0c4e1eb3018af728e39
Author: Toomas Soome <tsoome@me.com>
Date:   2018-02-27T01:44:06.000Z

    9171 lib/krb5: this statement may fall through
    Reviewed by: Sebastian Wiedenroth <sebastian.wiedenroth@skylime.net>
    Reviewed by: Andy Fiddaman <omnios@citrus-it.co.uk>
    Approved by: Gordon Ross <gwr@nexenta.com>

Also available in: Atom PDF