8734 prof: variable 's_inv' set but not used

Review Request #685 — Created Oct. 27, 2017 and submitted

tsoome
illumos-gate
8734
0276a27...
general
../common/prof.c: In function 'main':
../common/prof.c:355:7: error: variable 's_inv' set but not used [-Werror=unused-but-set-variable]
  long s_inv; /* Inverse: i_inv(i) = */
       ^~~~~
cc1: all warnings being treated as errors


seeemef@mac.com
  1. LGTM

  2. 
      
jgmills
  1. I'd recommend that you move the line:

    s_inv = pc_m/n_pc;

    down inside the OLD_DEBUG macro. That's the only place where the variable is used. Then, enclose the declaration of the variable inside another instance of the same macro. With those changes, the unused variable error message should disappear under all conditions.

    1. To be really honest, all those OLD_DEBUG instances should just be burned out, but not this time:) But actually there is no need for this variable at all.

  2. 
      
tsoome
yuripv
  1. Ship It!
  2. 
      
seeemef@mac.com
  1. Still LGTM

  2. 
      
jgmills
  1. Looks good to me.

  2. 
      
tsoome
Review request changed

Status: Closed (submitted)

Loading...