summaryrefslogtreecommitdiff
path: root/devel/android-tools-adb/files/patch-base_include_android-base_logging.h
blob: 7e536840b84024672beec1dfd13cae516ae876df (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--- base/include/android-base/logging.h.orig	2019-07-17 19:54:09 UTC
+++ base/include/android-base/logging.h
@@ -350,7 +350,7 @@ struct LogAbortAfterFullExpr {
 // DCHECKs are debug variants of CHECKs only enabled in debug builds. Generally
 // CHECK should be used unless profiling identifies a CHECK as being in
 // performance critical code.
-#if defined(NDEBUG) && !defined(__clang_analyzer__)
+#if defined(NDEBUG) && !defined(__clang_analyzer__) || !defined(__ANDROID__)
 static constexpr bool kEnableDChecks = false;
 #else
 static constexpr bool kEnableDChecks = true;
@@ -486,8 +486,9 @@ namespace std {  // NOLINT(cert-dcl58-cpp)
 #pragma clang diagnostic ignored "-Wgcc-compat"
 #define OSTREAM_STRING_POINTER_USAGE_WARNING \
     __attribute__((diagnose_if(true, "Unexpected logging of string pointer", "warning")))
+OSTREAM_STRING_POINTER_USAGE_WARNING // GCC
 inline std::ostream& operator<<(std::ostream& stream, const std::string* string_pointer)
-    OSTREAM_STRING_POINTER_USAGE_WARNING {
+{
   return stream << static_cast<const void*>(string_pointer);
 }
 #pragma clang diagnostic pop