From 66679dcc04658e5e0dc334f53e647eb9eb3107ed Mon Sep 17 00:00:00 2001 From: tfarina Date: Sat, 12 Dec 2015 05:47:19 -0800 Subject: [PATCH] Update WARN_UNUSED_RESULT macro to match Chromium's version. It also matches the one in webrtc/base/common.h BUG=None R=tommi@webrtc.org Review URL: https://codereview.webrtc.org/1516423004 Cr-Commit-Position: refs/heads/master@{#10998} --- webrtc/typedefs.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/webrtc/typedefs.h b/webrtc/typedefs.h index d8754908bd..5143d0796c 100644 --- a/webrtc/typedefs.h +++ b/webrtc/typedefs.h @@ -68,10 +68,11 @@ // Annotate a function indicating the caller must examine the return value. // Use like: // int foo() WARN_UNUSED_RESULT; +// To explicitly ignore a result, see |ignore_result()| in . // TODO(ajm): Hack to avoid multiple definitions until the base/ of webrtc and // libjingle are merged. #if !defined(WARN_UNUSED_RESULT) -#if defined(__GNUC__) +#if defined(__GNUC__) || defined(__clang__) #define WARN_UNUSED_RESULT __attribute__((warn_unused_result)) #else #define WARN_UNUSED_RESULT