RAD Studio
ContentsIndex
PreviousUpNext
W8004: 'identifier' is assigned a value that is never used (C++)

(Command-line option to suppress warning: -w-aus) 

The variable appears in an assignment, but is never used anywhere else in the function just ending. 

The warning is indicated only when the compiler encounters the closing brace. 

The #pragma warn -aus switch has function-level granularity. You cannot turn off this warning for individual variables within a function; it is either off or on for the whole function.

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