summaryrefslogtreecommitdiff
path: root/src/basic/util.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2018-11-20 04:34:08 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2018-11-20 12:34:08 +0900
commit012c2f761bf1eb0b9c784b867293f7f1c17c3080 (patch)
treef21082dff2a0f17ac8cbbe13eddd256fad2731db /src/basic/util.h
parent52048013b7869a8c0ef5a1b70d3bb0f9b69a4e7c (diff)
downloadsystemd-012c2f761bf1eb0b9c784b867293f7f1c17c3080.tar.gz
tree-wide: use __ prefixed gcc attributes (#10843)
As suggest here: https://gcc.gnu.org/onlinedocs/gcc/Attribute-Syntax.html#Attribute-Syntax "You may optionally specify attribute names with ‘__’ preceding and following the name. This allows you to use them in header files without being concerned about a possible macro of the same name. For example, you may use the attribute name __noreturn__ instead of noreturn. "
Diffstat (limited to 'src/basic/util.h')
-rw-r--r--src/basic/util.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/basic/util.h b/src/basic/util.h
index fd180cb787..2f3d1eeab8 100644
--- a/src/basic/util.h
+++ b/src/basic/util.h
@@ -172,7 +172,8 @@ static inline void _reset_errno_(int *saved_errno) {
errno = *saved_errno;
}
-#define PROTECT_ERRNO _cleanup_(_reset_errno_) __attribute__((unused)) int _saved_errno_ = errno
+#define PROTECT_ERRNO \
+ _cleanup_(_reset_errno_) __attribute__((__unused__)) int _saved_errno_ = errno
static inline int negative_errno(void) {
/* This helper should be used to shut up gcc if you know 'errno' is