Project

General

Profile

Actions

Bug #9376

closed

sendmail: this statement may fall through

Added by Toomas Soome over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
cmd - userland programs
Start date:
2018-03-28
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

issue found by gcc 7 build:

    hash/hash_func.c:118:17: error: this statement may fall through [-Werror=implicit-fallthrough=]
     #define HASHC n = *k++ + 65599 * n
                   ~~^~~~~~~~~~~~~~~~~~
    hash/hash_func.c:126:4: note: in expansion of macro 'HASHC'
        HASHC;
        ^~~~~
    hash/hash_func.c:127:2: note: here
      case 7:
      ^~~~
    hash/hash_func.c:118:17: error: this statement may fall through [-Werror=implicit-fallthrough=]
     #define HASHC n = *k++ + 65599 * n
                   ~~^~~~~~~~~~~~~~~~~~
    hash/hash_func.c:128:4: note: in expansion of macro 'HASHC'
        HASHC;
        ^~~~~
    hash/hash_func.c:129:2: note: here
      case 6:
      ^~~~
    hash/hash_func.c:118:17: error: this statement may fall through [-Werror=implicit-fallthrough=]
     #define HASHC n = *k++ + 65599 * n
                   ~~^~~~~~~~~~~~~~~~~~
    hash/hash_func.c:130:4: note: in expansion of macro 'HASHC'
        HASHC;
        ^~~~~
    hash/hash_func.c:131:2: note: here
      case 5:
      ^~~~
    hash/hash_func.c:118:17: error: this statement may fall through [-Werror=implicit-fallthrough=]
     #define HASHC n = *k++ + 65599 * n
                   ~~^~~~~~~~~~~~~~~~~~
    hash/hash_func.c:132:4: note: in expansion of macro 'HASHC'
        HASHC;
        ^~~~~
    hash/hash_func.c:133:2: note: here
      case 4:
      ^~~~
    hash/hash_func.c:118:17: error: this statement may fall through [-Werror=implicit-fallthrough=]
     #define HASHC n = *k++ + 65599 * n
                   ~~^~~~~~~~~~~~~~~~~~
    hash/hash_func.c:134:4: note: in expansion of macro 'HASHC'
        HASHC;
        ^~~~~
    hash/hash_func.c:135:2: note: here
      case 3:
      ^~~~
    hash/hash_func.c:118:17: error: this statement may fall through [-Werror=implicit-fallthrough=]
     #define HASHC n = *k++ + 65599 * n
                   ~~^~~~~~~~~~~~~~~~~~
    hash/hash_func.c:136:4: note: in expansion of macro 'HASHC'
        HASHC;
        ^~~~~
    hash/hash_func.c:137:2: note: here
      case 2:
      ^~~~
    hash/hash_func.c:118:17: error: this statement may fall through [-Werror=implicit-fallthrough=]
     #define HASHC n = *k++ + 65599 * n
                   ~~^~~~~~~~~~~~~~~~~~
    hash/hash_func.c:138:4: note: in expansion of macro 'HASHC'
        HASHC;
        ^~~~~
    hash/hash_func.c:139:2: note: here
      case 1:
      ^~~~
    hash/hash_func.c: In function '__ham_func4':
    hash/hash_func.c:166:18: 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:175:4: note: in expansion of macro 'HASH4'
        HASH4;
        ^~~~~
    hash/hash_func.c:176:2: note: here
      case 7:
      ^~~~
    hash/hash_func.c:166:18: 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:4: note: in expansion of macro 'HASH4'
        HASH4;
        ^~~~~
    hash/hash_func.c:178:2: note: here
      case 6:
      ^~~~
    hash/hash_func.c:166:18: 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:4: note: in expansion of macro 'HASH4'
        HASH4;
        ^~~~~
    hash/hash_func.c:180:2: note: here
      case 5:
      ^~~~
    hash/hash_func.c:166:18: 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:4: note: in expansion of macro 'HASH4'
        HASH4;
        ^~~~~
    hash/hash_func.c:182:2: note: here
      case 4:
      ^~~~
    hash/hash_func.c:166:18: 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:4: note: in expansion of macro 'HASH4'
        HASH4;
        ^~~~~
    hash/hash_func.c:184:2: note: here
      case 3:
      ^~~~
    hash/hash_func.c:166:18: 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:4: note: in expansion of macro 'HASH4'
        HASH4;
        ^~~~~
    hash/hash_func.c:186:2: note: here
      case 2:
      ^~~~
    hash/hash_func.c:166:18: 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:4: note: in expansion of macro 'HASH4'
        HASH4;
        ^~~~~
    hash/hash_func.c:188:2: note: here
      case 1:
      ^~~~

    queue.c:4470:20: error: this statement may fall through [-Werror=implicit-fallthrough=]
        e->e_deliver_by = strtol(&buf[3], NULL, 10);
        ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
    queue.c:4472:5: note: here
         case '$':  /* define macro */
         ^~~~

    domain.c:1023:8: error: this statement may fall through [-Werror=implicit-fallthrough=]
         if (**dp != '\0' && HasWildcardMX)
            ^
    domain.c:1049:6: note: here
          case T_AAAA:
          ^~~~

    alias.c:974:8: error: this statement may fall through [-Werror=implicit-fallthrough=]
         if (stat(buf, &st) < 0 && errno == ENOENT)
            ^
    alias.c:993:6: note: here
          default:
          ^~~~~~~

    praliases.c:165:4: error: this statement may fall through [-Werror=implicit-fallthrough=]
        for (p = b; p != NULL; )
        ^~~
    praliases.c:221:5: note: here
         default:
         ^~~~~~~

    mailstats.c:183:7: error: this statement may fall through [-Werror=implicit-fallthrough=]
        if (sfile == NULL)
           ^
    mailstats.c:186:5: note: here
         default:
         ^~~~~~~

    mail.local.c:1143:6: error: this statement may fall through [-Werror=implicit-fallthrough=]
       if (bouncequota)
          ^
    mail.local.c:1151:2: note: here
      case EAGAIN:  /* Resource temporarily unavailable */
      ^~~~

    makemap.c:258:7: error: this statement may fall through [-Werror=implicit-fallthrough=]
        if (strncasecmp(b, " TrustedUser", 12) == 0 &&
           ^
    makemap.c:295:5: note: here
         default:
         ^~~~~~~

    editmap.c:233:7: error: this statement may fall through [-Werror=implicit-fallthrough=]
        if (strncasecmp(b, " TrustedUser", 12) == 0 &&
           ^
    editmap.c:268:5: note: here
         default:
         ^~~~~~~

    cc1: all warnings being treated as errors

Actions #1

Updated by Electric Monk over 5 years ago

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

git commit fec46055b92c6c6721fc6698843744a264e6ca70

commit  fec46055b92c6c6721fc6698843744a264e6ca70
Author: Toomas Soome <tsoome@me.com>
Date:   2018-06-20T15:32:17.000Z

    9376 sendmail: this statement may fall through
    Reviewed by: Andy Fiddaman <af@citrus-it.net>
    Reviewed by: Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>
    Approved by: Robert Mustacchi <rm@joyent.com>

Actions

Also available in: Atom PDF