Opened 18 years ago
Last modified 18 years ago
#819 closed Bug report
Server - AsyncSocketEx.cpp compiler warning.
|Reported by:||glenara||Owned by:|
|Keywords:||Cc:||glenara, Tim Kosse|
|Component version:||Operating system type:|
|Operating system version:|
When compiling the server the following warning occurs:
AsyncSocketEx.cpp(809) : warning C4552: '!=' :
operator has no effect; expected operator with side-effect
Isn't it true that the SOCKET_ERROR won't exist unless
the first part fails? If this is true, then shouldn't this be:
This removes the warning.
Change History (2)
comment:1 by , 18 years ago
comment:2 by , 18 years ago
I guess I worded that wrong! Since the function is not
returning anything (due to the nature of VERIFY) there is
nothing to compare SOCKET_ERROR against.
Anyway, I was wrong about how to remove the warning :(
To remove the warning we simply need to add an extra set of
I also tested it with the debug version (by creating an error)
and it works as expected.
SOCKET_ERROR is a constant and all the function does is to
assert in debug builds if the socket can't be closed.