How to check the never used variable?

Sun Studio 10thx
[30 byte] By [dyroroa] at [2007-11-27 7:07:04]
# 1

Hi

Like this?

> cat a.cpp

void f(int unused1)

{

int unused2;

}

> CC +w2 -c a.cpp

"a.cpp", line 3: Warning: unused2 is defined but not used.

"a.cpp", line 1: Warning: unused1 is defined but not used.

2 Warning(s) detected.

Paul

Paul_Floyda at 2007-7-12 18:58:24 > top of Java-index,Development Tools,Solaris and Linux Development Tools...