You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.3 KiB
46 lines
1.3 KiB
From fc84d8d572ffcecb533fd6d6d025abea12ce027e Mon Sep 17 00:00:00 2001
|
|
Message-Id: <fc84d8d572ffcecb533fd6d6d025abea12ce027e.1622722814.git.baruch@tkos.co.il>
|
|
From: Baruch Siach <baruch@tkos.co.il>
|
|
Date: Thu, 3 Jun 2021 15:01:10 +0300
|
|
Subject: [PATCH] Fix build with NDEBUG defined
|
|
|
|
Build with NDEBUG fails because the debug() macro becomes empty. This
|
|
creates invalid syntax with the debug() call is the only statement in
|
|
the body of a 'for' loop.
|
|
|
|
This fixes build failures like:
|
|
|
|
daemon.c: In function 'show':
|
|
daemon.c:3607:2: error: expected expression before '}' token
|
|
}
|
|
^
|
|
|
|
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
|
|
---
|
|
Upstream status: https://github.com/raforg/daemon/pull/3
|
|
|
|
libslack/err.h | 8 ++++----
|
|
1 file changed, 4 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/libslack/err.h b/libslack/err.h
|
|
index 106bdb01e074..7acfbe46d60a 100644
|
|
--- a/libslack/err.h
|
|
+++ b/libslack/err.h
|
|
@@ -40,10 +40,10 @@
|
|
#undef check
|
|
|
|
#ifdef NDEBUG
|
|
-#define debug(args)
|
|
-#define vdebug(args)
|
|
-#define debugsys(args)
|
|
-#define vdebugsys(args)
|
|
+#define debug(args) do {} while (0);
|
|
+#define vdebug(args) do {} while (0);
|
|
+#define debugsys(args) do {} while (0);
|
|
+#define vdebugsys(args) do {} while (0);
|
|
#define check(cond, mesg) (void_cast(0))
|
|
#else
|
|
#define debug(args) debugf args;
|
|
--
|
|
2.30.2
|
|
|
|
|