8822 libsmbfs: variable set but not used

Review Request #749 — Created Nov. 19, 2017 and submitted

tsoome
illumos-gate
8822
d317c62...
general
/code/illumos-gate/usr/src/common/smbclnt/smbfs_ntacl.c:89:9: error: variable 'sz' set but not used [-Werror=unused-but-set-variable]
  size_t sz;
         ^~
/code/illumos-gate/usr/src/common/smbclnt/smbfs_ntacl.c: In function 'ifree_acl':
/code/illumos-gate/usr/src/common/smbclnt/smbfs_ntacl.c:310:9: error: variable 'sz' set but not used [-Werror=unused-but-set-variable]
  size_t sz;
         ^~
cc1: all warnings being treated as errors


  • 0
  • 0
  • 0
  • 1
  • 1
Description From Last Updated
tsoome
jgmills
  1. Looks good to me.

  2. 
      
rm
  1. 
      
  2. usr/src/common/smbclnt/smbfs_ntacl.c (Diff revision 2)
     
     
     
    Is there a reason we need to inline this function? Maybe the MALLOC and FREESZ should just be normal functions?
    1. I did use inline because it does mimic the macro behavior in this case - as FREESZ really is just wrapper for free() in userland and kmem_free() in kernel and normal function does not add any value for us. I believe, gcc would try to inline it anyhow (unless forbidden:)

    2. OK, I guess that's reasonable. Thanks for clarifying that. While I don't like it, I'm not sure there's a better way right now.

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

Status: Closed (submitted)

Loading...