summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorthakis <thakis@chromium.org>2015-12-31 09:26:06 -0800
committerCommit bot <commit-bot@chromium.org>2015-12-31 17:26:58 +0000
commit29de2c811de5e5fa6eb238bbcd45796907c037bd (patch)
treeac1ea9902b9958b3af28eda50a4301bf56c3ecf5
parent92469c8c4b7da052273dee1a31308663d1dd1e3d (diff)
downloadchromium_src-29de2c811de5e5fa6eb238bbcd45796907c037bd.zip
chromium_src-29de2c811de5e5fa6eb238bbcd45796907c037bd.tar.gz
chromium_src-29de2c811de5e5fa6eb238bbcd45796907c037bd.tar.bz2
Prepare for -Wall for third-party code, -Wextra for chromium_code
This lands patch set 16 of https://codereview.chromium.org/1551753002/ (reviewed there), except for the changes to build/common.gypi and build/config/compiler/BUILD.gn. The changes to these two files are likely to break some bot I don't know about, and I don't want to keep reverting and relanding all these files. So this lands the parts that are hopefully harmless separately. BUG=573250 TBR=thestig Review URL: https://codereview.chromium.org/1557733002 Cr-Commit-Position: refs/heads/master@{#367252}
-rw-r--r--android_webview/native/input_stream_impl.h2
-rw-r--r--base/allocator/BUILD.gn17
-rw-r--r--base/allocator/allocator.gyp14
-rw-r--r--base/android/context_utils.cc2
-rw-r--r--base/android/context_utils.h2
-rw-r--r--chrome/browser/android/data_usage/tab_data_use_entry_unittest.cc2
-rw-r--r--chrome/browser/android/offline_pages/offline_page_utils.cc2
-rw-r--r--chrome/browser/android/offline_pages/offline_page_utils.h2
-rw-r--r--chrome/browser/chromeos/extensions/accessibility_features_apitest.cc2
-rw-r--r--chrome/browser/chromeos/file_system_provider/provided_file_system_info.h4
-rw-r--r--chrome/browser/chromeos/file_system_provider/service_unittest.cc4
-rw-r--r--chromecast/crash/linux/dump_info.h2
-rw-r--r--chromeos/system/statistics_provider.cc5
-rw-r--r--components/crash/content/app/breakpad_linux.cc2
-rw-r--r--components/history/core/browser/android/android_history_types.h2
-rw-r--r--components/nacl/renderer/plugin/plugin.gypi3
-rw-r--r--content/browser/android/java/gin_java_method_invocation_helper.cc2
-rw-r--r--content/browser/android/java/gin_java_method_invocation_helper.h2
-rw-r--r--media/capture/video/linux/v4l2_capture_delegate.h2
-rw-r--r--net/tools/quic/quic_simple_server_stream_test.cc2
-rw-r--r--ppapi/native_client/src/untrusted/irt_stub/thread_creator.c2
-rw-r--r--third_party/android_crazy_linker/src/src/crazy_linker_leb128.h9
-rw-r--r--third_party/android_protobuf/BUILD.gn22
-rw-r--r--third_party/android_protobuf/android_protobuf.gyp2
-rw-r--r--third_party/harfbuzz-ng/README.chromium4
-rw-r--r--third_party/harfbuzz-ng/src/hb-coretext.cc5
-rw-r--r--third_party/mach_override/BUILD.gn20
-rw-r--r--third_party/mach_override/mach_override.gyp7
-rw-r--r--third_party/ocmock/BUILD.gn6
-rw-r--r--third_party/ocmock/ocmock.gyp6
-rw-r--r--ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc2
-rw-r--r--ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h2
32 files changed, 120 insertions, 42 deletions
diff --git a/android_webview/native/input_stream_impl.h b/android_webview/native/input_stream_impl.h
index d4ce755..7da24cf 100644
--- a/android_webview/native/input_stream_impl.h
+++ b/android_webview/native/input_stream_impl.h
@@ -32,7 +32,7 @@ class InputStreamImpl : public InputStream {
~InputStreamImpl() override;
// Gets the underlying Java object. Guaranteed non-NULL.
- const jobject jobj() const { return jobject_.obj(); }
+ jobject jobj() const { return jobject_.obj(); }
// InputStream implementation.
bool BytesAvailable(int* bytes_available) const override;
diff --git a/base/allocator/BUILD.gn b/base/allocator/BUILD.gn
index ee75b64..44de819d 100644
--- a/base/allocator/BUILD.gn
+++ b/base/allocator/BUILD.gn
@@ -48,6 +48,23 @@ config("tcmalloc_flags") {
"TCMALLOC_FOR_DEBUGALLOCATION",
]
}
+ if (is_clang) {
+ cflags = [
+ # tcmalloc initializes some fields in the wrong order.
+ "-Wno-reorder",
+
+ # tcmalloc contains some unused local template specializations.
+ "-Wno-unused-function",
+
+ # tcmalloc uses COMPILE_ASSERT without static_assert but with
+ # typedefs.
+ "-Wno-unused-local-typedefs",
+
+ # for magic2_ in debugallocation.cc (only built in Debug builds)
+ # typedefs.
+ "-Wno-unused-private-field",
+ ]
+ }
}
# This config and libc modification are only used on Windows.
diff --git a/base/allocator/allocator.gyp b/base/allocator/allocator.gyp
index 33508ab..45a95bb 100644
--- a/base/allocator/allocator.gyp
+++ b/base/allocator/allocator.gyp
@@ -284,6 +284,20 @@
'<(tcmalloc_dir)/src/debugallocation.cc',
'<(tcmalloc_dir)/src/tcmalloc.cc',
],
+ 'variables': {
+ 'clang_warning_flags': [
+ # tcmalloc initializes some fields in the wrong order.
+ '-Wno-reorder',
+ # tcmalloc contains some unused local template specializations.
+ '-Wno-unused-function',
+ # tcmalloc uses COMPILE_ASSERT without static_assert but with
+ # typedefs.
+ '-Wno-unused-local-typedefs',
+ # for magic2_ in debugallocation.cc (only built in Debug builds)
+ # typedefs.
+ '-Wno-unused-private-field',
+ ],
+ },
'conditions': [
['OS=="linux" or OS=="freebsd" or OS=="solaris" or OS=="android"', {
'sources!': [
diff --git a/base/android/context_utils.cc b/base/android/context_utils.cc
index 5e10f21..fd62c45 100644
--- a/base/android/context_utils.cc
+++ b/base/android/context_utils.cc
@@ -33,7 +33,7 @@ void SetNativeApplicationContext(JNIEnv* env, const JavaRef<jobject>& context) {
} // namespace
-const jobject GetApplicationContext() {
+jobject GetApplicationContext() {
DCHECK(!g_application_context.Get().is_null());
return g_application_context.Get().obj();
}
diff --git a/base/android/context_utils.h b/base/android/context_utils.h
index 67e6335..52895a9 100644
--- a/base/android/context_utils.h
+++ b/base/android/context_utils.h
@@ -16,7 +16,7 @@ namespace android {
// Gets a global ref to the application context set with
// InitApplicationContext(). Ownership is retained by the function - the caller
// must NOT release it.
-const BASE_EXPORT jobject GetApplicationContext();
+BASE_EXPORT jobject GetApplicationContext();
// Initialize the global application context object.
// Either this or the Java equivalent ContextUtils.initApplicationContext must
diff --git a/chrome/browser/android/data_usage/tab_data_use_entry_unittest.cc b/chrome/browser/android/data_usage/tab_data_use_entry_unittest.cc
index e91529e..2522ed3 100644
--- a/chrome/browser/android/data_usage/tab_data_use_entry_unittest.cc
+++ b/chrome/browser/android/data_usage/tab_data_use_entry_unittest.cc
@@ -73,7 +73,7 @@ class TabDataUseEntryTest : public testing::Test {
tab_entry_.reset(new TabDataUseEntry(tab_model_.get()));
}
- const size_t GetMaxSessionsPerTab() const {
+ size_t GetMaxSessionsPerTab() const {
return tab_model_->max_sessions_per_tab();
}
diff --git a/chrome/browser/android/offline_pages/offline_page_utils.cc b/chrome/browser/android/offline_pages/offline_page_utils.cc
index 6f4a624..5fdaa58 100644
--- a/chrome/browser/android/offline_pages/offline_page_utils.cc
+++ b/chrome/browser/android/offline_pages/offline_page_utils.cc
@@ -122,7 +122,7 @@ bool OfflinePageUtils::HasOfflinePageForOnlineURL(
}
// static
-const bool OfflinePageUtils::HasOfflinePages(
+bool OfflinePageUtils::HasOfflinePages(
content::BrowserContext* browser_context) {
DCHECK(browser_context);
diff --git a/chrome/browser/android/offline_pages/offline_page_utils.h b/chrome/browser/android/offline_pages/offline_page_utils.h
index f06d964..77d4d08e 100644
--- a/chrome/browser/android/offline_pages/offline_page_utils.h
+++ b/chrome/browser/android/offline_pages/offline_page_utils.h
@@ -46,7 +46,7 @@ class OfflinePageUtils {
const GURL& online_url);
// Checks whether any offline page is saved.
- static const bool HasOfflinePages(content::BrowserContext* browser_context);
+ static bool HasOfflinePages(content::BrowserContext* browser_context);
};
} // namespace offline_pages
diff --git a/chrome/browser/chromeos/extensions/accessibility_features_apitest.cc b/chrome/browser/chromeos/extensions/accessibility_features_apitest.cc
index 4b3a11f2..30f0451 100644
--- a/chrome/browser/chromeos/extensions/accessibility_features_apitest.cc
+++ b/chrome/browser/chromeos/extensions/accessibility_features_apitest.cc
@@ -69,7 +69,7 @@ class AccessibilityFeaturesApiTest : public ExtensionApiTest,
bool ShouldModifyingFeatureSucceed() const { return GetParam(); }
// Returns preference path for accessibility features as defined by the API.
- const char* const GetPrefForFeature(const std::string& feature) {
+ const char* GetPrefForFeature(const std::string& feature) {
if (feature == "spokenFeedback")
return prefs::kAccessibilitySpokenFeedbackEnabled;
if (feature == "largeCursor")
diff --git a/chrome/browser/chromeos/file_system_provider/provided_file_system_info.h b/chrome/browser/chromeos/file_system_provider/provided_file_system_info.h
index 677e839..d6ea5e1 100644
--- a/chrome/browser/chromeos/file_system_provider/provided_file_system_info.h
+++ b/chrome/browser/chromeos/file_system_provider/provided_file_system_info.h
@@ -49,8 +49,8 @@ class ProvidedFileSystemInfo {
bool supports_notify_tag() const { return supports_notify_tag_; }
int opened_files_limit() const { return opened_files_limit_; }
const base::FilePath& mount_path() const { return mount_path_; }
- const bool configurable() const { return configurable_; }
- const bool watchable() const { return watchable_; }
+ bool configurable() const { return configurable_; }
+ bool watchable() const { return watchable_; }
extensions::FileSystemProviderSource source() const { return source_; }
private:
diff --git a/chrome/browser/chromeos/file_system_provider/service_unittest.cc b/chrome/browser/chromeos/file_system_provider/service_unittest.cc
index 0d5ea1e..8dea081 100644
--- a/chrome/browser/chromeos/file_system_provider/service_unittest.cc
+++ b/chrome/browser/chromeos/file_system_provider/service_unittest.cc
@@ -151,10 +151,10 @@ class FakeRegistry : public RegistryInterface {
it->second.last_tag = watcher.last_tag;
}
- ProvidedFileSystemInfo* const file_system_info() const {
+ const ProvidedFileSystemInfo* file_system_info() const {
return file_system_info_.get();
}
- Watchers* const watchers() const { return watchers_.get(); }
+ const Watchers* watchers() const { return watchers_.get(); }
private:
scoped_ptr<ProvidedFileSystemInfo> file_system_info_;
diff --git a/chromecast/crash/linux/dump_info.h b/chromecast/crash/linux/dump_info.h
index a225636..08f0fb6 100644
--- a/chromecast/crash/linux/dump_info.h
+++ b/chromecast/crash/linux/dump_info.h
@@ -62,7 +62,7 @@ class DumpInfo {
// }
scoped_ptr<base::Value> GetAsValue() const;
const MinidumpParams& params() const { return params_; }
- const bool valid() const { return valid_; }
+ bool valid() const { return valid_; }
private:
// Checks if parsed JSON in |value| is valid, if so populates the object's
diff --git a/chromeos/system/statistics_provider.cc b/chromeos/system/statistics_provider.cc
index afa67de..7d33b04 100644
--- a/chromeos/system/statistics_provider.cc
+++ b/chromeos/system/statistics_provider.cc
@@ -218,8 +218,7 @@ class StatisticsProviderImpl : public StatisticsProvider {
const base::DictionaryValue* GetRegionDictionary() const;
// Returns extractor from regional_data_extractors_ or nullptr.
- const RegionDataExtractor GetRegionalDataExtractor(
- const std::string& name) const;
+ RegionDataExtractor GetRegionalDataExtractor(const std::string& name) const;
bool load_statistics_started_;
NameValuePairsParser::NameValueMap machine_info_;
@@ -272,7 +271,7 @@ const base::DictionaryValue* StatisticsProviderImpl::GetRegionDictionary()
return region_dict;
}
-const StatisticsProviderImpl::RegionDataExtractor
+StatisticsProviderImpl::RegionDataExtractor
StatisticsProviderImpl::GetRegionalDataExtractor(
const std::string& name) const {
const auto it = regional_data_extractors_.find(name);
diff --git a/components/crash/content/app/breakpad_linux.cc b/components/crash/content/app/breakpad_linux.cc
index 0770079..fa9f620 100644
--- a/components/crash/content/app/breakpad_linux.cc
+++ b/components/crash/content/app/breakpad_linux.cc
@@ -76,7 +76,7 @@
// where we either a) know the call cannot fail, or b) there is nothing we
// can do when a call fails, we mark the return code as ignored. This avoids
// spurious compiler warnings.
-#define IGNORE_RET(x) do { if (x); } while (0)
+#define IGNORE_RET(x) ignore_result(x)
using crash_reporter::GetCrashReporterClient;
using google_breakpad::ExceptionHandler;
diff --git a/components/history/core/browser/android/android_history_types.h b/components/history/core/browser/android/android_history_types.h
index 41fad30..50cc545 100644
--- a/components/history/core/browser/android/android_history_types.h
+++ b/components/history/core/browser/android/android_history_types.h
@@ -127,7 +127,7 @@ class HistoryAndBookmarkRow {
set_value_explicitly(PARENT_ID);
parent_id_ = parent_id;
}
- const int64_t parent_id() const { return parent_id_; }
+ int64_t parent_id() const { return parent_id_; }
// The internal URLID
void set_url_id(URLID url_id) {
diff --git a/components/nacl/renderer/plugin/plugin.gypi b/components/nacl/renderer/plugin/plugin.gypi
index e7f3171..ea82a68 100644
--- a/components/nacl/renderer/plugin/plugin.gypi
+++ b/components/nacl/renderer/plugin/plugin.gypi
@@ -33,9 +33,6 @@
'cflags': [
'-Wno-long-long',
],
- 'cflags!': [
- '-Wno-unused-parameter', # be a bit stricter to match NaCl flags.
- ],
'conditions': [
['asan!=1 and msan!=1 and ubsan_vptr!=1', {
'ldflags': [
diff --git a/content/browser/android/java/gin_java_method_invocation_helper.cc b/content/browser/android/java/gin_java_method_invocation_helper.cc
index 5241044..904926f 100644
--- a/content/browser/android/java/gin_java_method_invocation_helper.cc
+++ b/content/browser/android/java/gin_java_method_invocation_helper.cc
@@ -209,7 +209,7 @@ GinJavaMethodInvocationHelper::GetSafeAnnotationClass() {
return safe_annotation_clazz_;
}
-const GinJavaBridgeError GinJavaMethodInvocationHelper::GetInvocationError() {
+GinJavaBridgeError GinJavaMethodInvocationHelper::GetInvocationError() {
return invocation_error_;
}
diff --git a/content/browser/android/java/gin_java_method_invocation_helper.h b/content/browser/android/java/gin_java_method_invocation_helper.h
index d23eb73..b61fdfd 100644
--- a/content/browser/android/java/gin_java_method_invocation_helper.h
+++ b/content/browser/android/java/gin_java_method_invocation_helper.h
@@ -66,7 +66,7 @@ class CONTENT_EXPORT GinJavaMethodInvocationHelper
const base::ListValue& GetPrimitiveResult();
const base::android::JavaRef<jobject>& GetObjectResult();
const base::android::JavaRef<jclass>& GetSafeAnnotationClass();
- const GinJavaBridgeError GetInvocationError();
+ GinJavaBridgeError GetInvocationError();
private:
friend class base::RefCountedThreadSafe<GinJavaMethodInvocationHelper>;
diff --git a/media/capture/video/linux/v4l2_capture_delegate.h b/media/capture/video/linux/v4l2_capture_delegate.h
index 7e3dbae..56af8e5 100644
--- a/media/capture/video/linux/v4l2_capture_delegate.h
+++ b/media/capture/video/linux/v4l2_capture_delegate.h
@@ -70,7 +70,7 @@ class V4L2CaptureDelegate
// specific.
virtual bool Init(int fd, const v4l2_buffer& buffer) = 0;
- uint8_t* const GetPlaneStart(size_t plane) const {
+ const uint8_t* GetPlaneStart(size_t plane) const {
DCHECK_LT(plane, planes_.size());
return planes_[plane].start;
}
diff --git a/net/tools/quic/quic_simple_server_stream_test.cc b/net/tools/quic/quic_simple_server_stream_test.cc
index 0a301f0..9d8b6e3 100644
--- a/net/tools/quic/quic_simple_server_stream_test.cc
+++ b/net/tools/quic/quic_simple_server_stream_test.cc
@@ -65,7 +65,7 @@ class QuicSimpleServerStreamPeer : public QuicSimpleServerStream {
return stream->body_;
}
- static const int content_length(QuicSimpleServerStream* stream) {
+ static int content_length(QuicSimpleServerStream* stream) {
return stream->content_length_;
}
diff --git a/ppapi/native_client/src/untrusted/irt_stub/thread_creator.c b/ppapi/native_client/src/untrusted/irt_stub/thread_creator.c
index d70186d..370afa3 100644
--- a/ppapi/native_client/src/untrusted/irt_stub/thread_creator.c
+++ b/ppapi/native_client/src/untrusted/irt_stub/thread_creator.c
@@ -30,7 +30,7 @@ static int thread_join(uintptr_t tid) {
return pthread_join((pthread_t) tid, NULL);
}
-const static struct PP_ThreadFunctions thread_funcs = {
+static const struct PP_ThreadFunctions thread_funcs = {
thread_create,
thread_join
};
diff --git a/third_party/android_crazy_linker/src/src/crazy_linker_leb128.h b/third_party/android_crazy_linker/src/src/crazy_linker_leb128.h
index 787566e..08bea66 100644
--- a/third_party/android_crazy_linker/src/src/crazy_linker_leb128.h
+++ b/third_party/android_crazy_linker/src/src/crazy_linker_leb128.h
@@ -15,8 +15,11 @@ namespace crazy {
class Sleb128Decoder {
public:
- Sleb128Decoder(const uint8_t* buffer, size_t count)
- : current_(buffer), end_(buffer + count) { }
+ Sleb128Decoder(const uint8_t* buffer, size_t count) : current_(buffer)
+#ifndef NDEBUG
+ , end_(buffer + count)
+#endif
+ {}
size_t pop_front() {
size_t value = 0;
@@ -42,7 +45,9 @@ class Sleb128Decoder {
private:
const uint8_t* current_;
+#ifndef NDEBUG
const uint8_t* const end_;
+#endif
};
} // namespace crazy
diff --git a/third_party/android_protobuf/BUILD.gn b/third_party/android_protobuf/BUILD.gn
index 266ca83..79d5c4a 100644
--- a/third_party/android_protobuf/BUILD.gn
+++ b/third_party/android_protobuf/BUILD.gn
@@ -3,10 +3,24 @@
# found in the LICENSE file.
if (current_toolchain == host_toolchain) {
+ config("android_protoc_warnings") {
+ cflags = [
+ "-Wno-null-conversion",
+ "-Wno-tautological-undefined-compare",
+ "-Wno-unused-function",
+ "-Wno-unused-local-typedef",
+ ]
+ }
+
# GYP: //third_party/android_protobuf/android_protobuf.gyp:android_protoc
executable("android_protoc") {
configs -= [ "//build/config/compiler:chromium_code" ]
- configs += [ "//build/config/compiler:no_chromium_code" ]
+ configs += [
+ "//build/config/compiler:no_chromium_code",
+
+ # Must be after no_chromium_code so warning flags are ordered correctly.
+ ":android_protoc_warnings",
+ ]
deps = [
"//build/config/sanitizers:deps",
@@ -114,12 +128,6 @@ if (current_toolchain == host_toolchain) {
"src/src",
]
- if (is_clang) {
- cflags = [
- "-Wno-null-conversion",
- "-Wno-tautological-undefined-compare",
- ]
- }
defines = [
# This macro must be defined to suppress the use
# of dynamic_cast<>, which requires RTTI.
diff --git a/third_party/android_protobuf/android_protobuf.gyp b/third_party/android_protobuf/android_protobuf.gyp
index 9d7061bc..ead49f8 100644
--- a/third_party/android_protobuf/android_protobuf.gyp
+++ b/third_party/android_protobuf/android_protobuf.gyp
@@ -128,6 +128,8 @@
'cflags': [
'-Wno-null-conversion',
'-Wno-tautological-undefined-compare',
+ '-Wno-unused-function',
+ '-Wno-unused-local-typedef',
],
'defines': [
# This macro must be defined to suppress the use
diff --git a/third_party/harfbuzz-ng/README.chromium b/third_party/harfbuzz-ng/README.chromium
index 1484e11..107d359 100644
--- a/third_party/harfbuzz-ng/README.chromium
+++ b/third_party/harfbuzz-ng/README.chromium
@@ -18,3 +18,7 @@ tarball's src folder over to src, then checking for removed or added files
and update our build recipes in BUILD.gn and harfbuzz.gyp accordingly, update
the NEWS file from HarfBuzz' release notes, and bump the version numbers
in README.chromium.
+
+Local changes:
+* merge https://github.com/behdad/harfbuzz/pull/203
+* merge https://github.com/behdad/harfbuzz/pull/206
diff --git a/third_party/harfbuzz-ng/src/hb-coretext.cc b/third_party/harfbuzz-ng/src/hb-coretext.cc
index 13ba5d9..316d281 100644
--- a/third_party/harfbuzz-ng/src/hb-coretext.cc
+++ b/third_party/harfbuzz-ng/src/hb-coretext.cc
@@ -693,7 +693,6 @@ resize_and_retry:
scratch += old_scratch_used;
scratch_size -= old_scratch_used;
}
-retry:
{
string_ref = CFStringCreateWithCharactersNoCopy (NULL,
pchars, chars_len,
@@ -1129,10 +1128,6 @@ fail:
* AAT shaper
*/
-HB_SHAPER_DATA_ENSURE_DECLARE(coretext_aat, face)
-HB_SHAPER_DATA_ENSURE_DECLARE(coretext_aat, font)
-
-
/*
* shaper face data
*/
diff --git a/third_party/mach_override/BUILD.gn b/third_party/mach_override/BUILD.gn
index 4672c46..ed1c331 100644
--- a/third_party/mach_override/BUILD.gn
+++ b/third_party/mach_override/BUILD.gn
@@ -2,6 +2,19 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+config("libudis86_warnings") {
+ if (is_clang) {
+ cflags = [
+ # syn.c contains a switch with an assert(false) in a default:
+ # block. In release builds, the function is missing a return.
+ "-Wno-return-type",
+
+ # Fires once in decode.c.
+ "-Wno-sometimes-uninitialized",
+ ]
+ }
+}
+
static_library("libudis86") {
sources = [
"libudis86/decode.c",
@@ -29,7 +42,12 @@ static_library("libudis86") {
cflags = [ "-Wno-return-type" ]
configs -= [ "//build/config/compiler:chromium_code" ]
- configs += [ "//build/config/compiler:no_chromium_code" ]
+ configs += [
+ "//build/config/compiler:no_chromium_code",
+
+ # Must be after no_chromium_code for warning flags to be ordered correctly.
+ ":libudis86_warnings",
+ ]
if (is_clang) {
# For UD_ASSERT(!"message");
diff --git a/third_party/mach_override/mach_override.gyp b/third_party/mach_override/mach_override.gyp
index b16df0b..7206a0a 100644
--- a/third_party/mach_override/mach_override.gyp
+++ b/third_party/mach_override/mach_override.gyp
@@ -47,6 +47,13 @@
# For UD_ASSERT(!"message");
'-Wstring-conversion',
],
+ 'clang_warning_flags': [
+ # syn.c contains a switch with an assert(false) in a default:
+ # block. In release builds, the function is missing a return.
+ '-Wno-return-type',
+ # Fires once in decode.c.
+ '-Wno-sometimes-uninitialized',
+ ],
},
},
{
diff --git a/third_party/ocmock/BUILD.gn b/third_party/ocmock/BUILD.gn
index de51636..7d9f702 100644
--- a/third_party/ocmock/BUILD.gn
+++ b/third_party/ocmock/BUILD.gn
@@ -8,6 +8,11 @@ config("ocmock_config") {
include_dirs = [ "//third_party/ocmock" ]
}
+config("ocmock_warnings") {
+ # NSInvocation+OCMAdditions.m has some `- (void) foo; {...`
+ cflags = [ "-Wno-semicolon-before-method-body" ]
+}
+
source_set("ocmock") {
testonly = true
@@ -70,4 +75,5 @@ source_set("ocmock") {
"//testing/gtest",
]
public_configs = [ ":ocmock_config" ]
+ configs += [ ":ocmock_warnings" ]
}
diff --git a/third_party/ocmock/ocmock.gyp b/third_party/ocmock/ocmock.gyp
index 04a4a88..942992b 100644
--- a/third_party/ocmock/ocmock.gyp
+++ b/third_party/ocmock/ocmock.gyp
@@ -72,6 +72,12 @@
'OCMock/OCObserverMockObject.h',
'OCMock/OCObserverMockObject.m',
],
+ 'variables': {
+ 'clang_warning_flags': [
+ # NSInvocation+OCMAdditions.m has some `- (void) foo; {...`
+ '-Wno-semicolon-before-method-body',
+ ],
+ },
},
],
}],
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
index 2400b18..d3aafd9 100644
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
@@ -2017,7 +2017,7 @@ gfx::Rect DesktopWindowTreeHostX11::ToPixelRect(
return gfx::ToEnclosingRect(rect_in_pixels);
}
-const XID DesktopWindowTreeHostX11::GetModalDialog() {
+XID DesktopWindowTreeHostX11::GetModalDialog() {
return modal_dialog_xid_;
}
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
index 2d4d294..1036152 100644
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
@@ -96,7 +96,7 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
// Returns XID of dialog currently displayed. When it returns 0,
// there is no dialog on the host window.
- const XID GetModalDialog();
+ XID GetModalDialog();
protected:
// Overridden from DesktopWindowTreeHost: