RAD Studio
ContentsIndex
PreviousUpNext
W8081: Void functions may not return a value

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

Your source file declared the current function as returning void, but the compiler encountered a return statement with a value. The value of the return statement will be ignored. 

 

// This HAS to be in a "C" file.  In a "C++" file this would be an error

 

void foo()

 

{

 

        return 0;       // Can't return a value from a void function

 

} 
Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!