You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2020/12/06 15:03:23 UTC

[incubator-nuttx] 04/18: include/debug.h: Apply sysloglike to _none

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 48c7fee534ff6568f0e1dbbecc14aa658b9eba7a
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Fri Nov 20 16:48:40 2020 +0900

    include/debug.h: Apply sysloglike to _none
---
 include/debug.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/include/debug.h b/include/debug.h
index dcebe4c..e3c16db 100644
--- a/include/debug.h
+++ b/include/debug.h
@@ -105,7 +105,9 @@
  */
 
 #ifdef CONFIG_CPP_HAVE_VARARGS
-#  define _none(x...)
+/* don't call syslog while performing the compiler's format check. */
+#  define _none(format, ...) \
+    do { if (0) syslog(LOG_ERR, format, ##__VA_ARGS__); } while (0)
 #else
 #  define _none       (void)
 #endif