8848 hbaapi: variable set but not used

Review Request #774 — Created Nov. 21, 2017 and submitted

tsoome
illumos-gate
8848
8df760e...
general
../common/HBAAPILIB.c: In function 'HBA_LoadLibrary':
../common/HBAAPILIB.c:518:17: error: variable 'libversion' set but not used [-Werror=unused-but-set-variable]
     HBA_UINT32  libversion;
                 ^~~~~~~~~~
../common/HBAAPILIB.c: In function 'HBA_FreeLibrary':
../common/HBAAPILIB.c:877:17: error: variable 'status' set but not used [-Werror=unused-but-set-variable]
     HBA_STATUS  status;
                 ^~~~~~
cc1: all warnings being treated as errors


yuripv
  1. Ship It!
  2. 
      
jgmills
  1. For the libversion variable, you can do this instead:
    
    +#ifdef NOTDEF
         HBA_UINT32		libversion;
    +#endif
    
    Then, all you need to do is to move the lines:
    
    -	libversion = ((GetVersionFunc)());
    
    after these lines:
    
     #ifdef NOTDEF /* save for a later time... when it matters */
  2. 
      
tsoome
yuripv
  1. Ship It!
  2. 
      
jgmills
  1. Looks good to me.

  2. 
      
tsoome
Review request changed

Status: Closed (submitted)

Loading...