9271 uts/i86pc: this statement may fall through

Review Request #947 - Created March 12, 2018 and submitted

Information
Toomas Soome
illumos-gate
9271
1341e86...
Reviewers
general
../../i86pc/os/trap.c:610:4: error: this statement may fall through [-Werror=implicit-fallthrough=]
    (void) die(type, rp, addr, cpuid);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../i86pc/os/trap.c:614:2: note: here
  case T_PGFLT:  /* system page fault */
  ^~~~

../../i86pc/os/trap.c: In function 'dump_ttrace':
../../i86pc/os/trap.c:2161:10: error: this statement may fall through [-Werror=implicit-fallthrough=]
      sys = &sysent[rec->ttr_sysnum];
      ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
../../i86pc/os/trap.c:2168:5: note: here
     case TT_SYSC:
     ^~~~

../../i86pc/boot/boot_console.c:507:3: error: this statement may fall through [-Werror=implicit-fallthrough=]
   ++p;
   ^~~
../../i86pc/boot/boot_console.c:508:2: note: here
  default:
  ^~~~~~~
../../i86pc/boot/boot_console.c:525:3: error: this statement may fall through [-Werror=implicit-fallthrough=]
   ++p;
   ^~~
../../i86pc/boot/boot_console.c:526:2: note: here
  default:
  ^~~~~~~

../../common/disp/cmt.c: In function 'pg_cmt_lineage_validate':
../../common/disp/cmt.c:1887:6: error: this statement may fall through [-Werror=implicit-fallthrough=]
   if (((pghw_t *)pg)->pghw_hw == PGHW_CHIP) {
      ^
../../common/disp/cmt.c:1894:2: note: here
  case CMT_LINEAGE_NON_PROMOTABLE:
  ^~~~

../../common/os/lgrp.c:3726:6: error: this statement may fall through [-Werror=implicit-fallthrough=]
   if (lgrp != lgrp_root) {
      ^
../../common/os/lgrp.c:3735:2: note: here
  case LGRP_MEM_POLICY_RANDOM:
  ^~~~
../../common/os/lgrp.c:3785:8: error: this statement may fall through [-Werror=implicit-fallthrough=]
   stat = LGRP_NUM_RANDOM_PROC;
   ~~~~~^~~~~~~~~~~~~~~~~~~~~~
../../common/os/lgrp.c:3788:2: note: here
  case LGRP_MEM_POLICY_RANDOM_PSET:
  ^~~~

cc1: all warnings being treated as errors

  

Issues

  • 1
  • 0
  • 0
  • 1
Description From Last Updated
Can you please elaborate on why this functional change correct and what effects it will have, if any? Hans Rosenfeld Hans Rosenfeld
Toomas Soome
Yuri Pankov
Yuri Pankov
Andy Fiddaman
Toomas Soome
Review request changed

Status: Closed (submitted)

Hans Rosenfeld

   
usr/src/uts/i86pc/os/trap.c (Diff revision 2)
 
 
 
 
 
 
 
 
 
 
 
 

Can you please elaborate on why this functional change correct and what effects it will have, if any?

  1. No effect - we don't build with __i386 defined anymore, the only real change here is spaces added to fallthrough comment to make gcc happy.

  2. Thanks for the clarification, I'll go ahead and approve this. For the future I'd prefer if we could keep removal of dead code separate from fixing warnings.

Loading...