8820 pam_modules: variable set but not used

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

tsoome
illumos-gate
8820
27fd497...
general
../sample_acct_mgmt.c:57:6: error: variable 'nowarn' set but not used [-Werror=unused-but-set-variable]
  int nowarn = 0;
      ^~~~~~
../sample_acct_mgmt.c:55:6: error: variable 'debug' set but not used [-Werror=unused-but-set-variable]
  int debug = 0;
      ^~~~~
cc1: all warnings being treated as errors


  • 0
  • 0
  • 0
  • 1
  • 1
Description From Last Updated
yuripv
  1. 
      
  2. As this is really an example code, may be just comment out those lines, leaving the comments above them, saying "These variables would be used in a real module".

    1. Well, I do not think making comments would make anything better there, IMO there is nothing wrong with attributes too:)

    2. It would make the lint ugliness go away! :-)

  3. 
      
yuripv
  1. Or even don't build this module at all??? :-)

    1. Thats another good point, but having the sample in tree does not exclude the clean build:) Still I would leave the build/packaging removal for someone other - as long with decision about what to do with PAM_SAMPLE(5).

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

Status: Closed (submitted)

Loading...