Remove set but unused variables in usr/src/cmd
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 over 2 years ago
- % Done changed from 90 to 100
- Status changed from New to Closed
commit d7c57852794a9ac50d4b6a9c4161cb10919658aa Author: Gary Mills <firstname.lastname@example.org> Date: 2017-08-27T01:12:13.000Z 8485 Remove set but unused variables in usr/src/cmd Reviewed by: Toomas Soome <email@example.com> Reviewed by: Andy Stormont <firstname.lastname@example.org> Reviewed by: Yuri Pankov <email@example.com> Approved by: Dan McDonald <firstname.lastname@example.org>