summaryrefslogtreecommitdiff
path: root/typedefs.h
diff options
context:
space:
mode:
Diffstat (limited to 'typedefs.h')
-rw-r--r--typedefs.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/typedefs.h b/typedefs.h
index e15bb1b3..dc206f29 100644
--- a/typedefs.h
+++ b/typedefs.h
@@ -92,4 +92,13 @@ typedef unsigned __int64 uint64_t;
#define OVERRIDE
#endif
+// Annotate a function indicating the caller must examine the return value.
+// Use like:
+// int foo() WARN_UNUSED_RESULT;
+#if defined(__GNUC__)
+#define WARN_UNUSED_RESULT __attribute__((warn_unused_result))
+#else
+#define WARN_UNUSED_RESULT
+#endif
+
#endif // WEBRTC_TYPEDEFS_H_