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