From e711847bb4c153d255019dbf779e869d7c8779b1 Mon Sep 17 00:00:00 2001 From: gevaerts Date: Mon, 1 Aug 2011 20:07:05 +0000 Subject: [PATCH] Suppress a "variable 'remote' set but not used" warning that some gcc versions (rightly) emit for the m:robe 100 sim. The "correct" solution would be to add about twenty five more #ifdefs to a function that already has way too many of them, or to rewrite the entire function. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30236 a1c6a512-1295-4272-9138-f99709370657 --- apps/recorder/bmp.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/recorder/bmp.c b/apps/recorder/bmp.c index fc88709af..1b6cd8734 100644 --- a/apps/recorder/bmp.c +++ b/apps/recorder/bmp.c @@ -495,6 +495,11 @@ int read_bmp_fd(int fd, #ifdef HAVE_REMOTE_LCD bool remote = false; + /* Thanks to the mass of #ifdefs in this function, there are cases where + * remote is never read, so we need to suppress the resulting warnings + * (or rewrite the lot)*/ + (void)remote; + if (format & FORMAT_REMOTE) { remote = true; #if LCD_REMOTE_DEPTH == 1 @@ -561,7 +566,7 @@ int read_bmp_fd(int fd, resize |= IMG_NORESIZE; #endif #ifdef HAVE_REMOTE_LCD - remote = 0; + remote = false; #endif } #elif !defined(PLUGIN) -- 2.11.4.GIT