From 945e1b2357a9911f579f7d3c8a486c341db0613f Mon Sep 17 00:00:00 2001 From: terminx Date: Fri, 21 Mar 2008 04:01:38 +0000 Subject: [PATCH] Remove -Wno-unused from Makefile git-svn-id: https://svn.eduke32.com/eduke32@649 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/build/include/compat.h | 2 + polymer/build/src/sdlayer.c | 4 +- polymer/eduke32/Makefile | 2 +- polymer/eduke32/source/actors.c | 8 +-- polymer/eduke32/source/astub.c | 26 +++++---- polymer/eduke32/source/config.c | 2 +- polymer/eduke32/source/funct.h | 2 +- polymer/eduke32/source/game.c | 10 ++-- polymer/eduke32/source/gameexec.c | 4 +- polymer/eduke32/source/jaudiolib/_multivc.h | 3 +- polymer/eduke32/source/jaudiolib/dsl.c | 4 +- polymer/eduke32/source/jaudiolib/mpu401.c | 6 ++ polymer/eduke32/source/jaudiolib/multivoc.c | 13 +++-- polymer/eduke32/source/jaudiolib/music.c | 8 ++- polymer/eduke32/source/jaudiolib/sdlmusic.c | 11 ++++ polymer/eduke32/source/jmact/_control.h | 1 - polymer/eduke32/source/jmact/control.c | 22 ++------ polymer/eduke32/source/jmact/control.h | 8 --- polymer/eduke32/source/jmact/keyboard.c | 4 -- polymer/eduke32/source/jmact/keyboard.h | 1 - polymer/eduke32/source/jmact/mouse.c | 5 -- polymer/eduke32/source/jmact/mouse.h | 1 - polymer/eduke32/source/jmact/scriplib.c | 43 +------------- polymer/eduke32/source/jmact/scriplib.h | 62 --------------------- polymer/eduke32/source/mapster32.h | 1 - polymer/eduke32/source/menus.c | 2 +- polymer/eduke32/source/osdcmds.c | 5 ++ polymer/eduke32/source/osdfuncs.c | 2 + polymer/eduke32/source/player.c | 4 +- polymer/eduke32/source/sector.c | 12 ++-- polymer/eduke32/source/sounds.c | 2 + polymer/eduke32/source/startgtk.game.c | 17 +++++- polymer/eduke32/source/startwin.game.c | 19 ++++--- polymer/eduke32/source/testcd.c | 1 + polymer/eduke32/source/wrapper.c | 5 ++ 35 files changed, 129 insertions(+), 193 deletions(-) diff --git a/polymer/build/include/compat.h b/polymer/build/include/compat.h index 0743f0f38..250d34d96 100644 --- a/polymer/build/include/compat.h +++ b/polymer/build/include/compat.h @@ -453,6 +453,8 @@ char *Bstrlwr(char *); char *Bstrupr(char *); #endif +#define UNUSED_PARAMETER(x) x=x + #ifdef __cplusplus } #endif diff --git a/polymer/build/src/sdlayer.c b/polymer/build/src/sdlayer.c index 7cd678b41..71b0e70b2 100644 --- a/polymer/build/src/sdlayer.c +++ b/polymer/build/src/sdlayer.c @@ -1732,13 +1732,13 @@ void makeasmwriteable(void) return; } 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); return; } # 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 } diff --git a/polymer/eduke32/Makefile b/polymer/eduke32/Makefile index ffbf4e2bd..9fbe791cb 100644 --- a/polymer/eduke32/Makefile +++ b/polymer/eduke32/Makefile @@ -38,7 +38,7 @@ endif CC=gcc 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 \ -I$(INC) -I$(EINC) -I$(SRC)/jmact -I$(SRC)/jaudiolib OURCXXFLAGS=-fno-exceptions -fno-rtti diff --git a/polymer/eduke32/source/actors.c b/polymer/eduke32/source/actors.c index 40ba00840..3b12753b0 100644 --- a/polymer/eduke32/source/actors.c +++ b/polymer/eduke32/source/actors.c @@ -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 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 i,a,j,sx,sy; @@ -5730,7 +5730,7 @@ static void moveeffectors(void) //STATNUM 3 updatesector(sprite[j].x,sprite[j].y,&k); if (sprite[j].extra >= 0 && k == s->sectnum) { - gutsdir(j,JIBS6,72,myconnectindex); + gutsdir(j,JIBS6,72); spritesound(SQUISHED,i); deletesprite(j); } @@ -5904,7 +5904,7 @@ static void moveeffectors(void) //STATNUM 3 updatesector(sprite[j].x,sprite[j].y,&k); if (sprite[j].extra >= 0 && k == s->sectnum) { - gutsdir(j,JIBS6,24,myconnectindex); + gutsdir(j,JIBS6,24); spritesound(SQUISHED,j); deletesprite(j); } diff --git a/polymer/eduke32/source/astub.c b/polymer/eduke32/source/astub.c index 7788caa15..72adf8474 100644 --- a/polymer/eduke32/source/astub.c +++ b/polymer/eduke32/source/astub.c @@ -291,6 +291,7 @@ void ExtLoadMap(const char *mapname) void ExtSaveMap(const char *mapname) { + UNUSED_PARAMETER(mapname); 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 totalrespawn=0; + UNUSED_PARAMETER(sectnum); if (qsetmode==200) return; @@ -818,6 +820,8 @@ void ExtShowWallData(short wallnum) //F6 int i,nextfreetag=0,total=0; char x,y; + UNUSED_PARAMETER(wallnum); + if (qsetmode==200) return; @@ -1176,10 +1180,12 @@ static void Show3dText(char *name) kclose(fp); }// end Show3dText +#if 0 static void ShowHelpText(char *name) { BFILE *fp; char x=0,y=4; + UNUSED_PARAMETER(name); if ((fp=fopenfrompath("helpdoc.txt","rb")) == NULL) { begindrawing(); @@ -1209,9 +1215,10 @@ static void ShowHelpText(char *name) Bfclose(fp); }// end ShowHelpText - +#endif void ExtShowSpriteData(short spritenum) //F6 { + UNUSED_PARAMETER(spritenum); if (qsetmode != 200) Show2dText("sehelp.hlp"); /* if (qsetmode == 200) // In 3D mode @@ -1232,12 +1239,13 @@ void ExtShowSpriteData(short spritenum) //F6 int fofsizex = -1; int fofsizey = -1; +#if 0 static void ResetFOFSize() { if (fofsizex != -1) tilesizx[FOF] = fofsizex; if (fofsizey != -1) tilesizy[FOF] = fofsizey; } - +#endif static void ExtSE40Draw(int spnum,int x,int y,int z,short a,short h) { static int tempsectorz[MAXSECTORS]; @@ -1732,9 +1740,6 @@ static int m32gettile(int idInitialTile) int i; int iTile, iTopLeftTile; 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 // 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) { int bDone = 0; - int i, j; + int i; char ch; 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) { 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 repeatcountx=0,repeatcounty=0; char smooshyalign=0, repeatpanalign=0, buffer[80]; 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) { + UNUSED_PARAMETER(parm); clearfilenames(); ExtUnInit(); uninitengine(); @@ -5382,6 +5387,7 @@ static int osdcmd_exec(const osdfuncparm_t *parm) static int osdcmd_noclip(const osdfuncparm_t *parm) { + UNUSED_PARAMETER(parm); noclip = !noclip; return OSDCMD_OK; @@ -7476,7 +7482,7 @@ static void FuncMenu(void) j=getnumber16("Size multiplier: ",1,8,0); 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++) { currsector = highlightsector[i]; @@ -7516,7 +7522,7 @@ static void FuncMenu(void) j=getnumber16("Size divisor: ",1,8,0); 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++) { currsector = highlightsector[i]; diff --git a/polymer/eduke32/source/config.c b/polymer/eduke32/source/config.c index ede5d6796..d5bf8ae44 100644 --- a/polymer/eduke32/source/config.c +++ b/polymer/eduke32/source/config.c @@ -181,7 +181,7 @@ void CONFIG_SetDefaultKeys(int type) void CONFIG_SetDefaults(void) { // JBF 20031211 - int32 i,f; + int32 i; ud.config.scripthandle = -1; ud.config.ScreenWidth = 1024; diff --git a/polymer/eduke32/source/funct.h b/polymer/eduke32/source/funct.h index 4a01607bf..b3c5210fa 100644 --- a/polymer/eduke32/source/funct.h +++ b/polymer/eduke32/source/funct.h @@ -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 void insertspriteq(int i); 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 clearsectinterpolate(int i); extern int ifhitsectors(int sectnum); diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 7e6ddc1eb..ec4c91fca 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -65,8 +65,10 @@ extern int getversionfromwebsite(char *buffer); int cameradist = 0, cameraclock = 0; 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_NoSetup = 0; static int g_NoAutoLoad = 0; @@ -9815,7 +9817,7 @@ static void genspriteremaps(void) extern int startwin_run(void); static void SetupGameButtons(void); -static void Startup(int argc, const char **argv) +static void Startup(void) { int i; @@ -10479,7 +10481,7 @@ void app_main(int argc,const char **argv) 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) ud.multimode = numplayers; diff --git a/polymer/eduke32/source/gameexec.c b/polymer/eduke32/source/gameexec.c index ee553db73..f491f4fbe 100644 --- a/polymer/eduke32/source/gameexec.c +++ b/polymer/eduke32/source/gameexec.c @@ -4673,7 +4673,7 @@ static int parse(void) { 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); spawn(g_i,BLOODPOOL); } @@ -6173,7 +6173,7 @@ static int parse(void) case CON_GUTS: insptr += 2; - guts(g_i,*(insptr-1),*insptr,g_p); + guts(g_i,*(insptr-1),*insptr); insptr++; break; diff --git a/polymer/eduke32/source/jaudiolib/_multivc.h b/polymer/eduke32/source/jaudiolib/_multivc.h index 610a2f5df..9c7d6937b 100644 --- a/polymer/eduke32/source/jaudiolib/_multivc.h +++ b/polymer/eduke32/source/jaudiolib/_multivc.h @@ -219,8 +219,9 @@ typedef MONO16 VOLUME16[ 256 ]; typedef char HARSH_CLIP_TABLE_8[ MV_NumVoices * 256 ]; +#if defined(_WIN32) static unsigned MV_GetBufferSize(unsigned); - +#endif static void MV_Mix(VoiceNode *voice, int buffer); static void MV_PlayVoice(VoiceNode *voice); static void MV_StopVoice(VoiceNode *voice); diff --git a/polymer/eduke32/source/jaudiolib/dsl.c b/polymer/eduke32/source/jaudiolib/dsl.c index 766037b07..b18bd1c52 100755 --- a/polymer/eduke32/source/jaudiolib/dsl.c +++ b/polymer/eduke32/source/jaudiolib/dsl.c @@ -112,7 +112,8 @@ static void mixer_callback(int chan, void *stream, int len, void *udata) Uint8 *stptr; Uint8 *fxptr; int copysize; - + UNUSED_PARAMETER(chan); + UNUSED_PARAMETER(udata); /* len should equal _BufferSize, else this is screwed up */ stptr = (Uint8 *)stream; @@ -263,6 +264,7 @@ int DisableInterrupts(void) int RestoreInterrupts(int flags) { + UNUSED_PARAMETER(flags); SDL_UnlockAudio(); return(0); } diff --git a/polymer/eduke32/source/jaudiolib/mpu401.c b/polymer/eduke32/source/jaudiolib/mpu401.c index 3b2e112f9..ae408e2df 100644 --- a/polymer/eduke32/source/jaudiolib/mpu401.c +++ b/polymer/eduke32/source/jaudiolib/mpu401.c @@ -31,6 +31,7 @@ Modifications for JonoF's port by Jonathon Fowler (jonof@edgenetwk.com) **********************************************************************/ #include "mpu401.h" +#include "compat.h" #define WIN32_LEAN_AND_MEAN #include @@ -114,6 +115,10 @@ void MPU_Unpause(void) void CALLBACK MPU_MIDICallback(HMIDIOUT handle, UINT uMsg, DWORD dwInstance, DWORD dwParam1, DWORD dwParam2) { int i; + + UNUSED_PARAMETER(dwInstance); + UNUSED_PARAMETER(dwParam2); + switch (uMsg) { case MOM_DONE: @@ -478,6 +483,7 @@ void MPU_SetVolume(int volume) mixerClose(hmixer); */ + UNUSED_PARAMETER(volume); } int MPU_GetVolume(void) diff --git a/polymer/eduke32/source/jaudiolib/multivoc.c b/polymer/eduke32/source/jaudiolib/multivoc.c index 2402ab317..dd3ace4e5 100644 --- a/polymer/eduke32/source/jaudiolib/multivoc.c +++ b/polymer/eduke32/source/jaudiolib/multivoc.c @@ -251,6 +251,7 @@ char *MV_ErrorString(int ErrorNumber) Returns the buffer size for the given samplerate. ---------------------------------------------------------------------*/ +#if defined(_WIN32) #define BASEBUFSZ (512+128) static unsigned MV_GetBufferSize(unsigned samplerate) { @@ -272,7 +273,7 @@ static unsigned MV_GetBufferSize(unsigned samplerate) return lastbufsz; } - +#endif /*--------------------------------------------------------------------- Function: MV_Mix @@ -417,6 +418,8 @@ int MV_ServiceVoc(int buffer) // Get the currently playing buffer #if defined(_WIN32) MV_MixPage = buffer; +#else + UNUSED_PARAMETER(buffer); #endif // Toggle which buffer we'll mix next @@ -1794,16 +1797,18 @@ int SeekOgg(void *datasource,ogg_int64_t offset,int whence) return 0; } -long TellOgg(void *datasource) +intptr_t TellOgg(void *datasource) { sounddef *d=(sounddef *)datasource; return d->pos; } +/* int CloseOgg(void *datasource) { return 0; } +*/ /*--------------------------------------------------------------------- Function: MV_StartPlayback @@ -1816,10 +1821,10 @@ int MV_StartPlayback(void) int status; int buffer; - cb.close_func=CloseOgg; + cb.close_func=NULL; //CloseOgg cb.read_func =ReadOgg; cb.seek_func =SeekOgg; - cb.tell_func =TellOgg; + cb.tell_func =(void *)TellOgg; // Initialize the buffers ClearBuffer_DW(MV_MixBuffer[ 0 ], MV_Silence, TotalBufferSize >> 2); diff --git a/polymer/eduke32/source/jaudiolib/music.c b/polymer/eduke32/source/jaudiolib/music.c index 8661c5bdc..a96d710ef 100644 --- a/polymer/eduke32/source/jaudiolib/music.c +++ b/polymer/eduke32/source/jaudiolib/music.c @@ -34,6 +34,7 @@ Modifications for JonoF's port by Jonathon Fowler (jonof@edgenetwk.com) #include "music.h" #include "midi.h" #include "mpu401.h" +#include "compat.h" #ifdef USE_OPENAL #include "openal.h" #endif @@ -502,6 +503,8 @@ int MUSIC_InitMidi ) { + UNUSED_PARAMETER(card); + UNUSED_PARAMETER(Address); Funcs->NoteOff = MPU_NoteOff; Funcs->NoteOn = MPU_NoteOn; Funcs->PolyAftertouch = MPU_PolyAftertouch; @@ -534,6 +537,7 @@ int MUSIC_FadeVolume ) { + UNUSED_PARAMETER(milliseconds); MIDI_SetVolume(tovolume); return(MUSIC_Ok); } @@ -598,7 +602,9 @@ void MUSIC_RegisterTimbreBank unsigned char *timbres ) -{} +{ + UNUSED_PARAMETER(timbres); +} void MUSIC_Update(void) diff --git a/polymer/eduke32/source/jaudiolib/sdlmusic.c b/polymer/eduke32/source/jaudiolib/sdlmusic.c index 9608f3be8..00e8cd811 100755 --- a/polymer/eduke32/source/jaudiolib/sdlmusic.c +++ b/polymer/eduke32/source/jaudiolib/sdlmusic.c @@ -356,36 +356,44 @@ int MUSIC_GetContext(void) void MUSIC_SetSongTick(unsigned int PositionInTicks) { + UNUSED_PARAMETER(PositionInTicks); musdebug("STUB ... MUSIC_SetSongTick().\n"); } // MUSIC_SetSongTick void MUSIC_SetSongTime(unsigned int milliseconds) { + UNUSED_PARAMETER(milliseconds); musdebug("STUB ... MUSIC_SetSongTime().\n"); }// MUSIC_SetSongTime void MUSIC_SetSongPosition(int measure, int beat, int tick) { + UNUSED_PARAMETER(measure); + UNUSED_PARAMETER(beat); + UNUSED_PARAMETER(tick); musdebug("STUB ... MUSIC_SetSongPosition().\n"); } // MUSIC_SetSongPosition void MUSIC_GetSongPosition(songposition *pos) { + UNUSED_PARAMETER(pos); musdebug("STUB ... MUSIC_GetSongPosition().\n"); } // MUSIC_GetSongPosition void MUSIC_GetSongLength(songposition *pos) { + UNUSED_PARAMETER(pos); musdebug("STUB ... MUSIC_GetSongLength().\n"); } // MUSIC_GetSongLength int MUSIC_FadeVolume(int tovolume, int milliseconds) { + UNUSED_PARAMETER(tovolume); Mix_FadeOutMusic(milliseconds); return(MUSIC_Ok); } // MUSIC_FadeVolume @@ -405,12 +413,15 @@ void MUSIC_StopFade(void) 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"); } // MUSIC_RerouteMidiChannel void MUSIC_RegisterTimbreBank(unsigned char *timbres) { + UNUSED_PARAMETER(timbres); musdebug("STUB ... MUSIC_RegisterTimbreBank().\n"); } // MUSIC_RegisterTimbreBank diff --git a/polymer/eduke32/source/jmact/_control.h b/polymer/eduke32/source/jmact/_control.h index a917566dc..d9ef1712d 100644 --- a/polymer/eduke32/source/jmact/_control.h +++ b/polymer/eduke32/source/jmact/_control.h @@ -254,7 +254,6 @@ byte CONTROL_GetMouseButtons( void ); boolean CONTROL_StartMouse( void ); void CONTROL_GetJoyAbs( void ); void CONTROL_GetJoyDelta( void ); -void CONTROL_SetJoyScale( void ); boolean CONTROL_StartJoy( int32 joy ); void CONTROL_ShutJoy( int32 joy ); void CONTROL_SetFlag( int32 which, boolean active ); diff --git a/polymer/eduke32/source/jmact/control.c b/polymer/eduke32/source/jmact/control.c index b835e7442..5f1801507 100644 --- a/polymer/eduke32/source/jmact/control.c +++ b/polymer/eduke32/source/jmact/control.c @@ -27,7 +27,7 @@ uint32 CONTROL_ButtonHeldState1 = 0; uint32 CONTROL_ButtonState2 = 0; uint32 CONTROL_ButtonHeldState2 = 0; -static int32 CONTROL_UserInputDelay = -1; +// static int32 CONTROL_UserInputDelay = -1; static int32 CONTROL_MouseSensitivity = DEFAULTMOUSESENSITIVITY; static int32 CONTROL_NumMouseButtons = 0; static int32 CONTROL_NumMouseAxes = 0; @@ -108,29 +108,15 @@ void CONTROL_GetJoyDelta( void ) 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) { + UNUSED_PARAMETER(joy); return (inputdevices & 4) == 4; } void CONTROL_ShutJoy(int32 joy) { + UNUSED_PARAMETER(joy); CONTROL_JoyPresent = false; } @@ -834,6 +820,8 @@ boolean CONTROL_Startup(controltype which, int32 ( *TimeFunction )( void ), int3 { int32 i; + UNUSED_PARAMETER(which); + if (CONTROL_Started) return false; if (TimeFunction) GetTime = TimeFunction; diff --git a/polymer/eduke32/source/jmact/control.h b/polymer/eduke32/source/jmact/control.h index 4cd084171..ff524d003 100644 --- a/polymer/eduke32/source/jmact/control.h +++ b/polymer/eduke32/source/jmact/control.h @@ -174,14 +174,6 @@ void CONTROL_ClearButton( int32 whichbutton ); void CONTROL_ClearUserInput( UserInput *info ); void CONTROL_WaitRelease( 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 ); void CONTROL_SetMouseSensitivity( int32 newsensitivity ); boolean CONTROL_Startup diff --git a/polymer/eduke32/source/jmact/keyboard.c b/polymer/eduke32/source/jmact/keyboard.c index 306633a38..46b1b52ed 100644 --- a/polymer/eduke32/source/jmact/keyboard.c +++ b/polymer/eduke32/source/jmact/keyboard.c @@ -217,10 +217,6 @@ char KB_Getch( void ) return (char)bgetchar(); } -void KB_Addch( char ch ) -{ -} - void KB_FlushKeyboardQueue( void ) { //keyfifoplc = keyfifoend = 0; diff --git a/polymer/eduke32/source/jmact/keyboard.h b/polymer/eduke32/source/jmact/keyboard.h index 059cf9092..65d312035 100644 --- a/polymer/eduke32/source/jmact/keyboard.h +++ b/polymer/eduke32/source/jmact/keyboard.h @@ -210,7 +210,6 @@ extern kb_scancode KB_LastScan; boolean KB_KeyWaiting( void ); // Checks if a character is waiting in the keyboard queue 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_ClearKeysDown( void ); // Clears all keys down flags. char * KB_ScanCodeToString( kb_scancode scancode ); // convert scancode into a string diff --git a/polymer/eduke32/source/jmact/mouse.c b/polymer/eduke32/source/jmact/mouse.c index 93fa8f312..b866cb7b1 100644 --- a/polymer/eduke32/source/jmact/mouse.c +++ b/polymer/eduke32/source/jmact/mouse.c @@ -75,11 +75,6 @@ int32 MOUSE_ClearButton( int32 b ) } -void MOUSE_GetPosition( int32*x, int32*y ) -{ -} - - void MOUSE_GetDelta( int32*x, int32*y ) { readmousexy(x,y); diff --git a/polymer/eduke32/source/jmact/mouse.h b/polymer/eduke32/source/jmact/mouse.h index 7eb71aa61..4f981c3f3 100644 --- a/polymer/eduke32/source/jmact/mouse.h +++ b/polymer/eduke32/source/jmact/mouse.h @@ -47,7 +47,6 @@ void MOUSE_ShowCursor( void ); void MOUSE_HideCursor( void ); int32 MOUSE_GetButtons( void ); int32 MOUSE_ClearButton( int32 b ); -void MOUSE_GetPosition( int32*x, int32*y ); void MOUSE_GetDelta( int32*x, int32*y ); #ifdef __cplusplus diff --git a/polymer/eduke32/source/jmact/scriplib.c b/polymer/eduke32/source/jmact/scriplib.c index 68adb76f4..0064c018f 100644 --- a/polymer/eduke32/source/jmact/scriplib.c +++ b/polymer/eduke32/source/jmact/scriplib.c @@ -410,11 +410,6 @@ void SCRIPT_Free( int32 scripthandle ) SCRIPT_Delete(scripthandle); } -int32 SCRIPT_Parse ( char *data, int32 length, char * name ) -{ - return 0; -} - int32 SCRIPT_Load ( char * filename ) { int32 s,h,l; @@ -735,42 +730,6 @@ boolean SCRIPT_GetBoolean( int32 scripthandle, char * sectionname, char * entryn 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 ) { SCRIPT_AddSection(scripthandle, sectionname); @@ -879,6 +838,7 @@ void SCRIPT_PutNumber { char raw[64]; + UNUSED_PARAMETER(defaultvalue); if (hexadecimal) sprintf(raw, "0x%X", number); else sprintf(raw, "%d", number); @@ -911,6 +871,7 @@ void SCRIPT_PutDouble { char raw[64]; + UNUSED_PARAMETER(defaultvalue); sprintf(raw, "%g", number); SCRIPT_AddEntry(scripthandle, sectionname, entryname, raw); diff --git a/polymer/eduke32/source/jmact/scriplib.h b/polymer/eduke32/source/jmact/scriplib.h index ab8d1b7e9..072f90547 100644 --- a/polymer/eduke32/source/jmact/scriplib.h +++ b/polymer/eduke32/source/jmact/scriplib.h @@ -51,17 +51,6 @@ int32 SCRIPT_Init( char * name ); */ 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 ); -/* -============== -= -= 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, - ... - ); - /* ============== = diff --git a/polymer/eduke32/source/mapster32.h b/polymer/eduke32/source/mapster32.h index 72273c54f..e3a6dc3d9 100644 --- a/polymer/eduke32/source/mapster32.h +++ b/polymer/eduke32/source/mapster32.h @@ -99,7 +99,6 @@ int xvel, yvel, timoff; static void SearchSectorsForward(); static void SearchSectorsBackward(); 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 SetBOSS1Palette(); static void SetSLIMEPalette(); diff --git a/polymer/eduke32/source/menus.c b/polymer/eduke32/source/menus.c index 145530337..8f0489d11 100644 --- a/polymer/eduke32/source/menus.c +++ b/polymer/eduke32/source/menus.c @@ -32,7 +32,7 @@ extern int recfilep; //extern char vgacompatible; short globalskillsound=-1; 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 char menunamecnt; diff --git a/polymer/eduke32/source/osdcmds.c b/polymer/eduke32/source/osdcmds.c index d73eb8728..b1a321a37 100644 --- a/polymer/eduke32/source/osdcmds.c +++ b/polymer/eduke32/source/osdcmds.c @@ -35,6 +35,7 @@ struct osdcmd_cheatsinfo osdcmd_cheatsinfo_stat; static inline int osdcmd_quit(const osdfuncparm_t *parm) { + UNUSED_PARAMETER(parm); sendquit(); return OSDCMD_OK; } @@ -261,6 +262,7 @@ static int osdcmd_map(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) { 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) { + UNUSED_PARAMETER(parm); if (numplayers == 1 && g_player[myconnectindex].ps->gm & MODE_GAME) { 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) { + UNUSED_PARAMETER(parm); SoundShutdown(); MusicShutdown(); @@ -372,6 +376,7 @@ static int osdcmd_restartsound(const osdfuncparm_t *parm) static int osdcmd_restartvid(const osdfuncparm_t *parm) { + UNUSED_PARAMETER(parm); resetvideomode(); if (setgamemode(ud.config.ScreenMode,ud.config.ScreenWidth,ud.config.ScreenHeight,ud.config.ScreenBPP)) gameexit("restartvid: Reset failed...\n"); diff --git a/polymer/eduke32/source/osdfuncs.c b/polymer/eduke32/source/osdfuncs.c index 751509216..6e2634456 100644 --- a/polymer/eduke32/source/osdfuncs.c +++ b/polymer/eduke32/source/osdfuncs.c @@ -76,6 +76,8 @@ void GAME_clearbackground(int c, int r) int x, y, xsiz, ysiz, tx2, ty2; int daydim, bits; + UNUSED_PARAMETER(c); + if (getrendermode() < 3) bits = BITS; else bits = BITSTL; diff --git a/polymer/eduke32/source/player.c b/polymer/eduke32/source/player.c index 22cccfc42..8e7fb0ffc 100644 --- a/polymer/eduke32/source/player.c +++ b/polymer/eduke32/source/player.c @@ -103,7 +103,7 @@ void quickkill(player_struct *p) sprite[p->i].extra = 0; 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; } @@ -4576,7 +4576,7 @@ HORIZONLY: p->weapon_pos = -p->weapon_pos; 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); spritesound(SQUISHED,p->actorsqu); switch (dynamictostatic[sprite[p->actorsqu].picnum]) diff --git a/polymer/eduke32/source/sector.c b/polymer/eduke32/source/sector.c index b366ead48..60afc7cb2 100644 --- a/polymer/eduke32/source/sector.c +++ b/polymer/eduke32/source/sector.c @@ -2340,12 +2340,12 @@ void checkhitsprite(int i,int sn) shoot(i,BLOODSPLAT3); SA = TRAND&2047; shoot(i,BLOODSPLAT4); - guts(i,JIBS1,1,myconnectindex); - guts(i,JIBS2,2,myconnectindex); - guts(i,JIBS3,3,myconnectindex); - guts(i,JIBS4,4,myconnectindex); - guts(i,JIBS5,1,myconnectindex); - guts(i,JIBS3,6,myconnectindex); + guts(i,JIBS1,1); + guts(i,JIBS2,2); + guts(i,JIBS3,3); + guts(i,JIBS4,4); + guts(i,JIBS5,1); + guts(i,JIBS3,6); sound(SQUISHED); deletesprite(i); break; diff --git a/polymer/eduke32/source/sounds.c b/polymer/eduke32/source/sounds.c index bec32a159..e06731586 100644 --- a/polymer/eduke32/source/sounds.c +++ b/polymer/eduke32/source/sounds.c @@ -504,6 +504,7 @@ int spritesound(unsigned int num, int i) void stopspritesound(int num, int i) { + UNUSED_PARAMETER(i); stopsound(num); } @@ -665,6 +666,7 @@ void clearsoundlocks(void) int isspritemakingsound(int i, int num) { + UNUSED_PARAMETER(i); if (num < 0) num=0; // FIXME return (g_sounds[num].num > 0); } diff --git a/polymer/eduke32/source/startgtk.game.c b/polymer/eduke32/source/startgtk.game.c index 13f4db6e7..32a8c7078 100755 --- a/polymer/eduke32/source/startgtk.game.c +++ b/polymer/eduke32/source/startgtk.game.c @@ -167,6 +167,7 @@ static void on_vmode3dcombo_changed(GtkComboBox *combobox, gpointer user_data) GtkTreeModel *data; GtkTreeIter iter; int val; + UNUSED_PARAMETER(user_data); if (!gtk_combo_box_get_active_iter(combobox, &iter)) return; if (!(data = gtk_combo_box_get_model(combobox))) return; 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) { + UNUSED_PARAMETER(user_data); settings.fullscreen = (gtk_toggle_button_get_active(togglebutton) == TRUE); PopulateForm(1<devs; @@ -112,12 +112,12 @@ static void PopulateForm(int pgs) for (j=0; d->devs[j]; j++) { strcpy(n, d->devs[j]); - ComboBox_AddString(hwnd, buf); + (void)ComboBox_AddString(hwnd, buf); } } else { - ComboBox_AddString(hwnd, buf); + (void)ComboBox_AddString(hwnd, buf); } d = d->next; } @@ -143,8 +143,8 @@ static void PopulateForm(int pgs) if (i == numgrpfiles) continue; // unrecognised grp file Bsprintf(buf, "%s\t%s", grpfiles[i].name, fg->name); j = ListBox_AddString(hwnd, buf); - ListBox_SetItemData(hwnd, j, (LPARAM)fg); - if (!Bstrcasecmp(fg->name, settings.selectedgrp)) ListBox_SetCurSel(hwnd, j); + (void)ListBox_SetItemData(hwnd, j, (LPARAM)fg); + 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) { + UNUSED_PARAMETER(hwndDlg); switch (uMsg) { 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 { 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)); diff --git a/polymer/eduke32/source/testcd.c b/polymer/eduke32/source/testcd.c index cef440b66..1e4e3081d 100644 --- a/polymer/eduke32/source/testcd.c +++ b/polymer/eduke32/source/testcd.c @@ -71,6 +71,7 @@ char testcd(char *fn, int testsiz) #else char testcd(char *fn) { + fn = fn; return 0; } #endif diff --git a/polymer/eduke32/source/wrapper.c b/polymer/eduke32/source/wrapper.c index 1f04421d4..aea10be3e 100755 --- a/polymer/eduke32/source/wrapper.c +++ b/polymer/eduke32/source/wrapper.c @@ -6,6 +6,7 @@ #include #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) { @@ -17,6 +18,10 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInst, LPSTR lpCmdLine, in STARTUPINFO si; PROCESS_INFORMATION pi; + UNUSED_PARAMETER(hInstance); + UNUSED_PARAMETER(hPrevInst); + UNUSED_PARAMETER(nCmdShow); + strcpy(sCmdLine,lpCmdLine); szFileName[0] = '\0';