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:20 UTC
[incubator-nuttx] 01/18: include/nuttx/compiler.h: Add sysloglike
macro
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 7b39e612db568db7cf0e415e3ec6ccb34b381398
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Fri Nov 20 11:30:42 2020 +0900
include/nuttx/compiler.h: Add sysloglike macro
Right now, same as printflike.
Introduce a separate macro because syslog takes
a bit different format from printf. (ie. %m)
If it turns out that a compiler is not happy with
the difference, we can disable this selectively.
---
include/nuttx/compiler.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/include/nuttx/compiler.h b/include/nuttx/compiler.h
index 2ee6bcf..9b50bc14 100644
--- a/include/nuttx/compiler.h
+++ b/include/nuttx/compiler.h
@@ -144,6 +144,7 @@
# define noinline_function __attribute__ ((noinline))
# define printflike(a, b) __attribute__((__format__ (__printf__, a, b)))
+# define sysloglike(a, b) __attribute__((__format__ (__printf__, a, b)))
# define scanflike(a, b) __attribute__((__format__ (__scanf__, a, b)))
/* GCC does not use storage classes to qualify addressing */
@@ -362,6 +363,7 @@
# define noinline_function
# define printflike(a, b)
+# define sysloglike(a, b)
# define scanflike(a, b)
/* The reentrant attribute informs SDCC that the function
@@ -491,6 +493,7 @@
# define inline_function
# define noinline_function
# define printflike(a, b)
+# define sysloglike(a, b)
# define scanflike(a, b)
/* REVISIT: */
@@ -593,6 +596,7 @@
# define inline_function
# define noinline_function
# define printflike(a, b)
+# define sysloglike(a, b)
# define scanflike(a, b)
# define FAR
@@ -650,6 +654,7 @@
# define inline_function
# define noinline_function
# define printflike(a, b)
+# define sysloglike(a, b)
# define scanflike(a, b)
# define FAR