Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

check unused variable in C project

I developed new C project and I use some time variables to debug or to check value ...

I want to be sure if I don't forget any unused variable after achieving project.

there is a Linux utilities or command to do that ?

like image 532
Anis_Stack Avatar asked Dec 05 '13 15:12

Anis_Stack


1 Answers

Some compilers can issue a warning for you when an automatic variable is unused. Try

gcc -Wunused-variable
clang -Wunused-variable
like image 121
Sergey L. Avatar answered Oct 19 '22 06:10

Sergey L.