fix some simple compile warnings (some of them would be bugs on non-i386)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@424 4a71c877-e1ca-e34f-864e-861f7616d084
master
Angus Lees 2006-05-03 23:10:36 +00:00
parent e480791b8c
commit ef21733bf0
11 changed files with 14 additions and 32 deletions

View File

@ -97,7 +97,7 @@ int PHYSFSEXT_locateCorrectCase(char *buf)
if (*ptr == '\0')
return(0); /* Uh...I guess that's success. */
while (ptr = strchr(ptr + 1, '/'))
while ((ptr = strchr(ptr + 1, '/')))
{
*ptr = '\0'; /* block this path section off */
rc = locateOneElement(buf);

View File

@ -494,7 +494,6 @@ void SetMousePos(UDWORD nowt,UDWORD x,UDWORD y)
/* Sets the state of the mouse key to down */
void setMouseDown(MOUSE_KEY_CODE code)
{
Uint8 button;
SDL_Event event;
event.type = SDL_MOUSEBUTTONDOWN;
@ -509,7 +508,6 @@ void setMouseDown(MOUSE_KEY_CODE code)
/* Sets the state of the mouse key to up */
void setMouseUp(MOUSE_KEY_CODE code)
{
Uint8 button;
SDL_Event event;
event.type = SDL_MOUSEBUTTONUP;

View File

@ -53,7 +53,7 @@ CHEAT_ENTRY cheatCodes[] =
{"end of list",NULL}
};
unsigned char cheatString[255];
char cheatString[255];
unsigned char *xorString(unsigned char *string)
{
@ -84,9 +84,9 @@ BOOL getCheatCodeStatus( void )
BOOL attemptCheatCode( STRING *pName )
{
UDWORD index;
STRING errorString[255];
unsigned char *xored;
UDWORD index;
STRING errorString[255];
char *xored;
index = 0;

View File

@ -396,17 +396,6 @@ BOOL startTitleMenu(VOID)
}
static void frontEndCDOK( void )
{
changeTitleMode( g_tModeNext );
}
static void frontEndCDCancel( void )
{
changeTitleMode(TITLE);
}
BOOL runTitleMenu(VOID)
{
UDWORD id;
@ -1132,11 +1121,6 @@ BOOL runGameOptions2Menu(VOID)
// Game Options Menu
BOOL startGameOptions3Menu(VOID)
{
UDWORD w,h;
addBackdrop();
addTopForm();
addBottomForm();

View File

@ -175,7 +175,7 @@ BOOL Refreshing = FALSE;
UBYTE *DisplayBuffer;
SDWORD displayBufferSize;
UDWORD displayBufferSize;
//hides the power bar from the display - NB static function now

View File

@ -312,7 +312,7 @@ extern iIMDShape *pNewDesignIMD;
extern UBYTE *DisplayBuffer;
extern SDWORD displayBufferSize;
extern UDWORD displayBufferSize;
extern BOOL ClosingMessageView;

View File

@ -910,7 +910,7 @@ void set_multiplayer_mod(const char* name) {
loadLevels(DIR_RELOAD);
}
int init_data_directory_list() {
void init_data_directory_list() {
nb_data_dirs = 0;
}

View File

@ -4594,7 +4594,7 @@ void moveUpdateDroid(DROID *psDroid)
if ( psDroid->droidType == DROID_TRANSPORTER )
{
DBPRINTF(("a) dir %d,%d (%d)\n",tx,ty,tangle));
DBPRINTF(("a) dir %g,%g (%g)\n",tx,ty,tangle));
}
moveSpeed = moveCalcDroidSpeed(psDroid);

View File

@ -204,8 +204,8 @@ void loadMapPreview(void)
UBYTE scale,col,coltab[16],bitDepth=8;
MAPTILE *psTile,*WTile;
iSprite backDropSprite;
UDWORD oursize,ptr,*optr;
unsigned char *imageData;
UDWORD oursize,*optr;
unsigned char *ptr, *imageData;
if(psMapTiles)
{

View File

@ -298,7 +298,7 @@ void displayNumPlayersBut(struct _widget *psWidget, UDWORD xOffset, UDWORD yOffs
iV_SetTextColour(PIE_TEXT_LIGHTBLUE);
}
if ((int)(psWidget->UserData) == 0) {
sprintf(buffer, " *", (int)(psWidget->UserData));
sprintf(buffer, " *");
} else {
sprintf(buffer, "%iP", (int)(psWidget->UserData));
}
@ -312,7 +312,7 @@ unsigned int check_tip_index(unsigned int i) {
if (i < NBTIPS) {
return i;
} else {
debug(LOG_MAIN, "Tip window index too high", i);
debug(LOG_MAIN, "Tip window index too high (%ud)", i);
return NBTIPS-1;
}
}

View File

@ -519,7 +519,7 @@ MISSION_DATA *pScoreData;
if (psHeader->aFileType[0] != 's' || psHeader->aFileType[1] != 'c' ||
psHeader->aFileType[2] != 'd' || psHeader->aFileType[3] != 'a') {
DBERROR(("Read Score data : Weird file type found? Has header letters \
- %s %s %s %s", psHeader->aFileType[0],psHeader->aFileType[1],
- %c %c %c %c", psHeader->aFileType[0],psHeader->aFileType[1],
psHeader->aFileType[2],psHeader->aFileType[3]));
return FALSE;
}