Skip to content

Commit

Permalink
Fixed various compilation issues thrown when compiling with SUN Studi…
Browse files Browse the repository at this point in the history
…o. Thanks yagisan.
  • Loading branch information
danij committed May 31, 2009
1 parent 1aeaf9c commit 38cf331
Show file tree
Hide file tree
Showing 11 changed files with 163 additions and 155 deletions.
3 changes: 0 additions & 3 deletions doomsday/engine/portable/include/gl_tga.h
Expand Up @@ -35,9 +35,6 @@
extern "C" {
#endif

typedef unsigned char uchar; // 1 byte
typedef unsigned short uint16_t; // 2 bytes

enum {
TGA_FALSE,
TGA_TRUE,
Expand Down
2 changes: 2 additions & 0 deletions doomsday/engine/portable/src/gl_tga.c
Expand Up @@ -47,6 +47,8 @@

// TYPES -------------------------------------------------------------------

typedef unsigned char uchar; // 1 byte

typedef struct {
uchar idLength; // Identification field size in bytes.
uchar colorMapType; // Type of the color map.
Expand Down
2 changes: 1 addition & 1 deletion doomsday/engine/portable/src/r_things.c
Expand Up @@ -507,7 +507,7 @@ void R_PreInitSprites(void)
Sys_GetSeconds() - startTime));
}

static void initSpriteDefs(const spriterecord_t** sprRecords, int num)
static void initSpriteDefs(spriterecord_t* const * sprRecords, int num)
{
numSprites = num;
if(sprites)
Expand Down
2 changes: 1 addition & 1 deletion doomsday/plugins/common/src/hu_inventory.c
Expand Up @@ -27,7 +27,7 @@
* hu_inventory.c: Heads-up display(s) for the player inventory.
*/

#if __JHERETIC__ || __JHEXEN__
#if defined(__JHERETIC__) || defined(__JHEXEN__)

// HEADER FILES ------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion doomsday/plugins/common/src/p_inventory.c
Expand Up @@ -28,7 +28,7 @@
* in the HUD code.
*/

#if __JHERETIC__ || __JHEXEN__ || __JDOOM64__
#if defined(__JHERETIC__) || defined(__JHEXEN__) || defined(__JDOOM64__)

// HEADER FILES ------------------------------------------------------------

Expand Down
1 change: 0 additions & 1 deletion doomsday/plugins/common/src/p_svtexarc.c
Expand Up @@ -221,7 +221,6 @@ material_t* SV_GetArchiveMaterial(int archivenum, int group)
return P_ToPtr(DMU_MATERIAL,
P_MaterialNumForName(matArchive.table[archivenum].name,
matArchive.table[archivenum].mnamespace));
return NULL;
}

void SV_WriteMaterialArchive(void)
Expand Down
4 changes: 2 additions & 2 deletions doomsday/plugins/common/src/p_xgline.c
Expand Up @@ -1449,14 +1449,14 @@ int C_DECL XLTrav_ChangeWallMaterial(linedef_t* line, boolean dummy,
// Is there a sidedef?
if(info->iparm[2])
{
if(P_GetPtrp(line, DMU_BACK_SECTOR) < 0)
if(!P_GetPtrp(line, DMU_BACK_SECTOR))
return true;

side = P_GetPtrp(line, DMU_SIDEDEF1);
}
else
{
if(P_GetPtrp(line, DMU_FRONT_SECTOR) < 0)
if(!P_GetPtrp(line, DMU_FRONT_SECTOR))
return true;

side = P_GetPtrp(line, DMU_SIDEDEF0);
Expand Down
4 changes: 2 additions & 2 deletions doomsday/plugins/dehread/src/dehmain.c
Expand Up @@ -5,7 +5,7 @@
*
*\author Copyright © 2003-2009 Jaakko Keränen <jaakko.keranen@iki.fi>
*\author Copyright © 2006-2009 Daniel Swanson <danij@dengine.net>
*\author Copyright © 1998-2003 Randy Heit. <rheit@iastate.edu> (Zdoom)
*\author Copyright © 1998-2003 Randy Heit <rheit@iastate.edu> (Zdoom)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -755,7 +755,7 @@ int PatchThing(int thingy)
{ "Death", 5, SN_DEATH },
{ "Exploding", 9, SN_XDEATH },
{ "Respawn", 7, SN_RAISE },
{ NULL, -1 }
{ NULL, 0 }
};
// Flags can be specified by name (a .bex extension):
static const struct {
Expand Down
4 changes: 2 additions & 2 deletions doomsday/plugins/jdoom/src/p_oldsvg.c
Expand Up @@ -874,11 +874,11 @@ void SV_v19_LoadGame(char *savename)
// Check version.
memset(vcheck, 0, sizeof(vcheck));
sprintf(vcheck, "version %i", SAVE_VERSION);
if(strcmp(savePtr, vcheck))
if(strcmp((const char*) savePtr, vcheck))
{
int saveVer;

sscanf(savePtr, "version %i", &saveVer);
sscanf((const char*) savePtr, "version %i", &saveVer);
if(saveVer >= SAVE_VERSION_BASE)
{
// Must be from the wrong game.
Expand Down

0 comments on commit 38cf331

Please sign in to comment.