Skip to content

Commit

Permalink
cosmetic: remove a few warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-cellier-aka-nice committed Aug 7, 2016
1 parent 7c1f294 commit eb01b53
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions platforms/win32/plugins/SocketPlugin/sqWin32NewNet.c
Expand Up @@ -363,6 +363,7 @@ int win32DebugPrintSocketState(void) {
debugPrintSocket(pss);
pss = pss->next;
}
return 1;
}

static void debugCheckWatcherThreads(privateSocketStruct *pss, char* caller) {
Expand Down Expand Up @@ -1362,7 +1363,7 @@ void sqSocketCreateNetTypeSocketTypeRecvBytesSendBytesSemaIDReadSemaIDWriteSemaI
of windows get this done without failing. */
if(runningVista && socketType == TCPSocketType) {
unsigned int val = 65536;
setsockopt(newSocket, SOL_SOCKET, SO_RCVBUF, &val, sizeof(val));
setsockopt(newSocket, SOL_SOCKET, SO_RCVBUF, (char *)&val, sizeof(val));
}

/* initialize private socket structure */
Expand Down Expand Up @@ -1761,7 +1762,7 @@ sqInt sqSocketGetOptionsoptionNameStartoptionNameSizereturnedValue
if (opt->optType == 1) {
len= sizeof(optval);
if ((getsockopt(SOCKET(s), opt->optLevel, opt->optName,
(void*)&optval,&len)) < 0)
(char*)&optval,&len)) < 0)
{
/* printf("getsockopt() returned < 0\n"); */
goto barf;
Expand Down Expand Up @@ -2652,18 +2653,17 @@ sqInt sqSocketSendUDPToSizeDataBufCount(SocketPtr s, char *addr, sqInt addrSize,

sqInt sqSocketReceiveUDPDataBufCount(SocketPtr s, char *buf, sqInt bufSize)
{
int nRead;

if (SocketValid(s) && (UDPSocketType == s->socketType))
{
{
socklen_t saddrSize= sizeof(SOCKETPEER(s));
int nread= recvfrom(SOCKET(s), buf, bufSize, 0, &SOCKETPEER(s).sa, &saddrSize);
if (nread >= 0)
{
SOCKETPEERSIZE(s)= saddrSize;
return nread;
}
}
{
SOCKETPEERSIZE(s)= saddrSize;
return nread;
}
}
return 0;
}

#endif /* NO_NETWORK */

0 comments on commit eb01b53

Please sign in to comment.