8499 ficl: this statement may fall through

Review Request #627 — Created July 15, 2017 and submitted

tsoome
illumos-gate
8499
cf494fe...
general
/code/illumos-gate/usr/src/common/ficl/vm.c:149:4: error: this statement may fall through [-Werror=implicit-fallthrough=]
    ficlVmOptimizeJumpToJump(vm, destination);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/code/illumos-gate/usr/src/common/ficl/vm.c:150:3: note: here
   case ficlInstructionBranchParen:
   ^~~~

/code/illumos-gate/usr/src/common/ficl/primitives.c:419:10: error: this statement may fall through [-Werror=implicit-fallthrough=]
     base = 16;
     ~~~~~^~~~
/code/illumos-gate/usr/src/common/ficl/primitives.c:420:4: note: here
    case 'u':
    ^~~~
/code/illumos-gate/usr/src/common/ficl/primitives.c:422:21: error: this statement may fall through [-Werror=implicit-fallthrough=]
     unsignedInteger = 1; /* true */
     ~~~~~~~~~~~~~~~~^~~
/code/illumos-gate/usr/src/common/ficl/primitives.c:423:4: note: here
    case 'd':
    ^~~~
/code/illumos-gate/usr/src/common/ficl/primitives.c:439:18: error: this statement may fall through [-Werror=implicit-fallthrough=]
     actualLength = 1;
     ~~~~~~~~~~~~~^~~
/code/illumos-gate/usr/src/common/ficl/primitives.c:440:4: note: here
    default:
    ^~~~~~~

/code/illumos-gate/usr/src/common/ficl/emu/loader_emu.c:1148:12: error: this statement may fall through [-Werror=implicit-fallthrough=]
   subtopic = strdup(argv[2]);
   ~~~~~~~~~^~~~~~~~~~~~~~~~~
/code/illumos-gate/usr/src/common/ficl/emu/loader_emu.c:1149:2: note: here
  case 2:
  ^~~~

/code/illumos-gate/usr/src/common/ficl/float.c:294:7: error: this statement may fall through [-Werror=implicit-fallthrough=]
    if (c == '+') {
       ^
/code/illumos-gate/usr/src/common/ficl/float.c:302:3: note: here
   case FPS_ININT:
   ^~~~
/code/illumos-gate/usr/src/common/ficl/float.c:339:14: error: this statement may fall through [-Werror=implicit-fallthrough=]
    } else if (c == '+') {
              ^
/code/illumos-gate/usr/src/common/ficl/float.c:347:3: note: here
   case FPS_INEXP:
   ^~~~

cc1: all warnings being treated as errors


  • 0
  • 0
  • 4
  • 0
  • 4
Description From Last Updated
yuripv
  1. 
      
    1. Note: the / FALLTHROUH / is the construct to silence gcc 7, and it is a bit sensitive about where it can appear. However apparently we can use the additional comment after it and before case statement.

  2. usr/src/common/ficl/float.c (Diff revision 1)
     
     

    Don't need this anymore?

  3. usr/src/common/ficl/float.c (Diff revision 1)
     
     

    Incorrectly indented?

  4. usr/src/common/ficl/float.c (Diff revision 1)
     
     

    Don't need this anymore?

  5. usr/src/common/ficl/float.c (Diff revision 1)
     
     

    Incorrectly indented?

  6. 
      
tsoome
yuripv
  1. Ship It!
  2. 
      
marcel
  1. 
      
  2. usr/src/common/ficl/vm.c (Diff revision 2)
     
     

    It looks like most (if not all) breaks in switch/case blocks are not indented properly.

    (Shouldn't pbchk report that?)

  3. 
      
jbk
  1. Ship It!
  2. 
      
tsoome
Review request changed

Status: Closed (submitted)

Loading...