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

Side by Side Diff: util/mach/exception_types.cc

Issue 1109273002: mac: Suppress partial availability warnings. (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad.git@master
Patch Set: Comments from mark, round two. Created 5 years, 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | util/stdlib/strnlen.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Crashpad Authors. All rights reserved. 1 // Copyright 2015 The Crashpad Authors. All rights reserved.
2 // 2 //
3 // Licensed under the Apache License, Version 2.0 (the "License"); 3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License. 4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at 5 // You may obtain a copy of the License at
6 // 6 //
7 // http://www.apache.org/licenses/LICENSE-2.0 7 // http://www.apache.org/licenses/LICENSE-2.0
8 // 8 //
9 // Unless required by applicable law or agreed to in writing, software 9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS, 10 // distributed under the License is distributed on an "AS IS" BASIS,
(...skipping 17 matching lines...) Expand all
28 #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9 28 #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9
29 29
30 extern "C" { 30 extern "C" {
31 31
32 // proc_get_wakemon_params() is present in the Mac OS X 10.9 SDK, but no 32 // proc_get_wakemon_params() is present in the Mac OS X 10.9 SDK, but no
33 // declaration is provided. This provides a declaration and marks it for weak 33 // declaration is provided. This provides a declaration and marks it for weak
34 // import if the deployment target is below 10.9. 34 // import if the deployment target is below 10.9.
35 int proc_get_wakemon_params(pid_t pid, int* rate_hz, int* flags) 35 int proc_get_wakemon_params(pid_t pid, int* rate_hz, int* flags)
36 __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0); 36 __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0);
37 37
38 // Redeclare the method without the availability annotation to suppress the
39 // -Wpartial-availability warning.
40 int proc_get_wakemon_params(pid_t pid, int* rate_hz, int* flags);
41
38 } // extern "C" 42 } // extern "C"
39 43
40 #else 44 #else
41 45
42 namespace { 46 namespace {
43 47
44 using ProcGetWakemonParamsType = int (*)(pid_t, int*, int*); 48 using ProcGetWakemonParamsType = int (*)(pid_t, int*, int*);
45 49
46 // The SDK doesn’t have proc_get_wakemon_params() to link against, even with 50 // The SDK doesn’t have proc_get_wakemon_params() to link against, even with
47 // weak import. This function returns a function pointer to it if it exists at 51 // weak import. This function returns a function pointer to it if it exists at
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 203
200 // Treat unknown exceptions as fatal. This is the conservative approach: it 204 // Treat unknown exceptions as fatal. This is the conservative approach: it
201 // may result in more crash reports being generated, but the type-flavor 205 // may result in more crash reports being generated, but the type-flavor
202 // combinations can be evaluated to determine appropriate handling. 206 // combinations can be evaluated to determine appropriate handling.
203 LOG(WARNING) << "unknown resource type " << resource_type << " flavor " 207 LOG(WARNING) << "unknown resource type " << resource_type << " flavor "
204 << resource_flavor; 208 << resource_flavor;
205 return false; 209 return false;
206 } 210 }
207 211
208 } // namespace crashpad 212 } // namespace crashpad
OLDNEW
« no previous file with comments | « no previous file | util/stdlib/strnlen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698