Pārlūkot izejas kodu

[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>
tags/v1.20.1
Michael Brown 7 gadus atpakaļ
vecāks
revīzija
e88e2a2965
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 2
    2
      src/include/compiler.h

+ 2
- 2
src/include/compiler.h Parādīt failu

@@ -403,7 +403,7 @@ char __debug_disable(OBJECT) = ( DBGLVL_MAX & ~DBGLVL_DFLT );
403 403
  *
404 404
  * @v level		Debug level
405 405
  */
406
-#define DBG_PAUSE_IF( level ) do {				\
406
+#define DBG_PAUSE_IF( level, ... ) do {				\
407 407
 		if ( DBG_ ## level ) {				\
408 408
 			dbg_pause();				\
409 409
 		}						\
@@ -414,7 +414,7 @@ char __debug_disable(OBJECT) = ( DBGLVL_MAX & ~DBGLVL_DFLT );
414 414
  *
415 415
  * @v level		Debug level
416 416
  */
417
-#define DBG_MORE_IF( level ) do {				\
417
+#define DBG_MORE_IF( level, ... ) do {				\
418 418
 		if ( DBG_ ## level ) {				\
419 419
 			dbg_more();				\
420 420
 		}						\

Notiek ielāde…
Atcelt
Saglabāt