8843 libnls: variable 'version' set but not used

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

tsoome
illumos-gate
8843
ea5022c...
general
../common/nlsrequest.c: In function 'nlsrequest':
../common/nlsrequest.c:70:6: error: variable 'version' set but not used [-Werror=unused-but-set-variable]
  int version, ret;
      ^~~~~~~
cc1: all warnings being treated as errors


  • 0
  • 0
  • 3
  • 0
  • 3
Description From Last Updated
tsoome
yuripv
  1. 
      
  2. usr/src/lib/libnls/common/nlsrequest.c (Diff revision 1)
     
     

    / Find and skip "version" token /

  3. usr/src/lib/libnls/common/nlsrequest.c (Diff revision 1)
     
     

    Why comment it out?

  4. 
      
tsoome
rm
  1. 
      
  2. usr/src/lib/libnls/common/nlsrequest.c (Diff revision 3)
     
     
     
     
    Maybe we can phrase this comment as:
    
    'We ignore the version number here as we do not have any use for it. Previous versions of the code looked at it by calling atoi() on it, which did not mutate the actual string and did not use it.'
    
    Though I'm not sure how useful the comment about atoi is.
  3. 
      
tsoome
seeemef@mac.com
  1. LGTM

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

Status: Closed (submitted)

Loading...