RAD Studio |  |

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:

Copy Code

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

Copy Code

    #pragma option -w

Copy Code

    int foo()

Copy Code

    {

Copy Code

            int x;

Copy Code

            return 0;

Copy Code

    }

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