9153 cfgadm_plugins: this statement may fall through

Review Request #886 — Created Feb. 20, 2018 and submitted

tsoome
illumos-gate
9153
69a3d04...
general
../common/cfga.c: In function 'cfga_private_func':
../common/cfga.c:1108:14: error: this statement may fall through [-Werror=implicit-fallthrough=]
    } else if (ptr == '\0') {
              ^
../common/cfga.c:1114:3: note: here
   default:
   ^~~~~~~

../common/shp.c: In function 'cfga_private_func':
../common/shp.c:980:14: error: this statement may fall through [-Werror=implicit-fallthrough=]
    } else if (ptr == '\0') {
              ^
../common/shp.c:986:3: note: here
   default:
   ^~~~~~~

../common/ap_seq.c: In function 'ap_seq_exec':
../common/ap_seq.c:330:7: error: this statement may fall through [-Werror=implicit-fallthrough=]
    if (!fastreboot_disabled &&
       ^
../common/ap_seq.c:338:3: note: here
   default:
   ^~~~~~~

cc1: all warnings being treated as errors


  • 0
  • 0
  • 0
  • 1
  • 1
Description From Last Updated
rejohnst
  1. Ship It!
  2. 
      
citrus
  1. 
      
  2. This doesn't actually fall-through.. it will either break or return above.
    Suggest break; here.

    1. Am, nop, it has 3 possible cases:

      1. if ptr is '=' we break/return from if body.
      2. else if ptr is '\0' we return
      3. and finally, for all other values we fall through and return an error.
    2. Ah yes, I see, sorry.

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

Status: Closed (submitted)

Loading...