Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(45)

Unified Diff: webrtc/base/annotations.h

Issue 2686043006: WebRtcVoiceMediaChannel::AddRecvStream: Don't call SetRecPayloadType (Closed)
Patch Set: Discard packets when updating payload type map Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/base/annotations.h
diff --git a/webrtc/base/annotations.h b/webrtc/base/annotations.h
new file mode 100644
index 0000000000000000000000000000000000000000..1097c5e68045fc18f607698a2bbd9641e18824aa
--- /dev/null
+++ b/webrtc/base/annotations.h
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2017 The WebRTC Project Authors. All rights reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef WEBRTC_BASE_ANNOTATIONS_H_
the sun 2017/03/14 20:07:00 Please introduce this in a separate CL so we can d
kwiberg-webrtc 2017/03/16 10:24:12 Would do, except I think following some of your ot
+#define WEBRTC_BASE_ANNOTATIONS_H_
+
+// Annotate function return values with this if you want to force callers to do
+// something with the return value:
+//
+// RTC_WARN_UNUSED_RESULT(bool) SomethingThatMayFail();
+// ...
+// SomethingThatMayFail(); // Warning! Ignoring the return value.
+// if (SomethingThatMayFail()) { // OK!
+#if defined(__GNUC__)
+#define RTC_WARN_UNUSED_RESULT(t) t __attribute__((__warn_unused_result__))
+#else
+#define RTC_WARN_UNUSED_RESULT(t) t
+#endif
+
+#endif // WEBRTC_BASE_ANNOTATIONS_H_

Powered by Google App Engine
This is Rietveld 408576698