From 27d153db930a231718a18ec5a886c8789077c83a Mon Sep 17 00:00:00 2001 From: Andree Buschmann Date: Sun, 1 May 2011 14:44:20 +0000 Subject: Fix nearly all residual 'variable set but not used' warnings reported from GCC 4.6.0. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29810 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/chessbox/chessbox.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'apps/plugins/chessbox/chessbox.c') diff --git a/apps/plugins/chessbox/chessbox.c b/apps/plugins/chessbox/chessbox.c index 6e77b62718..6437c8d4fd 100644 --- a/apps/plugins/chessbox/chessbox.c +++ b/apps/plugins/chessbox/chessbox.c @@ -641,7 +641,10 @@ static int cb_menu(void) struct cb_command cb_getcommand (void) { static short x = 4 , y = 3 ; short c , r , l; - int button, lastbutton = BUTTON_NONE; + int button; +#if defined(CB_PLAY_PRE) || defined(CB_SELECT_PRE) + int lastbutton = BUTTON_NONE; +#endif int marked = false , from_marked = false ; short marked_x = 0 , marked_y = 0 ; struct cb_command result = { 0, {0,0,0,0,0}, 0 }; @@ -761,8 +764,10 @@ struct cb_command cb_getcommand (void) { } break; } +#if defined(CB_PLAY_PRE) || defined(CB_SELECT_PRE) if (button != BUTTON_NONE) lastbutton = button; +#endif } } -- cgit v1.2.3