8724 libc: multiple variable set but not used errors

Review Request #681 — Created Oct. 19, 2017 and submitted

tsoome
illumos-gate
8724
f0f9883...
general
../port/fp/_base_sup.c:59:18: error: variable 'tstored' set but not used [-Werror=unused-but-set-variable]
  volatile double tstored;
                  ^~~~~~~

../port/print/doprnt.c: In function '_wndoprnt':
../port/print/doprnt.c:463:10: error: variable 'sec_display' set but not used [-Werror=unused-but-set-variable]
  ssize_t sec_display;
          ^~~~~~~~~~~
../port/print/doprnt.c:452:8: error: variable 'cp' set but not used [-Werror=unused-but-set-variable]
  char *cp;
        ^~

In file included from ../port/regex/regexec.c:123:0:
../port/regex/engine.c: In function 'sdissect':
../port/regex/engine.c:385:14: error: variable 'dp' set but not used [-Werror=unused-but-set-variable]
  const char *dp;
              ^~


  • 0
  • 0
  • 2
  • 0
  • 2
Description From Last Updated
yuripv
  1. 
      
  2. usr/src/lib/libc/port/regex/engine.c (Diff revision 1)
     
     

    Compiler needs to be smarter here, as dp is clearly used in assert().

    1. Makes me wonder if we're somehow building this with -DNDEBUG.
  3. 
      
yuripv
  1. Ship It!
  2. 
      
rm
  1. 
      
  2. usr/src/lib/libc/port/print/doprnt.c (Diff revision 1)
     
     
    It seems like we only use cp for an assignment at +1843. Is it being used elsewhere in a macro? If not, why not remove it?
  3. usr/src/lib/libc/port/print/doprnt.c (Diff revision 1)
     
     
    Does the compiler think this is unused becuse of it not being used under #ifdef WIDE?
  4. 
      
tsoome
rm
  1. Ship It!
  2. 
      
yuripv
  1. Ship It!
  2. 
      
tsoome
Review request changed

Status: Closed (submitted)

Loading...