RAD Studio
ContentsIndex
PreviousUpNext
W8080: 'identifier' is declared but never used (C++)

(Command-line option to display warning: -wuse) 

The specified identifier was never used. This message can occur in the case of either local or static variables. It occurs when the source file declares the named local or static variable as part of the block just ending, but the variable was never used. 

In the case of local variables, this warning occurs when the compiler encounters the closing brace of the compound statement or function. In the case of static variables, this warning occurs when the compiler encounters the end of the source file. 

For example:

// Need to compile with -w to make this warning show up!

 

#pragma option -w

 

int foo()

 

{

 

        int x;

 

        return 0;

 

}
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!