Project

General

Profile

Bug #9373

tbl: this statement may fall through

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

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

100%

Estimated time:
Difficulty:
Medium
Tags:

Description

issue found by gcc 7 build:

    t4.c:63:7: error: this statement may fall through [-Werror=implicit-fallthrough=]
        if (c != tab)
           ^
    t4.c:65:3: note: here
       case ' ': /* note this is also case tab */
       ^~~~
    t4.c:68:6: error: this statement may fall through [-Werror=implicit-fallthrough=]
        if(sawchar==0) continue;
          ^
    t4.c:69:3: note: here
       case ',':
       ^~~~
    t4.c:98:6: error: this statement may fall through [-Werror=implicit-fallthrough=]
        c += ('a'-'A');
        ~~^~~~~~~~~~~~
    t4.c:99:3: note: here
       case '_': if (c=='_') c= '-';
       ^~~~
    t4.c:99:16: error: this statement may fall through [-Werror=implicit-fallthrough=]
       case '_': if (c=='_') c= '-';
                    ^
    t4.c:100:3: note: here
       case '=': case '-':
       ^~~~

    t6.c:54:8: error: this statement may fall through [-Werror=implicit-fallthrough=]
         if (s>(char *)0 && s<(char *)128 && text)
            ^
    t6.c:61:4: note: here
        case 'n':
        ^~~~
    t6.c:62:8: error: this statement may fall through [-Werror=implicit-fallthrough=]
         if (table[ilin][icol].rcol!=0)
            ^
    t6.c:81:4: note: here
        case 'r':
        ^~~~

    t7.c:62:7: error: this statement may fall through [-Werror=implicit-fallthrough=]
        if (table[ldata][c].rcol)
           ^
    t7.c:65:3: note: here
       case 'c':
       ^~~~

    t8.c:150:7: error: this statement may fall through [-Werror=implicit-fallthrough=]
        if (table[nl][c].rcol)
           ^
    t8.c:176:3: note: here
       case 'c':
       ^~~~

    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 9807e1309317ed174757f9890d2b220d4fdeb3cf

commit  9807e1309317ed174757f9890d2b220d4fdeb3cf
Author: Toomas Soome <tsoome@me.com>
Date:   2018-04-06T19:44:16.000Z

    9373 tbl: this statement may fall through
    Reviewed by: Yuri Pankov <yuripv@yuripv.net>
    Reviewed by: Andy Fiddaman <omnios@citrus-it.co.uk>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom PDF