Remove -Wno-unused from Makefile

git-svn-id: https://svn.eduke32.com/eduke32@649 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2008-03-21 04:01:38 +00:00
parent bee008fbc5
commit 945e1b2357
35 changed files with 129 additions and 193 deletions

View file

@ -453,6 +453,8 @@ char *Bstrlwr(char *);
char *Bstrupr(char *); char *Bstrupr(char *);
#endif #endif
#define UNUSED_PARAMETER(x) x=x
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

View file

@ -1732,13 +1732,13 @@ void makeasmwriteable(void)
return; return;
} }
dep_begin_page = ((size_t)&dep_begin) & ~(pagesize-1); dep_begin_page = ((size_t)&dep_begin) & ~(pagesize-1);
if (mprotect((const void *)dep_begin_page, (size_t)&dep_end - dep_begin_page, PROT_READ|PROT_WRITE) < 0) if (mprotect((void *)dep_begin_page, (size_t)&dep_end - dep_begin_page, PROT_READ|PROT_WRITE) < 0)
{ {
initprintf("Error making code writeable (errno=%d)\n", errno); initprintf("Error making code writeable (errno=%d)\n", errno);
return; return;
} }
# else # else
# error Don't know how to unprotect the self-modifying assembly on this platform! # error "Don't know how to unprotect the self-modifying assembly on this platform!"
# endif # endif
#endif #endif
} }

View file

@ -38,7 +38,7 @@ endif
CC=gcc CC=gcc
CXX=g++ CXX=g++
OURCFLAGS=$(debug) -W -Wall -Wimplicit -Werror-implicit-function-declaration -Wno-unused \ OURCFLAGS=$(debug) -W -Wall -Wimplicit -Werror-implicit-function-declaration \
-fno-pic -funsigned-char -fno-strict-aliasing -DNO_GCC_BUILTINS -DNOCOPYPROTECT \ -fno-pic -funsigned-char -fno-strict-aliasing -DNO_GCC_BUILTINS -DNOCOPYPROTECT \
-I$(INC) -I$(EINC) -I$(SRC)/jmact -I$(SRC)/jaudiolib -I$(INC) -I$(EINC) -I$(SRC)/jmact -I$(SRC)/jaudiolib
OURCXXFLAGS=-fno-exceptions -fno-rtti OURCXXFLAGS=-fno-exceptions -fno-rtti

View file

@ -584,7 +584,7 @@ void lotsofmoneymailpaper(int sp, int n, int pic)
} }
} }
void guts(int sp, int gtype, int n, int p) void guts(int sp, int gtype, int n)
{ {
int gutz,floorz; int gutz,floorz;
int i,a,j,sx,sy,pal; int i,a,j,sx,sy,pal;
@ -621,7 +621,7 @@ void guts(int sp, int gtype, int n, int p)
} }
} }
void gutsdir(int sp, int gtype, int n, int p) void gutsdir(int sp, int gtype, int n)
{ {
int gutz,floorz; int gutz,floorz;
int i,a,j,sx,sy; int i,a,j,sx,sy;
@ -5730,7 +5730,7 @@ static void moveeffectors(void) //STATNUM 3
updatesector(sprite[j].x,sprite[j].y,&k); updatesector(sprite[j].x,sprite[j].y,&k);
if (sprite[j].extra >= 0 && k == s->sectnum) if (sprite[j].extra >= 0 && k == s->sectnum)
{ {
gutsdir(j,JIBS6,72,myconnectindex); gutsdir(j,JIBS6,72);
spritesound(SQUISHED,i); spritesound(SQUISHED,i);
deletesprite(j); deletesprite(j);
} }
@ -5904,7 +5904,7 @@ static void moveeffectors(void) //STATNUM 3
updatesector(sprite[j].x,sprite[j].y,&k); updatesector(sprite[j].x,sprite[j].y,&k);
if (sprite[j].extra >= 0 && k == s->sectnum) if (sprite[j].extra >= 0 && k == s->sectnum)
{ {
gutsdir(j,JIBS6,24,myconnectindex); gutsdir(j,JIBS6,24);
spritesound(SQUISHED,j); spritesound(SQUISHED,j);
deletesprite(j); deletesprite(j);
} }

View file

@ -291,6 +291,7 @@ void ExtLoadMap(const char *mapname)
void ExtSaveMap(const char *mapname) void ExtSaveMap(const char *mapname)
{ {
UNUSED_PARAMETER(mapname);
saveboard("backup.map",&posx,&posy,&posz,&ang,&cursectnum); saveboard("backup.map",&posx,&posy,&posz,&ang,&cursectnum);
} }
@ -632,6 +633,7 @@ void ExtShowSectorData(short sectnum) //F5
int totalactors1=0,totalactors2=0,totalactors3=0,totalactors4=0; int totalactors1=0,totalactors2=0,totalactors3=0,totalactors4=0;
int totalrespawn=0; int totalrespawn=0;
UNUSED_PARAMETER(sectnum);
if (qsetmode==200) if (qsetmode==200)
return; return;
@ -818,6 +820,8 @@ void ExtShowWallData(short wallnum) //F6
int i,nextfreetag=0,total=0; int i,nextfreetag=0,total=0;
char x,y; char x,y;
UNUSED_PARAMETER(wallnum);
if (qsetmode==200) if (qsetmode==200)
return; return;
@ -1176,10 +1180,12 @@ static void Show3dText(char *name)
kclose(fp); kclose(fp);
}// end Show3dText }// end Show3dText
#if 0
static void ShowHelpText(char *name) static void ShowHelpText(char *name)
{ {
BFILE *fp; BFILE *fp;
char x=0,y=4; char x=0,y=4;
UNUSED_PARAMETER(name);
if ((fp=fopenfrompath("helpdoc.txt","rb")) == NULL) if ((fp=fopenfrompath("helpdoc.txt","rb")) == NULL)
{ {
begindrawing(); begindrawing();
@ -1209,9 +1215,10 @@ static void ShowHelpText(char *name)
Bfclose(fp); Bfclose(fp);
}// end ShowHelpText }// end ShowHelpText
#endif
void ExtShowSpriteData(short spritenum) //F6 void ExtShowSpriteData(short spritenum) //F6
{ {
UNUSED_PARAMETER(spritenum);
if (qsetmode != 200) if (qsetmode != 200)
Show2dText("sehelp.hlp"); Show2dText("sehelp.hlp");
/* if (qsetmode == 200) // In 3D mode /* if (qsetmode == 200) // In 3D mode
@ -1232,12 +1239,13 @@ void ExtShowSpriteData(short spritenum) //F6
int fofsizex = -1; int fofsizex = -1;
int fofsizey = -1; int fofsizey = -1;
#if 0
static void ResetFOFSize() static void ResetFOFSize()
{ {
if (fofsizex != -1) tilesizx[FOF] = fofsizex; if (fofsizex != -1) tilesizx[FOF] = fofsizex;
if (fofsizey != -1) tilesizy[FOF] = fofsizey; if (fofsizey != -1) tilesizy[FOF] = fofsizey;
} }
#endif
static void ExtSE40Draw(int spnum,int x,int y,int z,short a,short h) static void ExtSE40Draw(int spnum,int x,int y,int z,short a,short h)
{ {
static int tempsectorz[MAXSECTORS]; static int tempsectorz[MAXSECTORS];
@ -1732,9 +1740,6 @@ static int m32gettile(int idInitialTile)
int i; int i;
int iTile, iTopLeftTile; int iTile, iTopLeftTile;
int idSelectedTile; int idSelectedTile;
int j;
char ch, szTemp[128];
// Enable following line for testing. I couldn't work out how to change vidmode on the fly // Enable following line for testing. I couldn't work out how to change vidmode on the fly
// s_Zoom = NUM_ZOOMS - 1; // s_Zoom = NUM_ZOOMS - 1;
@ -2215,7 +2220,7 @@ static int LoadTileSet(const int idCurrentTile, const int *pIds, const int nIds)
static int OnSelectTile(int iTile) static int OnSelectTile(int iTile)
{ {
int bDone = 0; int bDone = 0;
int i, j; int i;
char ch; char ch;
for (i = 0; (unsigned)i < tile_groups; i++) for (i = 0; (unsigned)i < tile_groups; i++)
@ -2427,9 +2432,8 @@ static int DrawTiles(int iTopLeft, int iSelected, int nXTiles, int nYTiles, int
static void Keys3d(void) static void Keys3d(void)
{ {
int i,count,rate,nexti; int i,count,rate,nexti;
int j, k, tempint = 0, changedir, hiz, loz; int j, k, tempint = 0, hiz, loz;
int hitx, hity, hitz, hihit, lohit; int hitx, hity, hitz, hihit, lohit;
int repeatcountx=0,repeatcounty=0;
char smooshyalign=0, repeatpanalign=0, buffer[80]; char smooshyalign=0, repeatpanalign=0, buffer[80];
short startwall, endwall, dasector, hitsect, hitwall, hitsprite, statnum=0; short startwall, endwall, dasector, hitsect, hitwall, hitsprite, statnum=0;
@ -5219,6 +5223,7 @@ int ExtPreInit(int argc,const char **argv)
static int osdcmd_quit(const osdfuncparm_t *parm) static int osdcmd_quit(const osdfuncparm_t *parm)
{ {
UNUSED_PARAMETER(parm);
clearfilenames(); clearfilenames();
ExtUnInit(); ExtUnInit();
uninitengine(); uninitengine();
@ -5382,6 +5387,7 @@ static int osdcmd_exec(const osdfuncparm_t *parm)
static int osdcmd_noclip(const osdfuncparm_t *parm) static int osdcmd_noclip(const osdfuncparm_t *parm)
{ {
UNUSED_PARAMETER(parm);
noclip = !noclip; noclip = !noclip;
return OSDCMD_OK; return OSDCMD_OK;
@ -7476,7 +7482,7 @@ static void FuncMenu(void)
j=getnumber16("Size multiplier: ",1,8,0); j=getnumber16("Size multiplier: ",1,8,0);
if (j!=1) if (j!=1)
{ {
int k, l, w, currsector, start_wall, end_wall; int w, currsector, start_wall, end_wall;
for (i = 0; i < highlightsectorcnt; i++) for (i = 0; i < highlightsectorcnt; i++)
{ {
currsector = highlightsector[i]; currsector = highlightsector[i];
@ -7516,7 +7522,7 @@ static void FuncMenu(void)
j=getnumber16("Size divisor: ",1,8,0); j=getnumber16("Size divisor: ",1,8,0);
if (j!=1) if (j!=1)
{ {
int k, l, w, currsector, start_wall, end_wall; int w, currsector, start_wall, end_wall;
for (i = 0; i < highlightsectorcnt; i++) for (i = 0; i < highlightsectorcnt; i++)
{ {
currsector = highlightsector[i]; currsector = highlightsector[i];

View file

@ -181,7 +181,7 @@ void CONFIG_SetDefaultKeys(int type)
void CONFIG_SetDefaults(void) void CONFIG_SetDefaults(void)
{ {
// JBF 20031211 // JBF 20031211
int32 i,f; int32 i;
ud.config.scripthandle = -1; ud.config.scripthandle = -1;
ud.config.ScreenWidth = 1024; ud.config.ScreenWidth = 1024;

View file

@ -178,7 +178,7 @@ extern int movesprite(int spritenum,int xchange,int ychange,int zchange,unsigned
extern inline int ssp(int i,unsigned int cliptype); extern inline int ssp(int i,unsigned int cliptype);
extern void insertspriteq(int i); extern void insertspriteq(int i);
extern void lotsofmoneymailpaper(int sp,int n,int pic); extern void lotsofmoneymailpaper(int sp,int n,int pic);
extern void guts(int sp,int gtype,int n,int p); extern void guts(int sp,int gtype,int n);
extern void setsectinterpolate(int i); extern void setsectinterpolate(int i);
extern void clearsectinterpolate(int i); extern void clearsectinterpolate(int i);
extern int ifhitsectors(int sectnum); extern int ifhitsectors(int sectnum);

View file

@ -65,8 +65,10 @@ extern int getversionfromwebsite(char *buffer);
int cameradist = 0, cameraclock = 0; int cameradist = 0, cameraclock = 0;
static int playerswhenstarted; static int playerswhenstarted;
static int qe,cp,usecwd = 0; static int qe,cp;
#if !defined(_WIN32)
static int usecwd = 0;
#endif
static int g_CommandSetup = 0; static int g_CommandSetup = 0;
static int g_NoSetup = 0; static int g_NoSetup = 0;
static int g_NoAutoLoad = 0; static int g_NoAutoLoad = 0;
@ -9815,7 +9817,7 @@ static void genspriteremaps(void)
extern int startwin_run(void); extern int startwin_run(void);
static void SetupGameButtons(void); static void SetupGameButtons(void);
static void Startup(int argc, const char **argv) static void Startup(void)
{ {
int i; int i;
@ -10479,7 +10481,7 @@ void app_main(int argc,const char **argv)
initprintf("Please read LICENSE.DOC for more details.\n"); initprintf("Please read LICENSE.DOC for more details.\n");
} }
Startup(argc,argv); // a bunch of stuff including compiling cons Startup(); // a bunch of stuff including compiling cons
if (numplayers > 1) if (numplayers > 1)
ud.multimode = numplayers; ud.multimode = numplayers;

View file

@ -4673,7 +4673,7 @@ static int parse(void)
{ {
if (!(g_sp->picnum == APLAYER && g_sp->extra > 0)) if (!(g_sp->picnum == APLAYER && g_sp->extra > 0))
{ {
guts(g_i,JIBS6,15,g_p); guts(g_i,JIBS6,15);
spritesound(SQUISHED,g_i); spritesound(SQUISHED,g_i);
spawn(g_i,BLOODPOOL); spawn(g_i,BLOODPOOL);
} }
@ -6173,7 +6173,7 @@ static int parse(void)
case CON_GUTS: case CON_GUTS:
insptr += 2; insptr += 2;
guts(g_i,*(insptr-1),*insptr,g_p); guts(g_i,*(insptr-1),*insptr);
insptr++; insptr++;
break; break;

View file

@ -219,8 +219,9 @@ typedef MONO16 VOLUME16[ 256 ];
typedef char HARSH_CLIP_TABLE_8[ MV_NumVoices * 256 ]; typedef char HARSH_CLIP_TABLE_8[ MV_NumVoices * 256 ];
#if defined(_WIN32)
static unsigned MV_GetBufferSize(unsigned); static unsigned MV_GetBufferSize(unsigned);
#endif
static void MV_Mix(VoiceNode *voice, int buffer); static void MV_Mix(VoiceNode *voice, int buffer);
static void MV_PlayVoice(VoiceNode *voice); static void MV_PlayVoice(VoiceNode *voice);
static void MV_StopVoice(VoiceNode *voice); static void MV_StopVoice(VoiceNode *voice);

View file

@ -112,7 +112,8 @@ static void mixer_callback(int chan, void *stream, int len, void *udata)
Uint8 *stptr; Uint8 *stptr;
Uint8 *fxptr; Uint8 *fxptr;
int copysize; int copysize;
UNUSED_PARAMETER(chan);
UNUSED_PARAMETER(udata);
/* len should equal _BufferSize, else this is screwed up */ /* len should equal _BufferSize, else this is screwed up */
stptr = (Uint8 *)stream; stptr = (Uint8 *)stream;
@ -263,6 +264,7 @@ int DisableInterrupts(void)
int RestoreInterrupts(int flags) int RestoreInterrupts(int flags)
{ {
UNUSED_PARAMETER(flags);
SDL_UnlockAudio(); SDL_UnlockAudio();
return(0); return(0);
} }

View file

@ -31,6 +31,7 @@ Modifications for JonoF's port by Jonathon Fowler (jonof@edgenetwk.com)
**********************************************************************/ **********************************************************************/
#include "mpu401.h" #include "mpu401.h"
#include "compat.h"
#define WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN
#include <windows.h> #include <windows.h>
@ -114,6 +115,10 @@ void MPU_Unpause(void)
void CALLBACK MPU_MIDICallback(HMIDIOUT handle, UINT uMsg, DWORD dwInstance, DWORD dwParam1, DWORD dwParam2) void CALLBACK MPU_MIDICallback(HMIDIOUT handle, UINT uMsg, DWORD dwInstance, DWORD dwParam1, DWORD dwParam2)
{ {
int i; int i;
UNUSED_PARAMETER(dwInstance);
UNUSED_PARAMETER(dwParam2);
switch (uMsg) switch (uMsg)
{ {
case MOM_DONE: case MOM_DONE:
@ -478,6 +483,7 @@ void MPU_SetVolume(int volume)
mixerClose(hmixer); mixerClose(hmixer);
*/ */
UNUSED_PARAMETER(volume);
} }
int MPU_GetVolume(void) int MPU_GetVolume(void)

View file

@ -251,6 +251,7 @@ char *MV_ErrorString(int ErrorNumber)
Returns the buffer size for the given samplerate. Returns the buffer size for the given samplerate.
---------------------------------------------------------------------*/ ---------------------------------------------------------------------*/
#if defined(_WIN32)
#define BASEBUFSZ (512+128) #define BASEBUFSZ (512+128)
static unsigned MV_GetBufferSize(unsigned samplerate) static unsigned MV_GetBufferSize(unsigned samplerate)
{ {
@ -272,7 +273,7 @@ static unsigned MV_GetBufferSize(unsigned samplerate)
return lastbufsz; return lastbufsz;
} }
#endif
/*--------------------------------------------------------------------- /*---------------------------------------------------------------------
Function: MV_Mix Function: MV_Mix
@ -417,6 +418,8 @@ int MV_ServiceVoc(int buffer)
// Get the currently playing buffer // Get the currently playing buffer
#if defined(_WIN32) #if defined(_WIN32)
MV_MixPage = buffer; MV_MixPage = buffer;
#else
UNUSED_PARAMETER(buffer);
#endif #endif
// Toggle which buffer we'll mix next // Toggle which buffer we'll mix next
@ -1794,16 +1797,18 @@ int SeekOgg(void *datasource,ogg_int64_t offset,int whence)
return 0; return 0;
} }
long TellOgg(void *datasource) intptr_t TellOgg(void *datasource)
{ {
sounddef *d=(sounddef *)datasource; sounddef *d=(sounddef *)datasource;
return d->pos; return d->pos;
} }
/*
int CloseOgg(void *datasource) int CloseOgg(void *datasource)
{ {
return 0; return 0;
} }
*/
/*--------------------------------------------------------------------- /*---------------------------------------------------------------------
Function: MV_StartPlayback Function: MV_StartPlayback
@ -1816,10 +1821,10 @@ int MV_StartPlayback(void)
int status; int status;
int buffer; int buffer;
cb.close_func=CloseOgg; cb.close_func=NULL; //CloseOgg
cb.read_func =ReadOgg; cb.read_func =ReadOgg;
cb.seek_func =SeekOgg; cb.seek_func =SeekOgg;
cb.tell_func =TellOgg; cb.tell_func =(void *)TellOgg;
// Initialize the buffers // Initialize the buffers
ClearBuffer_DW(MV_MixBuffer[ 0 ], MV_Silence, TotalBufferSize >> 2); ClearBuffer_DW(MV_MixBuffer[ 0 ], MV_Silence, TotalBufferSize >> 2);

View file

@ -34,6 +34,7 @@ Modifications for JonoF's port by Jonathon Fowler (jonof@edgenetwk.com)
#include "music.h" #include "music.h"
#include "midi.h" #include "midi.h"
#include "mpu401.h" #include "mpu401.h"
#include "compat.h"
#ifdef USE_OPENAL #ifdef USE_OPENAL
#include "openal.h" #include "openal.h"
#endif #endif
@ -502,6 +503,8 @@ int MUSIC_InitMidi
) )
{ {
UNUSED_PARAMETER(card);
UNUSED_PARAMETER(Address);
Funcs->NoteOff = MPU_NoteOff; Funcs->NoteOff = MPU_NoteOff;
Funcs->NoteOn = MPU_NoteOn; Funcs->NoteOn = MPU_NoteOn;
Funcs->PolyAftertouch = MPU_PolyAftertouch; Funcs->PolyAftertouch = MPU_PolyAftertouch;
@ -534,6 +537,7 @@ int MUSIC_FadeVolume
) )
{ {
UNUSED_PARAMETER(milliseconds);
MIDI_SetVolume(tovolume); MIDI_SetVolume(tovolume);
return(MUSIC_Ok); return(MUSIC_Ok);
} }
@ -598,7 +602,9 @@ void MUSIC_RegisterTimbreBank
unsigned char *timbres unsigned char *timbres
) )
{} {
UNUSED_PARAMETER(timbres);
}
void MUSIC_Update(void) void MUSIC_Update(void)

View file

@ -356,36 +356,44 @@ int MUSIC_GetContext(void)
void MUSIC_SetSongTick(unsigned int PositionInTicks) void MUSIC_SetSongTick(unsigned int PositionInTicks)
{ {
UNUSED_PARAMETER(PositionInTicks);
musdebug("STUB ... MUSIC_SetSongTick().\n"); musdebug("STUB ... MUSIC_SetSongTick().\n");
} // MUSIC_SetSongTick } // MUSIC_SetSongTick
void MUSIC_SetSongTime(unsigned int milliseconds) void MUSIC_SetSongTime(unsigned int milliseconds)
{ {
UNUSED_PARAMETER(milliseconds);
musdebug("STUB ... MUSIC_SetSongTime().\n"); musdebug("STUB ... MUSIC_SetSongTime().\n");
}// MUSIC_SetSongTime }// MUSIC_SetSongTime
void MUSIC_SetSongPosition(int measure, int beat, int tick) void MUSIC_SetSongPosition(int measure, int beat, int tick)
{ {
UNUSED_PARAMETER(measure);
UNUSED_PARAMETER(beat);
UNUSED_PARAMETER(tick);
musdebug("STUB ... MUSIC_SetSongPosition().\n"); musdebug("STUB ... MUSIC_SetSongPosition().\n");
} // MUSIC_SetSongPosition } // MUSIC_SetSongPosition
void MUSIC_GetSongPosition(songposition *pos) void MUSIC_GetSongPosition(songposition *pos)
{ {
UNUSED_PARAMETER(pos);
musdebug("STUB ... MUSIC_GetSongPosition().\n"); musdebug("STUB ... MUSIC_GetSongPosition().\n");
} // MUSIC_GetSongPosition } // MUSIC_GetSongPosition
void MUSIC_GetSongLength(songposition *pos) void MUSIC_GetSongLength(songposition *pos)
{ {
UNUSED_PARAMETER(pos);
musdebug("STUB ... MUSIC_GetSongLength().\n"); musdebug("STUB ... MUSIC_GetSongLength().\n");
} // MUSIC_GetSongLength } // MUSIC_GetSongLength
int MUSIC_FadeVolume(int tovolume, int milliseconds) int MUSIC_FadeVolume(int tovolume, int milliseconds)
{ {
UNUSED_PARAMETER(tovolume);
Mix_FadeOutMusic(milliseconds); Mix_FadeOutMusic(milliseconds);
return(MUSIC_Ok); return(MUSIC_Ok);
} // MUSIC_FadeVolume } // MUSIC_FadeVolume
@ -405,12 +413,15 @@ void MUSIC_StopFade(void)
void MUSIC_RerouteMidiChannel(int channel, int cdecl(*function)(int event, int c1, int c2)) void MUSIC_RerouteMidiChannel(int channel, int cdecl(*function)(int event, int c1, int c2))
{ {
UNUSED_PARAMETER(channel);
UNUSED_PARAMETER(function);
musdebug("STUB ... MUSIC_RerouteMidiChannel().\n"); musdebug("STUB ... MUSIC_RerouteMidiChannel().\n");
} // MUSIC_RerouteMidiChannel } // MUSIC_RerouteMidiChannel
void MUSIC_RegisterTimbreBank(unsigned char *timbres) void MUSIC_RegisterTimbreBank(unsigned char *timbres)
{ {
UNUSED_PARAMETER(timbres);
musdebug("STUB ... MUSIC_RegisterTimbreBank().\n"); musdebug("STUB ... MUSIC_RegisterTimbreBank().\n");
} // MUSIC_RegisterTimbreBank } // MUSIC_RegisterTimbreBank

View file

@ -254,7 +254,6 @@ byte CONTROL_GetMouseButtons( void );
boolean CONTROL_StartMouse( void ); boolean CONTROL_StartMouse( void );
void CONTROL_GetJoyAbs( void ); void CONTROL_GetJoyAbs( void );
void CONTROL_GetJoyDelta( void ); void CONTROL_GetJoyDelta( void );
void CONTROL_SetJoyScale( void );
boolean CONTROL_StartJoy( int32 joy ); boolean CONTROL_StartJoy( int32 joy );
void CONTROL_ShutJoy( int32 joy ); void CONTROL_ShutJoy( int32 joy );
void CONTROL_SetFlag( int32 which, boolean active ); void CONTROL_SetFlag( int32 which, boolean active );

View file

@ -27,7 +27,7 @@ uint32 CONTROL_ButtonHeldState1 = 0;
uint32 CONTROL_ButtonState2 = 0; uint32 CONTROL_ButtonState2 = 0;
uint32 CONTROL_ButtonHeldState2 = 0; uint32 CONTROL_ButtonHeldState2 = 0;
static int32 CONTROL_UserInputDelay = -1; // static int32 CONTROL_UserInputDelay = -1;
static int32 CONTROL_MouseSensitivity = DEFAULTMOUSESENSITIVITY; static int32 CONTROL_MouseSensitivity = DEFAULTMOUSESENSITIVITY;
static int32 CONTROL_NumMouseButtons = 0; static int32 CONTROL_NumMouseButtons = 0;
static int32 CONTROL_NumMouseAxes = 0; static int32 CONTROL_NumMouseAxes = 0;
@ -108,29 +108,15 @@ void CONTROL_GetJoyDelta( void )
CONTROL_JoyAxes[i].analog = joyaxis[i] >> 5; CONTROL_JoyAxes[i].analog = joyaxis[i] >> 5;
} }
void CONTROL_SetJoyScale( void )
{
}
void CONTROL_CenterJoystick
(
void ( *CenterCenter )( void ),
void ( *UpperLeft )( void ),
void ( *LowerRight )( void ),
void ( *CenterThrottle )( void ),
void ( *CenterRudder )( void )
)
{
}
boolean CONTROL_StartJoy(int32 joy) boolean CONTROL_StartJoy(int32 joy)
{ {
UNUSED_PARAMETER(joy);
return (inputdevices & 4) == 4; return (inputdevices & 4) == 4;
} }
void CONTROL_ShutJoy(int32 joy) void CONTROL_ShutJoy(int32 joy)
{ {
UNUSED_PARAMETER(joy);
CONTROL_JoyPresent = false; CONTROL_JoyPresent = false;
} }
@ -834,6 +820,8 @@ boolean CONTROL_Startup(controltype which, int32 ( *TimeFunction )( void ), int3
{ {
int32 i; int32 i;
UNUSED_PARAMETER(which);
if (CONTROL_Started) return false; if (CONTROL_Started) return false;
if (TimeFunction) GetTime = TimeFunction; if (TimeFunction) GetTime = TimeFunction;

View file

@ -174,14 +174,6 @@ void CONTROL_ClearButton( int32 whichbutton );
void CONTROL_ClearUserInput( UserInput *info ); void CONTROL_ClearUserInput( UserInput *info );
void CONTROL_WaitRelease( void ); void CONTROL_WaitRelease( void );
void CONTROL_Ack( void ); void CONTROL_Ack( void );
void CONTROL_CenterJoystick
(
void ( *CenterCenter )( void ),
void ( *UpperLeft )( void ),
void ( *LowerRight )( void ),
void ( *CenterThrottle )( void ),
void ( *CenterRudder )( void )
);
int32 CONTROL_GetMouseSensitivity( void ); int32 CONTROL_GetMouseSensitivity( void );
void CONTROL_SetMouseSensitivity( int32 newsensitivity ); void CONTROL_SetMouseSensitivity( int32 newsensitivity );
boolean CONTROL_Startup boolean CONTROL_Startup

View file

@ -217,10 +217,6 @@ char KB_Getch( void )
return (char)bgetchar(); return (char)bgetchar();
} }
void KB_Addch( char ch )
{
}
void KB_FlushKeyboardQueue( void ) void KB_FlushKeyboardQueue( void )
{ {
//keyfifoplc = keyfifoend = 0; //keyfifoplc = keyfifoend = 0;

View file

@ -210,7 +210,6 @@ extern kb_scancode KB_LastScan;
boolean KB_KeyWaiting( void ); // Checks if a character is waiting in the keyboard queue boolean KB_KeyWaiting( void ); // Checks if a character is waiting in the keyboard queue
char KB_Getch( void ); // Gets the next keypress char KB_Getch( void ); // Gets the next keypress
void KB_Addch( char ch ); // Adds key to end of queue
void KB_FlushKeyboardQueue( void ); // Empties the keyboard queue of all waiting characters. void KB_FlushKeyboardQueue( void ); // Empties the keyboard queue of all waiting characters.
void KB_ClearKeysDown( void ); // Clears all keys down flags. void KB_ClearKeysDown( void ); // Clears all keys down flags.
char * KB_ScanCodeToString( kb_scancode scancode ); // convert scancode into a string char * KB_ScanCodeToString( kb_scancode scancode ); // convert scancode into a string

View file

@ -75,11 +75,6 @@ int32 MOUSE_ClearButton( int32 b )
} }
void MOUSE_GetPosition( int32*x, int32*y )
{
}
void MOUSE_GetDelta( int32*x, int32*y ) void MOUSE_GetDelta( int32*x, int32*y )
{ {
readmousexy(x,y); readmousexy(x,y);

View file

@ -47,7 +47,6 @@ void MOUSE_ShowCursor( void );
void MOUSE_HideCursor( void ); void MOUSE_HideCursor( void );
int32 MOUSE_GetButtons( void ); int32 MOUSE_GetButtons( void );
int32 MOUSE_ClearButton( int32 b ); int32 MOUSE_ClearButton( int32 b );
void MOUSE_GetPosition( int32*x, int32*y );
void MOUSE_GetDelta( int32*x, int32*y ); void MOUSE_GetDelta( int32*x, int32*y );
#ifdef __cplusplus #ifdef __cplusplus

View file

@ -410,11 +410,6 @@ void SCRIPT_Free( int32 scripthandle )
SCRIPT_Delete(scripthandle); SCRIPT_Delete(scripthandle);
} }
int32 SCRIPT_Parse ( char *data, int32 length, char * name )
{
return 0;
}
int32 SCRIPT_Load ( char * filename ) int32 SCRIPT_Load ( char * filename )
{ {
int32 s,h,l; int32 s,h,l;
@ -735,42 +730,6 @@ boolean SCRIPT_GetBoolean( int32 scripthandle, char * sectionname, char * entryn
return 0; return 0;
} }
boolean SCRIPT_GetDouble( int32 scripthandle, char * sectionname, char * entryname, double * number )
{
ScriptSectionType *s;
ScriptEntryType *e;
if (!SC(scripthandle)) return 1;
if (!SCRIPT(scripthandle,script)) return 1;
s = SCRIPT_SectionExists(scripthandle, sectionname);
e = SCRIPT_EntryExists(s, entryname);
if (!e) return 1;// *number = 0.0;
else {
}
return 0;
}
void SCRIPT_PutComment( int32 scripthandle, char * sectionname, char * comment )
{
}
void SCRIPT_PutEOL( int32 scripthandle, char * sectionname )
{
}
void SCRIPT_PutMultiComment
(
int32 scripthandle,
char * sectionname,
char * comment,
...
)
{
}
void SCRIPT_PutSection( int32 scripthandle, char * sectionname ) void SCRIPT_PutSection( int32 scripthandle, char * sectionname )
{ {
SCRIPT_AddSection(scripthandle, sectionname); SCRIPT_AddSection(scripthandle, sectionname);
@ -879,6 +838,7 @@ void SCRIPT_PutNumber
{ {
char raw[64]; char raw[64];
UNUSED_PARAMETER(defaultvalue);
if (hexadecimal) sprintf(raw, "0x%X", number); if (hexadecimal) sprintf(raw, "0x%X", number);
else sprintf(raw, "%d", number); else sprintf(raw, "%d", number);
@ -911,6 +871,7 @@ void SCRIPT_PutDouble
{ {
char raw[64]; char raw[64];
UNUSED_PARAMETER(defaultvalue);
sprintf(raw, "%g", number); sprintf(raw, "%g", number);
SCRIPT_AddEntry(scripthandle, sectionname, entryname, raw); SCRIPT_AddEntry(scripthandle, sectionname, entryname, raw);

View file

@ -51,17 +51,6 @@ int32 SCRIPT_Init( char * name );
*/ */
void SCRIPT_Free( int32 scripthandle ); void SCRIPT_Free( int32 scripthandle );
/*
==============
=
= SCRIPT_Parse
=
==============
*/
int32 SCRIPT_Parse ( char *data, int32 length, char * name );
/* /*
============== ==============
= =
@ -193,57 +182,6 @@ boolean SCRIPT_GetBoolean
boolean * boole boolean * boole
); );
/*
==============
=
= SCRIPT_GetDouble
=
==============
*/
boolean SCRIPT_GetDouble
(
int32 scripthandle,
char * sectionname,
char * entryname,
double * number
);
/*
==============
=
= SCRIPT_PutComment
=
==============
*/
void SCRIPT_PutComment( int32 scripthandle, char * sectionname, char * comment );
/*
==============
=
= SCRIPT_PutEOL
=
==============
*/
void SCRIPT_PutEOL( int32 scripthandle, char * sectionname );
/*
==============
=
= SCRIPT_PutMultiComment
=
==============
*/
void SCRIPT_PutMultiComment
(
int32 scripthandle,
char * sectionname,
char * comment,
...
);
/* /*
============== ==============
= =

View file

@ -99,7 +99,6 @@ int xvel, yvel, timoff;
static void SearchSectorsForward(); static void SearchSectorsForward();
static void SearchSectorsBackward(); static void SearchSectorsBackward();
static inline void SpriteName(short spritenum, char *lo2); static inline void SpriteName(short spritenum, char *lo2);
static int ActorMem(int i);
static void PrintStatus(char *string,int num,char x,char y,char color); static void PrintStatus(char *string,int num,char x,char y,char color);
static void SetBOSS1Palette(); static void SetBOSS1Palette();
static void SetSLIMEPalette(); static void SetSLIMEPalette();

View file

@ -32,7 +32,7 @@ extern int recfilep;
//extern char vgacompatible; //extern char vgacompatible;
short globalskillsound=-1; short globalskillsound=-1;
int probey=0; int probey=0;
static int lastsavehead=0,last_menu_pos=0,last_menu,sh,onbar,buttonstat,deletespot; static int lastsavehead=0,last_menu_pos=0,last_menu,sh,onbar,buttonstat;
static int last_zero,last_fifty,last_onehundred,last_twoohtwo,last_threehundred = 0; static int last_zero,last_fifty,last_onehundred,last_twoohtwo,last_threehundred = 0;
static char menunamecnt; static char menunamecnt;

View file

@ -35,6 +35,7 @@ struct osdcmd_cheatsinfo osdcmd_cheatsinfo_stat;
static inline int osdcmd_quit(const osdfuncparm_t *parm) static inline int osdcmd_quit(const osdfuncparm_t *parm)
{ {
UNUSED_PARAMETER(parm);
sendquit(); sendquit();
return OSDCMD_OK; return OSDCMD_OK;
} }
@ -261,6 +262,7 @@ static int osdcmd_map(const osdfuncparm_t *parm)
static int osdcmd_god(const osdfuncparm_t *parm) static int osdcmd_god(const osdfuncparm_t *parm)
{ {
UNUSED_PARAMETER(parm);
if (numplayers == 1 && g_player[myconnectindex].ps->gm & MODE_GAME) if (numplayers == 1 && g_player[myconnectindex].ps->gm & MODE_GAME)
{ {
osdcmd_cheatsinfo_stat.cheatnum = 0; osdcmd_cheatsinfo_stat.cheatnum = 0;
@ -275,6 +277,7 @@ static int osdcmd_god(const osdfuncparm_t *parm)
static int osdcmd_noclip(const osdfuncparm_t *parm) static int osdcmd_noclip(const osdfuncparm_t *parm)
{ {
UNUSED_PARAMETER(parm);
if (numplayers == 1 && g_player[myconnectindex].ps->gm & MODE_GAME) if (numplayers == 1 && g_player[myconnectindex].ps->gm & MODE_GAME)
{ {
osdcmd_cheatsinfo_stat.cheatnum = 20; osdcmd_cheatsinfo_stat.cheatnum = 20;
@ -346,6 +349,7 @@ static int osdcmd_rate(const osdfuncparm_t *parm)
static int osdcmd_restartsound(const osdfuncparm_t *parm) static int osdcmd_restartsound(const osdfuncparm_t *parm)
{ {
UNUSED_PARAMETER(parm);
SoundShutdown(); SoundShutdown();
MusicShutdown(); MusicShutdown();
@ -372,6 +376,7 @@ static int osdcmd_restartsound(const osdfuncparm_t *parm)
static int osdcmd_restartvid(const osdfuncparm_t *parm) static int osdcmd_restartvid(const osdfuncparm_t *parm)
{ {
UNUSED_PARAMETER(parm);
resetvideomode(); resetvideomode();
if (setgamemode(ud.config.ScreenMode,ud.config.ScreenWidth,ud.config.ScreenHeight,ud.config.ScreenBPP)) if (setgamemode(ud.config.ScreenMode,ud.config.ScreenWidth,ud.config.ScreenHeight,ud.config.ScreenBPP))
gameexit("restartvid: Reset failed...\n"); gameexit("restartvid: Reset failed...\n");

View file

@ -76,6 +76,8 @@ void GAME_clearbackground(int c, int r)
int x, y, xsiz, ysiz, tx2, ty2; int x, y, xsiz, ysiz, tx2, ty2;
int daydim, bits; int daydim, bits;
UNUSED_PARAMETER(c);
if (getrendermode() < 3) bits = BITS; if (getrendermode() < 3) bits = BITS;
else bits = BITSTL; else bits = BITSTL;

View file

@ -103,7 +103,7 @@ void quickkill(player_struct *p)
sprite[p->i].extra = 0; sprite[p->i].extra = 0;
sprite[p->i].cstat |= 32768; sprite[p->i].cstat |= 32768;
if (ud.god == 0) guts(p->i,JIBS6,8,myconnectindex); if (ud.god == 0) guts(p->i,JIBS6,8);
return; return;
} }
@ -4576,7 +4576,7 @@ HORIZONLY:
p->weapon_pos = -p->weapon_pos; p->weapon_pos = -p->weapon_pos;
if (p->actorsqu >= 0 && dist(&sprite[pi],&sprite[p->actorsqu]) < 1400 && sprite[p->actorsqu].statnum != MAXSTATUS) if (p->actorsqu >= 0 && dist(&sprite[pi],&sprite[p->actorsqu]) < 1400 && sprite[p->actorsqu].statnum != MAXSTATUS)
{ {
guts(p->actorsqu,JIBS6,7,myconnectindex); guts(p->actorsqu,JIBS6,7);
spawn(p->actorsqu,BLOODPOOL); spawn(p->actorsqu,BLOODPOOL);
spritesound(SQUISHED,p->actorsqu); spritesound(SQUISHED,p->actorsqu);
switch (dynamictostatic[sprite[p->actorsqu].picnum]) switch (dynamictostatic[sprite[p->actorsqu].picnum])

View file

@ -2340,12 +2340,12 @@ void checkhitsprite(int i,int sn)
shoot(i,BLOODSPLAT3); shoot(i,BLOODSPLAT3);
SA = TRAND&2047; SA = TRAND&2047;
shoot(i,BLOODSPLAT4); shoot(i,BLOODSPLAT4);
guts(i,JIBS1,1,myconnectindex); guts(i,JIBS1,1);
guts(i,JIBS2,2,myconnectindex); guts(i,JIBS2,2);
guts(i,JIBS3,3,myconnectindex); guts(i,JIBS3,3);
guts(i,JIBS4,4,myconnectindex); guts(i,JIBS4,4);
guts(i,JIBS5,1,myconnectindex); guts(i,JIBS5,1);
guts(i,JIBS3,6,myconnectindex); guts(i,JIBS3,6);
sound(SQUISHED); sound(SQUISHED);
deletesprite(i); deletesprite(i);
break; break;

View file

@ -504,6 +504,7 @@ int spritesound(unsigned int num, int i)
void stopspritesound(int num, int i) void stopspritesound(int num, int i)
{ {
UNUSED_PARAMETER(i);
stopsound(num); stopsound(num);
} }
@ -665,6 +666,7 @@ void clearsoundlocks(void)
int isspritemakingsound(int i, int num) int isspritemakingsound(int i, int num)
{ {
UNUSED_PARAMETER(i);
if (num < 0) num=0; // FIXME if (num < 0) num=0; // FIXME
return (g_sounds[num].num > 0); return (g_sounds[num].num > 0);
} }

View file

@ -167,6 +167,7 @@ static void on_vmode3dcombo_changed(GtkComboBox *combobox, gpointer user_data)
GtkTreeModel *data; GtkTreeModel *data;
GtkTreeIter iter; GtkTreeIter iter;
int val; int val;
UNUSED_PARAMETER(user_data);
if (!gtk_combo_box_get_active_iter(combobox, &iter)) return; if (!gtk_combo_box_get_active_iter(combobox, &iter)) return;
if (!(data = gtk_combo_box_get_model(combobox))) return; if (!(data = gtk_combo_box_get_model(combobox))) return;
gtk_tree_model_get(data, &iter, 1, &val, -1); gtk_tree_model_get(data, &iter, 1, &val, -1);
@ -176,23 +177,29 @@ static void on_vmode3dcombo_changed(GtkComboBox *combobox, gpointer user_data)
static void on_fullscreencheck_toggled(GtkToggleButton *togglebutton, gpointer user_data) static void on_fullscreencheck_toggled(GtkToggleButton *togglebutton, gpointer user_data)
{ {
UNUSED_PARAMETER(user_data);
settings.fullscreen = (gtk_toggle_button_get_active(togglebutton) == TRUE); settings.fullscreen = (gtk_toggle_button_get_active(togglebutton) == TRUE);
PopulateForm(1<<TAB_CONFIG); PopulateForm(1<<TAB_CONFIG);
} }
static void on_alwaysshowcheck_toggled(GtkToggleButton *togglebutton, gpointer user_data) static void on_alwaysshowcheck_toggled(GtkToggleButton *togglebutton, gpointer user_data)
{ {
UNUSED_PARAMETER(user_data);
settings.forcesetup = (gtk_toggle_button_get_active(togglebutton) == TRUE); settings.forcesetup = (gtk_toggle_button_get_active(togglebutton) == TRUE);
} }
static void on_cancelbutton_clicked(GtkButton *button, gpointer user_data) static void on_cancelbutton_clicked(GtkButton *button, gpointer user_data)
{ {
UNUSED_PARAMETER(button);
UNUSED_PARAMETER(user_data);
if (mode == TAB_CONFIG) { retval = 0; gtk_main_quit(); } if (mode == TAB_CONFIG) { retval = 0; gtk_main_quit(); }
else quitevent++; else quitevent++;
} }
static void on_startbutton_clicked(GtkButton *button, gpointer user_data) static void on_startbutton_clicked(GtkButton *button, gpointer user_data)
{ {
UNUSED_PARAMETER(button);
UNUSED_PARAMETER(user_data);
retval = 1; retval = 1;
gtk_main_quit(); gtk_main_quit();
} }
@ -203,11 +210,13 @@ static void on_startbutton_clicked(GtkButton *button, gpointer user_data)
static void on_inputmousecheck_toggled(GtkToggleButton *togglebutton, gpointer user_data) static void on_inputmousecheck_toggled(GtkToggleButton *togglebutton, gpointer user_data)
{ {
UNUSED_PARAMETER(user_data);
settings.usemouse = (gtk_toggle_button_get_active(togglebutton) == TRUE); settings.usemouse = (gtk_toggle_button_get_active(togglebutton) == TRUE);
} }
static void on_inputjoycheck_toggled(GtkToggleButton *togglebutton, gpointer user_data) static void on_inputjoycheck_toggled(GtkToggleButton *togglebutton, gpointer user_data)
{ {
UNUSED_PARAMETER(user_data);
settings.usejoy = (gtk_toggle_button_get_active(togglebutton) == TRUE); settings.usejoy = (gtk_toggle_button_get_active(togglebutton) == TRUE);
} }
@ -216,7 +225,7 @@ static void on_gamelist_selection_changed(GtkTreeSelection *selection, gpointer
GtkTreeIter iter; GtkTreeIter iter;
GtkTreeModel *model; GtkTreeModel *model;
struct grpfile *fg; struct grpfile *fg;
UNUSED_PARAMETER(user_data);
if (gtk_tree_selection_get_selected(selection, &model, &iter)) if (gtk_tree_selection_get_selected(selection, &model, &iter))
{ {
gtk_tree_model_get(model, &iter, 2, (gpointer)&fg, -1); gtk_tree_model_get(model, &iter, 2, (gpointer)&fg, -1);
@ -227,6 +236,9 @@ static void on_gamelist_selection_changed(GtkTreeSelection *selection, gpointer
static gboolean on_startwin_delete_event(GtkWidget *widget, GdkEvent *event, gpointer user_data) static gboolean on_startwin_delete_event(GtkWidget *widget, GdkEvent *event, gpointer user_data)
{ {
UNUSED_PARAMETER(widget);
UNUSED_PARAMETER(event);
UNUSED_PARAMETER(user_data);
if (mode == TAB_CONFIG) { retval = 0; gtk_main_quit(); } if (mode == TAB_CONFIG) { retval = 0; gtk_main_quit(); }
else quitevent++; else quitevent++;
return TRUE; // FALSE would let the event go through. we want the game to decide when to close return TRUE; // FALSE would let the event go through. we want the game to decide when to close
@ -237,7 +249,7 @@ static gint name_sorter(GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpo
{ {
gchar *as, *bs; gchar *as, *bs;
gint r; gint r;
UNUSED_PARAMETER(user_data);
gtk_tree_model_get(model, a, 0, &as, -1); gtk_tree_model_get(model, a, 0, &as, -1);
gtk_tree_model_get(model, b, 0, &bs, -1); gtk_tree_model_get(model, b, 0, &bs, -1);
@ -729,6 +741,7 @@ int startwin_settitle(const char *title)
int startwin_idle(void *s) int startwin_idle(void *s)
{ {
UNUSED_PARAMETER(s);
if (!gtkenabled) return 0; if (!gtkenabled) return 0;
//if (!startwin) return 1; //if (!startwin) return 1;
gtk_main_iteration_do(FALSE); gtk_main_iteration_do(FALSE);

View file

@ -79,7 +79,7 @@ static void PopulateForm(int pgs)
} }
Button_SetCheck(GetDlgItem(pages[TAB_CONFIG], IDCFULLSCREEN), (settings.fullscreen ? BST_CHECKED : BST_UNCHECKED)); Button_SetCheck(GetDlgItem(pages[TAB_CONFIG], IDCFULLSCREEN), (settings.fullscreen ? BST_CHECKED : BST_UNCHECKED));
ComboBox_ResetContent(hwnd); (void)ComboBox_ResetContent(hwnd);
for (i=0; i<validmodecnt; i++) for (i=0; i<validmodecnt; i++)
{ {
if (validmode[i].fs != settings.fullscreen) continue; if (validmode[i].fs != settings.fullscreen) continue;
@ -87,8 +87,8 @@ static void PopulateForm(int pgs)
// all modes get added to the 3D mode list // all modes get added to the 3D mode list
Bsprintf(buf, "%d x %d %dbpp", validmode[i].xdim, validmode[i].ydim, validmode[i].bpp); Bsprintf(buf, "%d x %d %dbpp", validmode[i].xdim, validmode[i].ydim, validmode[i].bpp);
j = ComboBox_AddString(hwnd, buf); j = ComboBox_AddString(hwnd, buf);
ComboBox_SetItemData(hwnd, j, i); (void)ComboBox_SetItemData(hwnd, j, i);
if (i == mode) ComboBox_SetCurSel(hwnd, j); if (i == mode) (void)ComboBox_SetCurSel(hwnd, j);
} }
} }
@ -98,7 +98,7 @@ static void PopulateForm(int pgs)
char *n; char *n;
hwnd = GetDlgItem(pages[TAB_CONFIG], IDCSOUNDDRV); hwnd = GetDlgItem(pages[TAB_CONFIG], IDCSOUNDDRV);
ComboBox_ResetContent(hwnd); (void)ComboBox_ResetContent(hwnd);
if (wavedevs) if (wavedevs)
{ {
d = wavedevs->devs; d = wavedevs->devs;
@ -112,12 +112,12 @@ static void PopulateForm(int pgs)
for (j=0; d->devs[j]; j++) for (j=0; d->devs[j]; j++)
{ {
strcpy(n, d->devs[j]); strcpy(n, d->devs[j]);
ComboBox_AddString(hwnd, buf); (void)ComboBox_AddString(hwnd, buf);
} }
} }
else else
{ {
ComboBox_AddString(hwnd, buf); (void)ComboBox_AddString(hwnd, buf);
} }
d = d->next; d = d->next;
} }
@ -143,8 +143,8 @@ static void PopulateForm(int pgs)
if (i == numgrpfiles) continue; // unrecognised grp file if (i == numgrpfiles) continue; // unrecognised grp file
Bsprintf(buf, "%s\t%s", grpfiles[i].name, fg->name); Bsprintf(buf, "%s\t%s", grpfiles[i].name, fg->name);
j = ListBox_AddString(hwnd, buf); j = ListBox_AddString(hwnd, buf);
ListBox_SetItemData(hwnd, j, (LPARAM)fg); (void)ListBox_SetItemData(hwnd, j, (LPARAM)fg);
if (!Bstrcasecmp(fg->name, settings.selectedgrp)) ListBox_SetCurSel(hwnd, j); if (!Bstrcasecmp(fg->name, settings.selectedgrp)) (void)ListBox_SetCurSel(hwnd, j);
} }
} }
} }
@ -195,6 +195,7 @@ static INT_PTR CALLBACK ConfigPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, L
static INT_PTR CALLBACK GamePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) static INT_PTR CALLBACK GamePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{ {
UNUSED_PARAMETER(hwndDlg);
switch (uMsg) switch (uMsg)
{ {
case WM_COMMAND: case WM_COMMAND:
@ -376,7 +377,7 @@ static INT_PTR CALLBACK startup_dlgproc(HWND hwndDlg, UINT uMsg, WPARAM wParam,
// Set a tab stop in the game data listbox // Set a tab stop in the game data listbox
{ {
DWORD tabs[1] = { 150 }; DWORD tabs[1] = { 150 };
ListBox_SetTabStops(GetDlgItem(pages[TAB_GAME], IDGDATA), 1, tabs); (void)ListBox_SetTabStops(GetDlgItem(pages[TAB_GAME], IDGDATA), 1, tabs);
} }
SetFocus(GetDlgItem(hwndDlg, WIN_STARTWIN_START)); SetFocus(GetDlgItem(hwndDlg, WIN_STARTWIN_START));

View file

@ -71,6 +71,7 @@ char testcd(char *fn, int testsiz)
#else #else
char testcd(char *fn) char testcd(char *fn)
{ {
fn = fn;
return 0; return 0;
} }
#endif #endif

View file

@ -6,6 +6,7 @@
#include <stdio.h> #include <stdio.h>
#define ISWS(x) ((x == ' ') || (x == '\t') || (x == '\r') || (x == '\n')) #define ISWS(x) ((x == ' ') || (x == '\t') || (x == '\r') || (x == '\n'))
#define UNUSED_PARAMETER(x) x=x
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInst, LPSTR lpCmdLine, int nCmdShow) int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInst, LPSTR lpCmdLine, int nCmdShow)
{ {
@ -17,6 +18,10 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInst, LPSTR lpCmdLine, in
STARTUPINFO si; STARTUPINFO si;
PROCESS_INFORMATION pi; PROCESS_INFORMATION pi;
UNUSED_PARAMETER(hInstance);
UNUSED_PARAMETER(hPrevInst);
UNUSED_PARAMETER(nCmdShow);
strcpy(sCmdLine,lpCmdLine); strcpy(sCmdLine,lpCmdLine);
szFileName[0] = '\0'; szFileName[0] = '\0';