Actions
Bug #8485
closedRemove set but unused variables in usr/src/cmd
Start date:
2017-07-13
Due date:
% Done:
100%
Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:
External Bug:
Description
GCC-4.9.4, and probably later versions, identifies variables that are set but not otherwise used in source files, with an error message like this one:
uuglist.c: In function 'rproc': uuglist.c:132:6: error: variable 'na' set but not used [-Werror=unused-but-set-variable] int na; ^ cc1: all warnings being treated as errors
In a large number of cases, simply removing the offending variable will prevent this error, and permit the file to be compiled. In more complex cases, other means have to be considered instead.
Updated by Electric Monk about 6 years ago
- Status changed from New to Closed
- % Done changed from 90 to 100
git commit d7c57852794a9ac50d4b6a9c4161cb10919658aa
commit d7c57852794a9ac50d4b6a9c4161cb10919658aa Author: Gary Mills <gary_mills@fastmail.fm> Date: 2017-08-27T01:12:13.000Z 8485 Remove set but unused variables in usr/src/cmd Reviewed by: Toomas Soome <tsoome@me.com> Reviewed by: Andy Stormont <astormont@racktopsystems.com> Reviewed by: Yuri Pankov <yuripv@gmx.com> Approved by: Dan McDonald <danmcd@joyent.com>
Actions