diff options
author | Andree Buschmann <AndreeBuschmann@t-online.de> | 2011-05-08 21:06:38 +0000 |
---|---|---|
committer | Andree Buschmann <AndreeBuschmann@t-online.de> | 2011-05-08 21:06:38 +0000 |
commit | 67f215032d8bab2571aad2da739d72512c064ca4 (patch) | |
tree | b39689b5947f0522ca16fd79900906981951cd8f /apps/plugins/doom | |
parent | ab99e941dbf0481a1c0abb3767a745d23b53bfd2 (diff) |
Fix a bunch of 'variable set but not used' warnings reported from GCC 4.6.0.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29841 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/doom')
-rw-r--r-- | apps/plugins/doom/am_map.c | 2 | ||||
-rw-r--r-- | apps/plugins/doom/d_main.c | 2 | ||||
-rw-r--r-- | apps/plugins/doom/g_game.c | 9 | ||||
-rw-r--r-- | apps/plugins/doom/hu_lib.c | 4 | ||||
-rw-r--r-- | apps/plugins/doom/i_sound.c | 15 | ||||
-rw-r--r-- | apps/plugins/doom/m_menu.c | 14 | ||||
-rw-r--r-- | apps/plugins/doom/p_doors.c | 2 | ||||
-rw-r--r-- | apps/plugins/doom/p_spec.c | 5 | ||||
-rw-r--r-- | apps/plugins/doom/v_video.c | 3 | ||||
-rw-r--r-- | apps/plugins/doom/wi_stuff.c | 3 |
10 files changed, 18 insertions, 41 deletions
diff --git a/apps/plugins/doom/am_map.c b/apps/plugins/doom/am_map.c index ff74e9938f..88e27b4dc2 100644 --- a/apps/plugins/doom/am_map.c +++ b/apps/plugins/doom/am_map.c @@ -632,7 +632,6 @@ boolean AM_Responder ( event_t* ev ) { int rc; - static int cheatstate=0; static int bigstate=0; static char buffer[20]; int ch; // phares @@ -732,7 +731,6 @@ boolean AM_Responder } else // phares { - cheatstate=0; rc = false; } } diff --git a/apps/plugins/doom/d_main.c b/apps/plugins/doom/d_main.c index 498d93cb62..be45e6a37e 100644 --- a/apps/plugins/doom/d_main.c +++ b/apps/plugins/doom/d_main.c @@ -179,7 +179,6 @@ void D_Display (void) { static boolean isborderstate IDATA_ATTR= false; static boolean borderwillneedredraw IDATA_ATTR= false; - static boolean inhelpscreensstate IDATA_ATTR= false; static gamestate_t oldgamestate IDATA_ATTR= -1; boolean wipe; boolean viewactive = false, isborder = false; @@ -254,7 +253,6 @@ void D_Display (void) HU_Drawer(); } - inhelpscreensstate = inhelpscreens; isborderstate = isborder; oldgamestate = wipegamestate = gamestate; diff --git a/apps/plugins/doom/g_game.c b/apps/plugins/doom/g_game.c index 8aab9fc3cf..e41c84c378 100644 --- a/apps/plugins/doom/g_game.c +++ b/apps/plugins/doom/g_game.c @@ -1549,7 +1549,7 @@ static const size_t num_version_headers = sizeof(version_headers) / sizeof(versi void G_DoLoadGame(void) { - int length, i; + int i; // CPhipps - do savegame filename stuff here char name[100+1]; // killough 3/22/98 int savegame_compatibility = -1; @@ -1558,7 +1558,7 @@ void G_DoLoadGame(void) gameaction = ga_nothing; - length = M_ReadFile(name, &savebuffer); + M_ReadFile(name, &savebuffer); save_p = savebuffer + SAVESTRINGSIZE; // CPhipps - read the description field, compare with supported ones @@ -2565,7 +2565,6 @@ static const byte* G_ReadDemoHeader(const byte *demo_p) skill_t skill; int i, episode, map; int demover; - const byte *option_p = NULL; /* killough 11/98 */ basetic = gametic; // killough 9/29/98 @@ -2674,10 +2673,6 @@ static const byte* G_ReadDemoHeader(const byte *demo_p) deathmatch = *demo_p++; consoleplayer = *demo_p++; - /* killough 11/98: save option pointer for below */ - if (mbf_features) - option_p = demo_p; - demo_p = G_ReadOptions(demo_p); // killough 3/1/98: Read game options if (demover == 200) // killough 6/3/98: partially fix v2.00 demos diff --git a/apps/plugins/doom/hu_lib.c b/apps/plugins/doom/hu_lib.c index df2fa883ec..eacb26b287 100644 --- a/apps/plugins/doom/hu_lib.c +++ b/apps/plugins/doom/hu_lib.c @@ -532,7 +532,7 @@ void HUlib_drawMBg // void HUlib_drawMText(hu_mtext_t* m) { - int i, idx, y; + int i, idx; hu_textline_t *l; if (!*m->on) @@ -541,7 +541,7 @@ void HUlib_drawMText(hu_mtext_t* m) // draw everything if (hud_list_bgon) HUlib_drawMBg(m->x,m->y,m->w,m->h,m->bg); - y = m->y + HU_REFRESHSPACING; + for (i=0 ; i<m->nl ; i++) { idx = m->cl - i; diff --git a/apps/plugins/doom/i_sound.c b/apps/plugins/doom/i_sound.c index 35cecd8abb..2d7b592818 100644 --- a/apps/plugins/doom/i_sound.c +++ b/apps/plugins/doom/i_sound.c @@ -534,26 +534,27 @@ static int musicdies=-1; void I_PlaySong(int handle, int looping) { // UNUSED. - handle = looping = 0; + (void)handle; + (void)looping; musicdies = gametic + TICRATE*30; } void I_PauseSong (int handle) { // UNUSED. - handle = 0; + (void)handle; } void I_ResumeSong (int handle) { // UNUSED. - handle = 0; + (void)handle; } void I_StopSong(int handle) { // UNUSED. - handle = 0; + (void)handle; looping = 0; musicdies = 0; @@ -562,13 +563,13 @@ void I_StopSong(int handle) void I_UnRegisterSong(int handle) { // UNUSED. - handle = 0; + (void)handle; } int I_RegisterSong(const void *data) { // UNUSED. - data = NULL; + (void)data; return 1; } @@ -577,7 +578,7 @@ int I_RegisterSong(const void *data) int I_QrySongPlaying(int handle) { // UNUSED. - handle = 0; + (void)handle; return looping || musicdies > gametic; } diff --git a/apps/plugins/doom/m_menu.c b/apps/plugins/doom/m_menu.c index b0b0f9fff8..aa82959aaf 100644 --- a/apps/plugins/doom/m_menu.c +++ b/apps/plugins/doom/m_menu.c @@ -522,7 +522,6 @@ menu_t SaveDef = void M_ReadSaveStrings(void) { int handle; - int count; int i; char name[256]; @@ -540,7 +539,7 @@ void M_ReadSaveStrings(void) LoadMenu[i].status = 0; continue; } - count = read (handle, &savegamestrings[i], SAVESTRINGSIZE); + read (handle, &savegamestrings[i], SAVESTRINGSIZE); close (handle); LoadMenu[i].status = 1; } @@ -1027,8 +1026,7 @@ void M_Options(int choice) // void M_ChangeMessages(int choice) { - // warning: unused parameter `int choice' - choice = 0; + (void)choice; showMessages = 1 - showMessages; if (!showMessages) @@ -1059,7 +1057,7 @@ void M_EndGameResponse(int ch) void M_EndGame(int choice) { - choice = 0; + (void)choice; if (!usergame) { S_StartSound(NULL,sfx_oof); @@ -1083,19 +1081,19 @@ void M_EndGame(int choice) // void M_ReadThis(int choice) { - choice = 0; + (void)choice; M_SetupNextMenu(&ReadDef1); } void M_ReadThis2(int choice) { - choice = 0; + (void)choice; M_SetupNextMenu(&ReadDef2); } void M_FinishReadThis(int choice) { - choice = 0; + (void)choice; M_SetupNextMenu(&MainDef); } diff --git a/apps/plugins/doom/p_doors.c b/apps/plugins/doom/p_doors.c index 0b6d777e17..750b3474bd 100644 --- a/apps/plugins/doom/p_doors.c +++ b/apps/plugins/doom/p_doors.c @@ -434,7 +434,6 @@ int EV_VerticalDoor mobj_t* thing ) { player_t* player; - int secnum; sector_t* sec; vldoor_t* door; @@ -492,7 +491,6 @@ int EV_VerticalDoor // get the sector on the second side of activating linedef sec = sides[line->sidenum[1]].sector; - secnum = sec-sectors; /* if door already has a thinker, use it * cph 2001/04/05 - diff --git a/apps/plugins/doom/p_spec.c b/apps/plugins/doom/p_spec.c index f2757f8399..8ad77a732d 100644 --- a/apps/plugins/doom/p_spec.c +++ b/apps/plugins/doom/p_spec.c @@ -2394,11 +2394,6 @@ void P_SpawnSpecials (void) { sector_t* sector; int i; - int episode; - - episode = 1; - if (W_CheckNumForName("texture2") >= 0) - episode = 2; // See if -timer needs to be used. levelTimer = false; diff --git a/apps/plugins/doom/v_video.c b/apps/plugins/doom/v_video.c index 76993ea5ee..8c475614ff 100644 --- a/apps/plugins/doom/v_video.c +++ b/apps/plugins/doom/v_video.c @@ -525,12 +525,9 @@ void V_DrawMemPatch(int x, int y, int scrn, const patch_t *patch, int DXI = (320<<16) / SCREENWIDTH; int DY = (SCREENHEIGHT<<16) / 200; register int DYI = (200<<16) / SCREENHEIGHT; - int DY2, DYI2; stretchx = ( x * DX ) >> 16; stretchy = ( y * DY ) >> 16; - DY2 = DY / 2; - DYI2 = DYI* 2; if (!scrn) V_MarkRect ( stretchx, stretchy, (SHORT( patch->width ) * DX ) >> 16, diff --git a/apps/plugins/doom/wi_stuff.c b/apps/plugins/doom/wi_stuff.c index 5aec366026..7c7831d084 100644 --- a/apps/plugins/doom/wi_stuff.c +++ b/apps/plugins/doom/wi_stuff.c @@ -1176,11 +1176,8 @@ void WI_drawDeathmatchStats(void) int y; int w; - int lh; // line height int halfface = V_NamePatchWidth(facebackp)/2; - lh = WI_SPACINGY; - WI_slamBackground(); // draw animated background |