diff options
| author | Daniel Stenberg <daniel@haxx.se> | 2002-05-31 13:15:48 +0000 |
|---|---|---|
| committer | Daniel Stenberg <daniel@haxx.se> | 2002-05-31 13:15:48 +0000 |
| commit | 7e8615757c6e6f3a004ae532f2122ef4f49c670c (patch) | |
| tree | ab5733c3b649571512e108bc99278488355ba16d /firmware/debug.c | |
| parent | cccf7f8bb15f8427c046bec79ccefd47152b28c5 (diff) | |
| download | rockbox-7e8615757c6e6f3a004ae532f2122ef4f49c670c.zip rockbox-7e8615757c6e6f3a004ae532f2122ef4f49c670c.tar.gz rockbox-7e8615757c6e6f3a004ae532f2122ef4f49c670c.tar.bz2 rockbox-7e8615757c6e6f3a004ae532f2122ef4f49c670c.tar.xz | |
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
Diffstat (limited to 'firmware/debug.c')
| -rw-r--r-- | firmware/debug.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/firmware/debug.c b/firmware/debug.c index 23ba8f8..ec33cfc 100644 --- a/firmware/debug.c +++ b/firmware/debug.c @@ -22,8 +22,10 @@ #include <stdarg.h> #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 } |