From 278f1f69bb132ee4600f7706ff5783a625f9039c Mon Sep 17 00:00:00 2001 From: Rafaël Carré Date: Thu, 2 Jul 2009 10:24:27 +0000 Subject: Fix DEBUG builds when CONFIG_CPU != SH7034 and HAVE_GDB_API isn't defined git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21613 a1c6a512-1295-4272-9138-f99709370657 --- firmware/debug.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/firmware/debug.c b/firmware/debug.c index 1826022c2c..94404586de 100644 --- a/firmware/debug.c +++ b/firmware/debug.c @@ -203,9 +203,7 @@ static void debug(const char *msg) mem2hex(msg, &debugbuf[1], strlen(msg)); putpacket(debugbuf); } -#endif /* SH7034 */ - -#ifdef HAVE_GDB_API +#elif defined(HAVE_GDB_API) static void *get_api_function(int n) { struct gdb_api *api = (struct gdb_api *)GDB_API_ADDRESS; @@ -230,8 +228,17 @@ static void debug(char *msg) void debug_init(void) { } +#else /* !SH7034 && !HAVE_GDB_API */ +void debug_init(void) +{ +} + +static inline void debug(char *msg) +{ + (void)msg; +} +#endif -#endif /* HAVE_GDB_API */ #endif /* end of DEBUG section */ #ifdef __GNUC__ -- cgit v1.2.3