summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Monsen <kristianm@google.com>2013-12-07 00:18:30 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2013-12-07 00:18:30 +0000
commit7ec888181fa58301742340e38519d8d21a7ea274 (patch)
treeccf7951df1ab436dbf79f21e382c55fc675cecc9
parentd8d0d5cef636d5456bf5f3645959409bdc5499aa (diff)
parentd3112bcb13e07de09c20d93d040bb87d9cc96ccb (diff)
downloadchromium-7ec888181fa58301742340e38519d8d21a7ea274.tar.gz
Merge "Hide warnings"idea133
-rw-r--r--Android.mk1
-rw-r--r--base/basictypes.h3
-rw-r--r--base/logging.h24
-rw-r--r--third_party/libevent/Android.mk3
4 files changed, 30 insertions, 1 deletions
diff --git a/Android.mk b/Android.mk
index b3d7e624..076663b8 100644
--- a/Android.mk
+++ b/Android.mk
@@ -468,6 +468,7 @@ LOCAL_GENERATED_SOURCES += $(GEN)
LOCAL_CFLAGS := -DHAVE_CONFIG_H -DANDROID -DEXPAT_RELATIVE_PATH -DALLOW_QUOTED_COOKIE_VALUES -DCOMPONENT_BUILD -DGURL_DLL
LOCAL_CPPFLAGS := -Wno-sign-promo -Wno-missing-field-initializers -fvisibility=hidden -fvisibility-inlines-hidden
+LOCAL_CFLAGS += -Wno-unused-parameter -Wno-narrowing -Wno-sizeof-pointer-memaccess
# Just a few definitions not provided by bionic.
LOCAL_CFLAGS += -include "android/prefix.h"
diff --git a/base/basictypes.h b/base/basictypes.h
index 1188d8d9..cba47f95 100644
--- a/base/basictypes.h
+++ b/base/basictypes.h
@@ -90,6 +90,9 @@ const int64 kint64max = (( int64) GG_LONGLONG(0x7FFFFFFFFFFFFFFF));
// third_party libraries are yet using it.
// TODO(tfarina): Figure out how to fix the usage of this macro in the
// third_party libraries and get rid of it.
+#ifdef DISALLOW_EVIL_CONSTRUCTORS
+#undef DISALLOW_EVIL_CONSTRUCTORS
+#endif
#define DISALLOW_EVIL_CONSTRUCTORS(TypeName) DISALLOW_COPY_AND_ASSIGN(TypeName)
// A macro to disallow all the implicit constructors, namely the
diff --git a/base/logging.h b/base/logging.h
index 1824baea..da80dcd8 100644
--- a/base/logging.h
+++ b/base/logging.h
@@ -447,6 +447,9 @@ const LogSeverity LOG_0 = LOG_ERROR;
//
// We make sure CHECK et al. always evaluates their arguments, as
// doing CHECK(FunctionWithSideEffect()) is a common idiom.
+#ifdef CHECK
+#undef CHECK
+#endif
#define CHECK(condition) \
LAZY_STREAM(LOG_STREAM(FATAL), !(condition)) \
<< "Check failed: " #condition ". "
@@ -491,6 +494,9 @@ extern template std::string* MakeCheckOpString<std::string, std::string>(
//
// TODO(akalin): Rewrite this so that constructs like if (...)
// CHECK_EQ(...) else { ... } work properly.
+#ifdef CHECK_OP
+#undef CHECK_OP
+#endif
#define CHECK_OP(name, op, val1, val2) \
if (std::string* _result = \
logging::Check##name##Impl((val1), (val2), \
@@ -520,11 +526,29 @@ DEFINE_CHECK_OP_IMPL(GE, >=)
DEFINE_CHECK_OP_IMPL(GT, > )
#undef DEFINE_CHECK_OP_IMPL
+#ifdef CHECK_EQ
+#undef CHECK_EQ
+#endif
#define CHECK_EQ(val1, val2) CHECK_OP(EQ, ==, val1, val2)
+#ifdef CHECK_NE
+#undef CHECK_NE
+#endif
#define CHECK_NE(val1, val2) CHECK_OP(NE, !=, val1, val2)
+#ifdef CHECK_LE
+#undef CHECK_LE
+#endif
#define CHECK_LE(val1, val2) CHECK_OP(LE, <=, val1, val2)
+#ifdef CHECK_LT
+#undef CHECK_LT
+#endif
#define CHECK_LT(val1, val2) CHECK_OP(LT, < , val1, val2)
+#ifdef CHECK_GE
+#undef CHECK_GE
+#endif
#define CHECK_GE(val1, val2) CHECK_OP(GE, >=, val1, val2)
+#ifdef CHECK_GT
+#undef CHECK_GT
+#endif
#define CHECK_GT(val1, val2) CHECK_OP(GT, > , val1, val2)
// http://crbug.com/16512 is open for a real fix for this. For now, Windows
diff --git a/third_party/libevent/Android.mk b/third_party/libevent/Android.mk
index c654937a..cdb4afb0 100644
--- a/third_party/libevent/Android.mk
+++ b/third_party/libevent/Android.mk
@@ -19,6 +19,7 @@ LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/third_party/libevent \
$(LOCAL_PATH)/third_party/libevent/android
-LOCAL_CFLAGS := -DHAVE_CONFIG_H -DANDROID -fvisibility=hidden
+LOCAL_CFLAGS := -DHAVE_CONFIG_H -DANDROID -fvisibility=hidden -Wno-unused-parameter
+LOCAL_CFLAGS += -Wno-sign-compare
include $(BUILD_STATIC_LIBRARY)