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

Unified Diff: util/stdlib/strnlen.cc

Issue 1109273002: mac: Suppress partial availability warnings. (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad.git@master
Patch Set: Created 5 years, 8 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
« util/mach/exception_types.cc ('K') | « util/mach/exception_types.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: util/stdlib/strnlen.cc
diff --git a/util/stdlib/strnlen.cc b/util/stdlib/strnlen.cc
index b17796bb8e439152dfd9d37c888bb6ee1cd7554d..280d2e6e5b9ff00505c953f8d5a28997418a9e65 100644
--- a/util/stdlib/strnlen.cc
+++ b/util/stdlib/strnlen.cc
@@ -14,6 +14,14 @@
#include "util/stdlib/strnlen.h"
+#if defined(OS_MACOSX) && \
+ MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_7 && \
+ MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
+// Forward declare a method only available on OSX 10.7+ so that
Mark Mentovai 2015/04/29 00:33:52 There’s nothing really “forward” about this, it’s
erikchen 2015/04/30 00:34:42 Right. Updated the comment.
+// -Wpartial-availability does not emit a warning.
+size_t strnlen(const char*, size_t);
Mark Mentovai 2015/04/29 00:33:52 The parameters should be named, and this ought to
erikchen 2015/04/30 00:34:42 I've done as you suggested. The extern "C" seems t
+#endif
+
namespace crashpad {
#if defined(OS_MACOSX) && MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_7
Mark Mentovai 2015/04/29 00:33:52 We should be sharing this #ifdef. You can move it
erikchen 2015/04/30 00:34:42 Done.
« util/mach/exception_types.cc ('K') | « util/mach/exception_types.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698