aboutsummaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2017-03-22 08:19:33 +0200
committerMichael Brown <mcb30@ipxe.org>2017-03-22 08:25:04 +0200
commite88e2a29657824963c4fdb948e5ac99dfe6472ee (patch)
tree042cfb77175c7b073881b63168b9234505dfa9f8 /src/include
parent6124c0ebfae22542e5cbcc837143133fdb1d814d (diff)
downloadipxe-e88e2a29657824963c4fdb948e5ac99dfe6472ee.tar.gz
[build] Avoid confusing sparse in single-argument DBG() macros
For visual consistency with surrounding lines, the definitions of DBG_MORE(), DBG_PAUSE(), etc include an unnecessary ##__VA_ARGS__ argument which is always elided. This confuses sparse, which complains about DBG_MORE_IF() being called with more than one argument. Work around this problem by adding an unused variable argument list to the single-argument macros DBG_MORE_IF() and DBG_PAUSE_IF(). Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/compiler.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/include/compiler.h b/src/include/compiler.h
index 56a5f63d5..a936425de 100644
--- a/src/include/compiler.h
+++ b/src/include/compiler.h
@@ -403,7 +403,7 @@ char __debug_disable(OBJECT) = ( DBGLVL_MAX & ~DBGLVL_DFLT );
*
* @v level Debug level
*/
-#define DBG_PAUSE_IF( level ) do { \
+#define DBG_PAUSE_IF( level, ... ) do { \
if ( DBG_ ## level ) { \
dbg_pause(); \
} \
@@ -414,7 +414,7 @@ char __debug_disable(OBJECT) = ( DBGLVL_MAX & ~DBGLVL_DFLT );
*
* @v level Debug level
*/
-#define DBG_MORE_IF( level ) do { \
+#define DBG_MORE_IF( level, ... ) do { \
if ( DBG_ ## level ) { \
dbg_more(); \
} \