8498 ficl: variable 'count' might be clobbered by 'longjmp' or 'vfork'

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

tsoome
illumos-gate
8498
71f47a3...
general
/code/illumos-gate/usr/src/common/ficl/vm.c:255:6: error: variable 'count' might be clobbered by 'longjmp' or 'vfork' [-Werror=clobbered]
  int count;
      ^~~~~
cc1: all warnings being treated as errors


  • 0
  • 0
  • 4
  • 0
  • 4
Description From Last Updated
yuripv
  1. Ship It!
  2. 
      
marcel
  1. Ship It!
  2. 
      
vgusev
  1. 
      
  2. usr/src/common/ficl/vm.c (Diff revision 1)
     
     

    Could you, please, add comment here about 'volatile' and setjump ?

  3. 
      
tsoome
marcel
  1. 
      
  2. usr/src/common/ficl/vm.c (Diff revisions 1 - 2)
     
     

    Isn't pbchk reporting this line? :-)

    1. Yes, please, remove "trailing space".

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

    I think you should leave count as volatile to make the code correct. I'm okay with added -Wno-clobbered to silence gcc 4.4.

    1. hm, yes, thats correct.

  3. 
      
tsoome
marcel
  1. 
      
  2. usr/src/lib/libficl/Makefile.com (Diff revision 6)
     
     

    I think this comment should be reworded, since "if marked volatile" actually happened.

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

Status: Closed (submitted)

Loading...