9068 libgen: this statement may fall through

Review Request #842 — Created Feb. 7, 2018 and submitted

tsoome
illumos-gate
9068
667fa41...
general
../common/gmatch.c:44:4: error: this statement may fall through [-Werror=implicit-fallthrough=]
  p += n
    ^
../common/gmatch.c:131:3: note: in expansion of macro 'Popwchar'
   Popwchar(p, c);
   ^~~~~~~~
../common/gmatch.c:133:2: note: here
  default:
  ^~~~~~~

../common/reg_compile.c:399:8: error: this statement may fall through [-Werror=implicit-fallthrough=]
     if (c >= '1' && c <= '9') {
        ^
../common/reg_compile.c:410:3: note: here
   defchar:
   ^~~~~~~
cc1: all warnings being treated as errors


citrus
  1. 
      
  2. usr/src/lib/libgen/common/gmatch.c (Diff revision 1)
     
     

    Using FALLTHROUGH would be consistent with your recent changes (and also more common in gate although it seems both are used)

    build:illumos:master% grep -r FALLTHRU usr | wc -l
         927
    build:illumos:master% grep -r FALLTHROUGH usr | wc -l
        1466
    
    1. Yes, thats reasonable.

  3. 
      
tsoome
citrus
  1. Ship It!
  2. 
      
yuripv
  1. 
      
  2. usr/src/lib/libgen/common/gmatch.c (Diff revision 2)
     
     

    Should the indentation be reduced here?

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

Status: Closed (submitted)

Loading...