9216 awk: this statement may fall through

Review Request #924 — Created Feb. 28, 2018 and submitted

tsoome
illumos-gate
9216
8170a49...
general
awk4.c: In function 'dosub':
awk4.c:247:3: error: this statement may fall through [-Werror=implicit-fallthrough=]
   awkerr(nomem);
   ^~~~~~~~~~~~~
awk4.c:248:2: note: here
  default:
  ^~~~~~~
awk4.c: In function 'f_split':
awk4.c:387:6: error: this statement may fall through [-Werror=implicit-fallthrough=]
   if (isstring(tnp->n_flags) && tnp->n_string==_null)
      ^
awk4.c:389:2: note: here
  default:
  ^~~~~~~

awk3.c: In function 'assign':
awk3.c:270:3: error: this statement may fall through [-Werror=implicit-fallthrough=]
   awkerr(gettext("cannot assign to function \"%s\""),
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       left->n_name);
       ~~~~~~~~~~~~~
awk3.c:273:2: note: here
  default:
  ^~~~~~~
awk3.c: In function 'action':
awk3.c:748:8: error: this statement may fall through [-Werror=implicit-fallthrough=]
     if (isstring(l->n_flags) &&
        ^
awk3.c:751:4: note: here
    default:
    ^~~~~~~
awk3.c:688:4: error: this statement may fall through [-Werror=implicit-fallthrough=]
    doend(act);
    ^~~~~~~~~~
awk3.c:691:3: note: here
   case RETURN:
   ^~~~

awk1.c: In function 'yylex':
awk1.c:558:8: error: this statement may fall through [-Werror=implicit-fallthrough=]
     if (nbrace != 0)
        ^
awk1.c:561:4: note: here
    default:
    ^~~~~~~
awk1.c: In function 'lexid':
awk1.c:797:4: error: this statement may fall through [-Werror=implicit-fallthrough=]
    ++inprint;
    ^~~~~~~~~
awk1.c:798:3: note: here
   default:
   ^~~~~~~

awk.h:57:18: error: this statement may fall through [-Werror=implicit-fallthrough=]
 #define FATAL ), error(1, errbuf)
                  ^~~~~~~~~~~~~~~~
b.c:640:23: note: in expansion of macro 'FATAL'
        lastre, prestr FATAL;
                       ^~~~~
b.c:642:2: note: here
  default:
  ^~~~~~~
cc1: all warnings being treated as errors


  • 0
  • 0
  • 2
  • 1
  • 3
Description From Last Updated
citrus
  1. 
      
  2. usr/src/cmd/awk/b.c (Diff revision 1)
     
     

    This feels like a /NOTREACHED/
    cf. line 582

    1. except it does not satisfy gcc...

  3. usr/src/cmd/awk_xpg4/awk.c (Diff revision 1)
     
     

    I suspect this file should not be here.

  4. usr/src/cmd/awk_xpg4/awk4.c (Diff revision 1)
     
     

    Could you drop this one now that awkerr is flagged as no-return?

  5. 
      
tsoome
citrus
  1. Ship It!
  2. 
      
jbk
  1. Ship It!
  2. 
      
seeemef@mac.com
  1. LGTM

  2. 
      
tsoome
Review request changed

Status: Closed (submitted)

Loading...