diff options
author | Alex Austin <alex.austin@spectrumdsi.com> | 2010-01-29 00:41:44 -0600 |
---|---|---|
committer | David Brownell <dbrownell@users.sourceforge.net> | 2010-01-29 00:02:12 -0800 |
commit | cd3017cffa68e6f56419177e66332f86ab45675b (patch) | |
tree | 0c7a94e7a58b23e0763ec9c7ebcf92f07c72bc27 /src/helper/log.h | |
parent | 804c0b2ad321247e50910511f691d987d8141081 (diff) | |
download | riscv-openocd-cd3017cffa68e6f56419177e66332f86ab45675b.zip riscv-openocd-cd3017cffa68e6f56419177e66332f86ab45675b.tar.gz riscv-openocd-cd3017cffa68e6f56419177e66332f86ab45675b.tar.bz2 |
Clang buildfixes
Building with clang took a few very small changes. The change to
helper/log.h is because clang doesn't like an expression where the
result is unused. In helper/system.h, I just defined true and false
since clang doesn't have them builtin.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Diffstat (limited to 'src/helper/log.h')
-rw-r--r-- | src/helper/log.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/helper/log.h b/src/helper/log.h index ebcb8a1..b936fee 100644 --- a/src/helper/log.h +++ b/src/helper/log.h @@ -111,7 +111,12 @@ extern int debug_level; #define LOG_LEVEL_IS(FOO) ((debug_level) >= (FOO)) #define LOG_DEBUG(expr ...) \ - ((debug_level >= LOG_LVL_DEBUG) ? log_printf_lf (LOG_LVL_DEBUG, __FILE__, __LINE__, __FUNCTION__, expr) , 0 : 0) + do { \ + if (debug_level >= LOG_LVL_DEBUG) \ + log_printf_lf(LOG_LVL_DEBUG, \ + __FILE__, __LINE__, __func__, \ + expr); \ + } while (0) #define LOG_INFO(expr ...) \ log_printf_lf (LOG_LVL_INFO, __FILE__, __LINE__, __FUNCTION__, expr) |