W8080 'identifier' is declared but never used (C++)

From RAD Studio
Jump to: navigation, search

Go Up to Compiler Errors And Warnings (C++) Index

(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;
}