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

Unified Diff: webrtc/base/macutils.cc

Issue 1644843003: Compile rtc_base_objc and rtc_api_objc for Mac (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Update against master Created 4 years, 11 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/macutils.cc
diff --git a/webrtc/base/macutils.cc b/webrtc/base/macutils.cc
index 7b1ff4753681acf063126cbca94374d899d68f37..7b92eb3b27956018f500e156b4fd1d08ac8620ea 100644
--- a/webrtc/base/macutils.cc
+++ b/webrtc/base/macutils.cc
@@ -72,7 +72,11 @@ void DecodeFourChar(UInt32 fc, std::string* out) {
static bool GetGestalt(OSType ostype, int* value) {
ASSERT(NULL != value);
SInt32 native_value;
+// TODO(hjon): Update deprecated APIs (see webrtc:5478 for details).
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated"
OSStatus result = Gestalt(ostype, &native_value);
+#pragma clang diagnostic pop
if (noErr == result) {
*value = native_value;
return true;
@@ -85,6 +89,9 @@ static bool GetGestalt(OSType ostype, int* value) {
bool GetOSVersion(int* major, int* minor, int* bugfix) {
ASSERT(major && minor && bugfix);
+// TODO(hjon): Update deprecated APIs (see webrtc:5478 for details).
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated"
if (!GetGestalt(gestaltSystemVersion, major)) {
return false;
}
@@ -97,6 +104,7 @@ bool GetOSVersion(int* major, int* minor, int* bugfix) {
return GetGestalt(gestaltSystemVersionMajor, major) &&
GetGestalt(gestaltSystemVersionMinor, minor) &&
GetGestalt(gestaltSystemVersionBugFix, bugfix);
+#pragma clang diagnostic pop
}
MacOSVersionName GetOSVersionName() {

Powered by Google App Engine
This is Rietveld 408576698