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. "
This commit is contained in:
committed by
Yu Watanabe
parent
52048013b7
commit
012c2f761b
+2
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user