[ros-dev] [ros-diffs] [cgutman] 44286: - Initialize SocketError to 0 to prevent a bogus error from GCC

Alex Ionescu ionucu at videotron.ca
Wed Nov 25 21:31:26 CET 2009


Microsoft deals with this often -- they even have a macro you should probably use:

//
// The following macro is used to satisfy the compiler. Note that the
// expressions/statements passed to this macro are not necessary for
// correctness, but without them the compiler cannot compile with W4.
//

#define SATISFY_OVERZEALOUS_COMPILER(X) X
You use it as such:

SATISFY_OVERZEALOUS_COMPILER (SocketError = 0);

On 2009-11-25, at 2:28 PM, Dmitry Gorbachev wrote:

> Notice that the warning is "may be used uninitialized" and not "is
> used uninitialized", so it is correct, in a sense.
> 
> _______________________________________________
> Ros-dev mailing list
> Ros-dev at reactos.org
> http://www.reactos.org/mailman/listinfo/ros-dev

Best regards,
Alex Ionescu

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-dev/attachments/20091125/c821f07a/attachment.htm 


More information about the Ros-dev mailing list