aboutsummaryrefslogtreecommitdiff
path: root/webrtc
diff options
context:
space:
mode:
authorkjellander <kjellander@webrtc.org>2016-01-08 04:51:38 -0800
committerCommit bot <commit-bot@chromium.org>2016-01-08 12:51:47 +0000
commitb71b4f0c7af57ef5b676c6ed70bf945282c90e3a (patch)
tree841bb478e9b467fae87ec65e6695bab07545bef8 /webrtc
parent004851cacae05c51197214da1d783b6989220011 (diff)
downloadwebrtc-b71b4f0c7af57ef5b676c6ed70bf945282c90e3a.tar.gz
Update attributes to match gclibc's ansidecl.h
To ease use of WebRTC in other codebases, update some macros to match glibc's ansidecl.h, which uses double-underscores for attributes. NOTRY=True Review URL: https://codereview.webrtc.org/1571653002 Cr-Commit-Position: refs/heads/master@{#11185}
Diffstat (limited to 'webrtc')
-rw-r--r--webrtc/base/common.h4
-rw-r--r--webrtc/base/criticalsection.h2
-rw-r--r--webrtc/base/deprecation.h2
-rw-r--r--webrtc/typedefs.h6
4 files changed, 7 insertions, 7 deletions
diff --git a/webrtc/base/common.h b/webrtc/base/common.h
index 2086754c1f..1b1dac64b0 100644
--- a/webrtc/base/common.h
+++ b/webrtc/base/common.h
@@ -178,7 +178,7 @@ inline bool ImplicitCastToBool(bool result) { return result; }
// Forces compiler to inline, even against its better judgement. Use wisely.
#if defined(__GNUC__)
-#define FORCE_INLINE __attribute__((always_inline))
+#define FORCE_INLINE __attribute__ ((__always_inline__))
#elif defined(WEBRTC_WIN)
#define FORCE_INLINE __forceinline
#else
@@ -193,7 +193,7 @@ inline bool ImplicitCastToBool(bool result) { return result; }
// libjingle are merged.
#if !defined(WARN_UNUSED_RESULT)
#if defined(__GNUC__) || defined(__clang__)
-#define WARN_UNUSED_RESULT __attribute__((warn_unused_result))
+#define WARN_UNUSED_RESULT __attribute__ ((__warn_unused_result__))
#else
#define WARN_UNUSED_RESULT
#endif
diff --git a/webrtc/base/criticalsection.h b/webrtc/base/criticalsection.h
index ddbf857f2b..5b3eaf5684 100644
--- a/webrtc/base/criticalsection.h
+++ b/webrtc/base/criticalsection.h
@@ -89,7 +89,7 @@ class TryCritScope {
#if defined(WEBRTC_WIN)
_Check_return_ bool locked() const;
#else
- bool locked() const __attribute__((warn_unused_result));
+ bool locked() const __attribute__ ((__warn_unused_result__));
#endif
private:
CriticalSection* const cs_;
diff --git a/webrtc/base/deprecation.h b/webrtc/base/deprecation.h
index 459b898480..ce950f9b52 100644
--- a/webrtc/base/deprecation.h
+++ b/webrtc/base/deprecation.h
@@ -37,7 +37,7 @@
// (https://bugs.chromium.org/p/webrtc/issues/detail?id=5368).
#define RTC_DEPRECATED __declspec(deprecated)
#elif defined(__GNUC__)
-#define RTC_DEPRECATED __attribute__((deprecated))
+#define RTC_DEPRECATED __attribute__ ((__deprecated__))
#else
#define RTC_DEPRECATED
#endif
diff --git a/webrtc/typedefs.h b/webrtc/typedefs.h
index f3839c7295..6a3f441e22 100644
--- a/webrtc/typedefs.h
+++ b/webrtc/typedefs.h
@@ -73,7 +73,7 @@
// libjingle are merged.
#if !defined(WARN_UNUSED_RESULT)
#if defined(__GNUC__) || defined(__clang__)
-#define WARN_UNUSED_RESULT __attribute__((warn_unused_result))
+#define WARN_UNUSED_RESULT __attribute__ ((__warn_unused_result__))
#else
#define WARN_UNUSED_RESULT
#endif
@@ -84,7 +84,7 @@
// assert(result == 17);
#ifndef ATTRIBUTE_UNUSED
#if defined(__GNUC__) || defined(__clang__)
-#define ATTRIBUTE_UNUSED __attribute__((unused))
+#define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
#else
#define ATTRIBUTE_UNUSED
#endif
@@ -104,7 +104,7 @@
#if defined(_MSC_VER)
#define NO_RETURN __declspec(noreturn)
#elif defined(__GNUC__)
-#define NO_RETURN __attribute__((noreturn))
+#define NO_RETURN __attribute__ ((__noreturn__))
#else
#define NO_RETURN
#endif