Skip to content

Commit

Permalink
Mac OS X|Fixed: Various compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Mar 31, 2012
1 parent cdd972c commit e14784d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
4 changes: 4 additions & 0 deletions doomsday/engine/portable/src/dgl_common.c
Expand Up @@ -366,7 +366,11 @@ void GL_SetVSync(boolean on)
assert(context != 0);
if(context)
{
#ifdef MACOS_10_4
long params[1] = { on? 1 : 0 };
#else
GLint params[1] = { on? 1 : 0 };
#endif
CGLSetParameter(context, kCGLCPSwapInterval, params);
}
}
Expand Down
4 changes: 2 additions & 2 deletions doomsday/engine/portable/src/sys_network.c
Expand Up @@ -410,14 +410,14 @@ void N_ClientHandleResponseToInfoQuery(int nodeId, const byte *data, int size)
svNode->sock = 0;

// Did we receive what we expected to receive?
if(size >= 5 && !strncmp(data, "Info\n", 5))
if(size >= 5 && !strncmp((const char*)data, "Info\n", 5))
{
const char *ch;
ddstring_t *line;
ddstring_t* response = Str_New();

// Make a null-terminated copy of the response text.
Str_PartAppend(response, data, 0, size);
Str_PartAppend(response, (const char*)data, 0, size);

located.valid = true;

Expand Down
2 changes: 1 addition & 1 deletion doomsday/libdeng2/include/de/c_wrapper.h
Expand Up @@ -66,7 +66,7 @@ DENG2_PUBLIC void LegacyNetwork_GetPeerAddress(int socket, char* host, int hostM
DENG2_PUBLIC int LegacyNetwork_IsDisconnected(int socket);
DENG2_PUBLIC void LegacyNetwork_Close(int socket);

DENG2_PUBLIC int LegacyNetwork_Send(int socket, const unsigned char* data, int size);
DENG2_PUBLIC int LegacyNetwork_Send(int socket, const void *data, int size);
DENG2_PUBLIC unsigned char* LegacyNetwork_Receive(int socket, int* size);
DENG2_PUBLIC void LegacyNetwork_FreeBuffer(unsigned char* buffer);
DENG2_PUBLIC int LegacyNetwork_BytesReady(int socket);
Expand Down
5 changes: 3 additions & 2 deletions doomsday/libdeng2/src/c_wrapper.cpp
Expand Up @@ -154,9 +154,10 @@ void LegacyNetwork_Close(int socket)
DENG2_LEGACYNETWORK().close(socket);
}

int LegacyNetwork_Send(int socket, const unsigned char* data, int size)
int LegacyNetwork_Send(int socket, const void* data, int size)
{
return DENG2_LEGACYNETWORK().sendBytes(socket, de::ByteRefArray(data, size));
return DENG2_LEGACYNETWORK().sendBytes(
socket, de::ByteRefArray(reinterpret_cast<const de::IByteArray::Byte*>(data), size));
}

unsigned char* LegacyNetwork_Receive(int socket, int *size)
Expand Down

0 comments on commit e14784d

Please sign in to comment.