Skip to content

Commit

Permalink
Fixed compilation warnings
Browse files Browse the repository at this point in the history
Signed/unsigned mismatches.
  • Loading branch information
skyjake committed Sep 10, 2011
1 parent fe0477d commit 8918cc0
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 12 deletions.
2 changes: 1 addition & 1 deletion doomsday/engine/portable/include/dd_input.h
Expand Up @@ -193,7 +193,7 @@ void I_ClearDeviceContextAssociations(void);
void I_DeviceReset(uint ident);
inputdev_t *I_GetDevice(uint ident, boolean ifactive);
inputdev_t *I_GetDeviceByName(const char *name, boolean ifactive);
boolean I_ParseDeviceAxis(const char *str, uint *deviceID, uint *axis);
boolean I_ParseDeviceAxis(const char *str, uint *deviceID, int *axis);
inputdevaxis_t *I_GetAxisByID(inputdev_t *device, uint id);
int I_GetAxisByName(inputdev_t *device, const char *name);
int I_GetKeyByName(inputdev_t* device, const char* name);
Expand Down
13 changes: 8 additions & 5 deletions doomsday/engine/portable/src/dd_input.c
Expand Up @@ -436,7 +436,7 @@ int I_GetKeyByName(inputdev_t* device, const char* name)
*
* @return @c false, if the string is invalid.
*/
boolean I_ParseDeviceAxis(const char* str, uint* deviceID, uint* axis)
boolean I_ParseDeviceAxis(const char* str, uint* deviceID, int* axis)
{
char name[30], *ptr;
inputdev_t* device;
Expand All @@ -457,7 +457,7 @@ boolean I_ParseDeviceAxis(const char* str, uint* deviceID, uint* axis)
// The axis name.
if(*axis)
{
int a = I_GetAxisByName(device, ptr + 1);
int a = I_GetAxisByName(device, ptr + 1);
if((*axis = a) < 0)
return false;

Expand Down Expand Up @@ -1324,7 +1324,8 @@ static void I_PrintAxisConfig(inputdev_t *device, inputdevaxis_t *axis)

D_CMD(AxisPrintConfig)
{
uint deviceID, axisID;
uint deviceID;
int axisID;
inputdev_t *device;
inputdevaxis_t *axis;

Expand All @@ -1343,7 +1344,8 @@ D_CMD(AxisPrintConfig)

D_CMD(AxisChangeOption)
{
uint deviceID, axisID;
uint deviceID;
int axisID;
inputdev_t *device;
inputdevaxis_t *axis;

Expand Down Expand Up @@ -1376,7 +1378,8 @@ D_CMD(AxisChangeOption)

D_CMD(AxisChangeValue)
{
uint deviceID, axisID;
uint deviceID;
int axisID;
inputdev_t *device;
inputdevaxis_t *axis;

Expand Down
2 changes: 1 addition & 1 deletion doomsday/engine/portable/src/def_read.c
Expand Up @@ -453,7 +453,7 @@ static int ReadInt(int* dest, int unsign)
return false;
}

*dest = unsign ? strtoul(token, 0, 0) : strtol(token, 0, 0);
*dest = unsign? (int)strtoul(token, 0, 0) : strtol(token, 0, 0);
return true;
}

Expand Down
7 changes: 4 additions & 3 deletions doomsday/engine/portable/src/gl_texmanager.c
Expand Up @@ -336,11 +336,12 @@ int GL_InitPalettedTexture(void)
*/
void GL_LoadSystemTextures(void)
{
struct ddtexdef_s {
static const struct ddtexdef_s {
char name[9];
int id;
byte flags; // MATF_* flags
} static const ddtexdefs[NUM_DD_TEXTURES] =
}
ddtexdefs[NUM_DD_TEXTURES] =
{
{"DDT_UNKN", DDT_UNKNOWN},
{"DDT_MISS", DDT_MISSING},
Expand Down Expand Up @@ -1061,7 +1062,7 @@ DGLuint GL_PrepareLSTexture(lightingtexid_t which)
{ "radioOE", GL_CLAMP_TO_EDGE, GL_CLAMP_TO_EDGE }
};

if(novideo || which < 0 || which >= NUM_LIGHTING_TEXTURES)
if(novideo || (int)which < 0 || which >= NUM_LIGHTING_TEXTURES)
return 0;

if(!lightingTextures[which].tex)
Expand Down
2 changes: 1 addition & 1 deletion doomsday/engine/portable/src/net_ping.c
Expand Up @@ -125,7 +125,7 @@ void Net_SendPing(int player, int count)
void Net_PingResponse(void)
{
client_t* cl = &clients[netBuffer.player];
unsigned int time = Reader_ReadUInt32(msgReader);
int time = Reader_ReadUInt32(msgReader);

// Is this a response to our ping?
if(time == cl->ping.sent)
Expand Down
2 changes: 1 addition & 1 deletion doomsday/engine/portable/src/sys_network.c
Expand Up @@ -549,7 +549,7 @@ void N_SendDataBufferReliably(void *data, size_t size, nodeid_t destination)
(unsigned long) (size + 2), result) );
#endif

if(result != size + 2)
if((size_t)result != size + 2)
{
perror("Socket error");
}
Expand Down

0 comments on commit 8918cc0

Please sign in to comment.