some warnings fixed in the sockets code
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6605 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -653,7 +653,7 @@ bool wxSocketBase::_Wait(long seconds,
|
|||||||
{
|
{
|
||||||
m_connected = FALSE;
|
m_connected = FALSE;
|
||||||
m_establishing = FALSE;
|
m_establishing = FALSE;
|
||||||
return (flags & GSOCK_LOST_FLAG);
|
return (flags & GSOCK_LOST_FLAG) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wait more?
|
// Wait more?
|
||||||
|
@@ -37,7 +37,6 @@
|
|||||||
|
|
||||||
#endif /* __GSOCKET_STANDALONE__ */
|
#endif /* __GSOCKET_STANDALONE__ */
|
||||||
|
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@@ -51,6 +50,11 @@
|
|||||||
#define SOCKLEN_T int
|
#define SOCKLEN_T int
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
/* using FD_SET results in this warning */
|
||||||
|
#pragma warning(disable:4127) /* conditional expression is constant */
|
||||||
|
#endif /* Visual C++ */
|
||||||
|
|
||||||
#define CLASSNAME "_GSocket_Internal_Window_Class"
|
#define CLASSNAME "_GSocket_Internal_Window_Class"
|
||||||
#define WINDOWNAME "_GSocket_Internal_Window_Name"
|
#define WINDOWNAME "_GSocket_Internal_Window_Name"
|
||||||
|
|
||||||
@@ -397,7 +401,7 @@ GSocketError GSocket_SetServer(GSocket *sck)
|
|||||||
if ((bind(sck->m_fd, sck->m_local->m_addr, sck->m_local->m_len) != 0) ||
|
if ((bind(sck->m_fd, sck->m_local->m_addr, sck->m_local->m_len) != 0) ||
|
||||||
(getsockname(sck->m_fd,
|
(getsockname(sck->m_fd,
|
||||||
sck->m_local->m_addr,
|
sck->m_local->m_addr,
|
||||||
&sck->m_local->m_len) != 0) ||
|
(SOCKLEN_T *)&sck->m_local->m_len) != 0) ||
|
||||||
(listen(sck->m_fd, 5) != 0))
|
(listen(sck->m_fd, 5) != 0))
|
||||||
{
|
{
|
||||||
closesocket(sck->m_fd);
|
closesocket(sck->m_fd);
|
||||||
@@ -668,7 +672,7 @@ GSocketError GSocket_SetNonOriented(GSocket *sck)
|
|||||||
if ((bind(sck->m_fd, sck->m_local->m_addr, sck->m_local->m_len) != 0) ||
|
if ((bind(sck->m_fd, sck->m_local->m_addr, sck->m_local->m_len) != 0) ||
|
||||||
(getsockname(sck->m_fd,
|
(getsockname(sck->m_fd,
|
||||||
sck->m_local->m_addr,
|
sck->m_local->m_addr,
|
||||||
&sck->m_local->m_len) != 0))
|
(SOCKLEN_T *)&sck->m_local->m_len) != 0))
|
||||||
{
|
{
|
||||||
closesocket(sck->m_fd);
|
closesocket(sck->m_fd);
|
||||||
sck->m_fd = INVALID_SOCKET;
|
sck->m_fd = INVALID_SOCKET;
|
||||||
@@ -1446,6 +1450,10 @@ unsigned short GAddress_INET_GetPort(GAddress *address)
|
|||||||
* -------------------------------------------------------------------------
|
* -------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#pragma warning(disable:4100) /* unreferenced formal parameter */
|
||||||
|
#endif /* Visual C++ */
|
||||||
|
|
||||||
GSocketError _GAddress_Init_UNIX(GAddress *address)
|
GSocketError _GAddress_Init_UNIX(GAddress *address)
|
||||||
{
|
{
|
||||||
assert (address != NULL);
|
assert (address != NULL);
|
||||||
|
Reference in New Issue
Block a user