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
This commit is contained in:
parent
ab99e941db
commit
67f215032d
18 changed files with 54 additions and 55 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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 -
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -345,7 +345,9 @@ static int show_menu(void) /* return 1 to quit */
|
|||
static int ask_and_get_audio_buffer(const char *filename)
|
||||
{
|
||||
int button;
|
||||
#if defined(IMGVIEW_ZOOM_PRE)
|
||||
int lastbutton = BUTTON_NONE;
|
||||
#endif
|
||||
rb->lcd_setfont(FONT_SYSFIXED);
|
||||
rb->lcd_clear_display();
|
||||
rb->lcd_puts(0, 0, rb->strrchr(filename,'/')+1);
|
||||
|
@ -414,9 +416,10 @@ static int ask_and_get_audio_buffer(const char *filename)
|
|||
== SYS_USB_CONNECTED)
|
||||
return PLUGIN_USB_CONNECTED;
|
||||
}
|
||||
|
||||
#if defined(IMGVIEW_ZOOM_PRE)
|
||||
if (button != BUTTON_NONE)
|
||||
lastbutton = button;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#endif /* USE_PLUG_BUF */
|
||||
|
@ -548,7 +551,9 @@ static void pan_view_down(struct image_info *info)
|
|||
static int scroll_bmp(struct image_info *info)
|
||||
{
|
||||
int button;
|
||||
#if defined(IMGVIEW_ZOOM_PRE) || defined(IMGVIEW_MENU_PRE)
|
||||
int lastbutton = BUTTON_NONE;
|
||||
#endif
|
||||
|
||||
while (true)
|
||||
{
|
||||
|
@ -669,9 +674,10 @@ static int scroll_bmp(struct image_info *info)
|
|||
break;
|
||||
|
||||
} /* switch */
|
||||
|
||||
#if defined(IMGVIEW_ZOOM_PRE) || defined(IMGVIEW_MENU_PRE)
|
||||
if (button != BUTTON_NONE)
|
||||
lastbutton = button;
|
||||
#endif
|
||||
} /* while (true) */
|
||||
}
|
||||
|
||||
|
|
|
@ -136,11 +136,10 @@ int midi_debug(const char *fmt, ...)
|
|||
{
|
||||
static int p_xtpt = 0;
|
||||
char p_buf[50];
|
||||
bool ok;
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, fmt);
|
||||
ok = rb->vsnprintf(p_buf,sizeof(p_buf), fmt, ap);
|
||||
rb->vsnprintf(p_buf,sizeof(p_buf), fmt, ap);
|
||||
va_end(ap);
|
||||
|
||||
int i=0;
|
||||
|
|
|
@ -692,7 +692,9 @@ enum minesweeper_status minesweeper( void )
|
|||
{
|
||||
int i, j;
|
||||
int button;
|
||||
#if defined(HAVE_TOUCHSCREEN) || defined(MINESWP_TOGGLE_PRE)
|
||||
int lastbutton = BUTTON_NONE;
|
||||
#endif
|
||||
|
||||
/* the cursor coordinates */
|
||||
int x=0, y=0;
|
||||
|
@ -898,8 +900,10 @@ enum minesweeper_status minesweeper( void )
|
|||
return MINESWEEPER_USB;
|
||||
break;
|
||||
}
|
||||
#if defined(HAVE_TOUCHSCREEN) || defined(MINESWP_TOGGLE_PRE)
|
||||
if( button != BUTTON_NONE )
|
||||
lastbutton = button;
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -607,7 +607,7 @@ static void draw_oriented_mono_bitmap_part(const unsigned char *src,
|
|||
{
|
||||
const unsigned char *src_end;
|
||||
fb_data *dst, *dst_end;
|
||||
unsigned fg_pattern, bg_pattern;
|
||||
unsigned fg_pattern;
|
||||
|
||||
if (x + width > SCREEN_WIDTH)
|
||||
width = SCREEN_WIDTH - x; /* Clip right */
|
||||
|
@ -623,8 +623,8 @@ static void draw_oriented_mono_bitmap_part(const unsigned char *src,
|
|||
if (height <= 0)
|
||||
return; /* nothing left to do */
|
||||
|
||||
fg_pattern = rb->lcd_get_foreground();
|
||||
bg_pattern = rb->lcd_get_background();
|
||||
fg_pattern = rb->lcd_get_foreground();
|
||||
/*bg_pattern =*/ rb->lcd_get_background();
|
||||
|
||||
src += stride * (src_y >> 3) + src_x; /* move starting point */
|
||||
src_y &= 7;
|
||||
|
@ -719,7 +719,7 @@ static void draw_oriented_alpha_bitmap_part(const unsigned char *src,
|
|||
int width, int height)
|
||||
{
|
||||
fb_data *dst, *dst_start;
|
||||
unsigned fg_pattern, bg_pattern;
|
||||
unsigned fg_pattern;
|
||||
|
||||
if (x + width > SCREEN_WIDTH)
|
||||
width = SCREEN_WIDTH - x; /* Clip right */
|
||||
|
@ -738,8 +738,8 @@ static void draw_oriented_alpha_bitmap_part(const unsigned char *src,
|
|||
/* initialize blending */
|
||||
BLEND_INIT;
|
||||
|
||||
fg_pattern = rb->lcd_get_foreground();
|
||||
bg_pattern = rb->lcd_get_background();
|
||||
fg_pattern = rb->lcd_get_foreground();
|
||||
/*bg_pattern=*/ rb->lcd_get_background();
|
||||
|
||||
dst_start = rb->lcd_framebuffer + (LCD_WIDTH - y - 1) + x*LCD_WIDTH;
|
||||
int col, row = height;
|
||||
|
|
|
@ -610,7 +610,10 @@ enum plugin_status plugin_start(const void *parameter) {
|
|||
#ifdef HAVE_TOUCHSCREEN
|
||||
int button_x, button_y;
|
||||
#endif
|
||||
#if defined(REVERSI_BUTTON_MENU_LONGPRESS) || \
|
||||
defined(REVERSI_BUTTON_MAKE_MOVE_SHORTPRESS)
|
||||
int lastbutton = BUTTON_NONE;
|
||||
#endif
|
||||
int row, col;
|
||||
int w_cnt, b_cnt;
|
||||
|
||||
|
@ -787,10 +790,12 @@ enum plugin_status plugin_start(const void *parameter) {
|
|||
/* Quit if USB has been connected */
|
||||
return PLUGIN_USB_CONNECTED;
|
||||
}
|
||||
|
||||
#if defined(REVERSI_BUTTON_MENU_LONGPRESS) || \
|
||||
defined(REVERSI_BUTTON_MAKE_MOVE_SHORTPRESS)
|
||||
if (button != BUTTON_NONE) {
|
||||
lastbutton = button;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
return PLUGIN_OK;
|
||||
|
|
|
@ -1527,7 +1527,10 @@ static int sokoban_menu(void)
|
|||
static bool sokoban_loop(void)
|
||||
{
|
||||
bool moved;
|
||||
int i = 0, button = 0, lastbutton = 0;
|
||||
int i = 0, button = 0;
|
||||
#if defined(SOKOBAN_UNDO_PRE)
|
||||
int lastbutton = 0;
|
||||
#endif
|
||||
int w, h;
|
||||
char *loc;
|
||||
|
||||
|
@ -1629,8 +1632,9 @@ static bool sokoban_loop(void)
|
|||
return PLUGIN_USB_CONNECTED;
|
||||
break;
|
||||
}
|
||||
|
||||
#if defined(SOKOBAN_UNDO_PRE)
|
||||
lastbutton = button;
|
||||
#endif
|
||||
|
||||
if (moved) {
|
||||
rb->lcd_clear_display();
|
||||
|
|
|
@ -1029,7 +1029,9 @@ enum plugin_status plugin_start(const void* parameter)
|
|||
{
|
||||
bool exit;
|
||||
int button;
|
||||
#if defined(SUDOKU_BUTTON_TOGGLE_PRE) || defined(SUDOKU_BUTTON_MENU_PRE)
|
||||
int lastbutton = BUTTON_NONE;
|
||||
#endif
|
||||
int res;
|
||||
int rc = PLUGIN_OK;
|
||||
long ticks;
|
||||
|
@ -1289,8 +1291,10 @@ enum plugin_status plugin_start(const void* parameter)
|
|||
}
|
||||
break;
|
||||
}
|
||||
#if defined(SUDOKU_BUTTON_TOGGLE_PRE) || defined(SUDOKU_BUTTON_MENU_PRE)
|
||||
if (button != BUTTON_NONE)
|
||||
lastbutton = button;
|
||||
#endif
|
||||
|
||||
display_board(&state);
|
||||
}
|
||||
|
|
|
@ -781,7 +781,7 @@ void* dircache_steal_buffer(long *size)
|
|||
void dircache_init(void)
|
||||
{
|
||||
int i;
|
||||
int thread_id;
|
||||
int thread_id __attribute__((unused));
|
||||
|
||||
dircache_initialized = false;
|
||||
dircache_initializing = false;
|
||||
|
|
Loading…
Reference in a new issue