Skip to content

Commit

Permalink
gcc: Cleaning up some warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Oct 3, 2011
1 parent b35c5b8 commit 28351c0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
5 changes: 2 additions & 3 deletions doomsday/engine/portable/src/gl_png.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,10 @@ unsigned char *PNG_Load(const char *fileName, int *width, int *height,
end_info = png_create_info_struct(png_ptr);
if(end_info)
{
if(!setjmp(png_jmpbuf(png_ptr)))
if(!setjmp(*(jmp_buf*)&png_jmpbuf(png_ptr))) // gcc: avoid compiler warning with cast
{
boolean canLoad;
boolean canLoad;

//png_init_io(png_ptr, file);
png_set_read_fn(png_ptr, file, my_read_data);

png_read_png(png_ptr, png_info,
Expand Down
2 changes: 1 addition & 1 deletion doomsday/engine/portable/src/p_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,7 @@ static void* getPtrToDBElm(valuedb_t *db, valuetype_t type, uint elmIdx)
Con_Error("getPtrToDBElm: Table for type %i not found.", (int) type);

// Sanity check: ensure the elmIdx is in bounds.
if(elmIdx < 0 || elmIdx >= tbl->numElms)
if(elmIdx >= tbl->numElms)
Con_Error("P_GetGMOByte: valueIdx out of bounds.");

switch(tbl->type)
Expand Down
2 changes: 0 additions & 2 deletions doomsday/plugins/common/src/hu_log.c
Original file line number Diff line number Diff line change
Expand Up @@ -635,8 +635,6 @@ DEFCC(CCmdLocalMessage);

// PRIVATE FUNCTION PROTOTYPES ---------------------------------------------

static void closeChat(void);

// EXTERNAL DATA DECLARATIONS ----------------------------------------------

// PUBLIC DATA DEFINITIONS -------------------------------------------------
Expand Down

0 comments on commit 28351c0

Please sign in to comment.