summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarty Connor2006-09-14 19:38:17 +0200
committerMarty Connor2006-09-14 19:38:17 +0200
commite2aca77132d42aefa2d7a2346a4a3fd910c8e2a9 (patch)
tree8e8eb3b6a511ddecdb0d1ac68065f15bd612ed92
parentFixed DBG macro format, fixed compile warnings. removed extra parameter from ... (diff)
downloadipxe-e2aca77132d42aefa2d7a2346a4a3fd910c8e2a9.tar.gz
ipxe-e2aca77132d42aefa2d7a2346a4a3fd910c8e2a9.tar.xz
ipxe-e2aca77132d42aefa2d7a2346a4a3fd910c8e2a9.zip
update DBG_DISCARD macro to allow the compiler to see the argument for compile-time checking, while still having it optimized away during compilation
-rw-r--r--src/include/compiler.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/include/compiler.h b/src/include/compiler.h
index f2e63f1dd..3aee4a603 100644
--- a/src/include/compiler.h
+++ b/src/include/compiler.h
@@ -124,7 +124,9 @@ __asm__ ( ".equ\tDEBUG_LEVEL, " DEBUG_SYMBOL_STR );
#endif
#define DBG_PRINT(...) printf ( __VA_ARGS__ )
-#define DBG_DISCARD(...) do {} while ( 0 )
+#define DBG_DISCARD(...) do { if ( 0 ) printf ( __VA_ARGS__ ); } while ( 0 )
+/*#define DBG_DISCARD(...) do {} while ( 0 )*/
+
#define DBG DBG_DISCARD
#define DBG2 DBG_DISCARD