From 98bea93a3e4f6fb822db3ac5d876e84109f24101 Mon Sep 17 00:00:00 2001 From: Sylvain Defresne Date: Thu, 7 Jan 2016 19:48:21 +0100 Subject: Fix deprecatation warning when building for recent SDKs on iOS/OS X. Fixes the following compilation warning when using recent version of the iOS or OS X SDK by using the recommended new API: ../../breakpad/src/common/mac/HTTPMultipartUpload.m:56:10: error: 'stringByAddingPercentEscapesUsingEncoding:' is deprecated: first deprecated in iOS 9.0 - Use -stringByAddingPercentEncodingWithAllowedCharacters: instead, which always uses the recommended UTF-8 encoding, and which encodes for a specific URL component or subcomponent since each URL component or subcomponent has different rules for what characters are valid. [-Werror,-Wdeprecated-declarations] [key stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; ^ CFURLCreateStringByAddingPercentEscapes ../../breakpad/src/common/mac/HTTPMultipartUpload.m:207:29: error: 'sendSynchronousRequest:returningResponse:error:' is deprecated: first deprecated in iOS 9.0 - Use [NSURLSession dataTaskWithRequest:completionHandler:] (see NSURLSession.h [-Werror,-Wdeprecated-declarations] data = [NSURLConnection sendSynchronousRequest:req ^ ../../breakpad/src/client/mac/handler/minidump_generator.cc:158:6: error: 'CFPropertyListCreateFromXMLData' is deprecated: first deprecated in iOS 8.0 - Use CFPropertyListCreateWithData instead. [-Werror,-Wdeprecated-declarations] (CFPropertyListCreateFromXMLData(NULL, data, kCFPropertyListImmutable, ^ BUG=https://bugs.chromium.org/p/google-breakpad/issues/detail?id=675 BUG=569158 R=mark@chromium.org Review URL: https://codereview.chromium.org/1563223004 . --- src/client/mac/handler/minidump_generator.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/client') diff --git a/src/client/mac/handler/minidump_generator.cc b/src/client/mac/handler/minidump_generator.cc index 7d6e81db..0e299180 100644 --- a/src/client/mac/handler/minidump_generator.cc +++ b/src/client/mac/handler/minidump_generator.cc @@ -154,9 +154,9 @@ void MinidumpGenerator::GatherSystemInformation() { if (!data) { return; } - CFDictionaryRef list = static_cast - (CFPropertyListCreateFromXMLData(NULL, data, kCFPropertyListImmutable, - NULL)); + CFDictionaryRef list = + static_cast(CFPropertyListCreateWithData( + NULL, data, kCFPropertyListImmutable, NULL, NULL)); CFRelease(data); if (!list) { return; -- cgit v1.2.1