From 7e8615757c6e6f3a004ae532f2122ef4f49c670c Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 31 May 2002 13:15:48 +0000 Subject: remove compiler warnings by using '#ifdef DEBUG' on a large section git-svn-id: svn://svn.rockbox.org/rockbox/trunk@859 a1c6a512-1295-4272-9138-f99709370657 --- firmware/debug.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'firmware/debug.c') diff --git a/firmware/debug.c b/firmware/debug.c index 23ba8f8117..ec33cfca68 100644 --- a/firmware/debug.c +++ b/firmware/debug.c @@ -22,8 +22,10 @@ #include #include "config.h" +#ifdef DEBUG static char debugmembuf[100]; static char debugbuf[200]; +#endif #ifndef SIMULATOR /* allow non archos platforms to display output */ @@ -39,6 +41,7 @@ void debug_init(void) IPRE |= 0xf000; /* Set to highest priority */ } +#ifdef DEBUG static int debug_tx_ready(void) { return (SSR1 & SCI_TDRE); @@ -60,7 +63,8 @@ static void debug_tx_char(char ch) static void debug_handle_error(char ssr) { - SSR1 &= ~(SCI_ORER | SCI_PER | SCI_FER); + (void)ssr; + SSR1 &= ~(SCI_ORER | SCI_PER | SCI_FER); } static int debug_rx_ready(void) @@ -163,6 +167,7 @@ static void putpacket (char *buffer) SCR1 |= 0x40; } + /* convert the memory, pointed to by mem into hex, placing result in buf */ /* return a pointer to the last char put in buf (null) */ static char *mem2hex (char *mem, char *buf, int count) @@ -186,6 +191,7 @@ static void debug(char *msg) mem2hex(msg, &debugbuf[1], strlen(msg)); putpacket(debugbuf); } +#endif /* end of DEBUG section */ void debugf(char *fmt, ...) { @@ -196,6 +202,8 @@ void debugf(char *fmt, ...) vsnprintf(debugmembuf, sizeof(debugmembuf), fmt, ap); va_end(ap); debug(debugmembuf); +#else + (void)fmt; #endif } -- cgit v1.2.3