Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / third_party / webrtc / typedefs.h
index d8977ff..871f04e 100644 (file)
@@ -109,4 +109,24 @@ typedef unsigned __int64    uint64_t;
 #endif
 #endif  // WARN_UNUSED_RESULT
 
+// Put after a variable that might not be used, to prevent compiler warnings:
+//   int result UNUSED = DoSomething();
+//   assert(result == 17);
+#ifndef UNUSED
+#ifdef __GNUC__
+#define UNUSED __attribute__((unused))
+#else
+#define UNUSED
+#endif
+#endif
+
+// Annotate a function that will not return control flow to the caller.
+#if defined(_MSC_VER)
+#define NO_RETURN __declspec(noreturn)
+#elif defined(__GNUC__)
+#define NO_RETURN __attribute__((noreturn))
+#else
+#define NO_RETURN
+#endif
+
 #endif  // WEBRTC_TYPEDEFS_H_