diff options
author | Jüri Valdmann <juri.valdmann@qt.io> | 2019-09-13 11:51:58 +0200 |
---|---|---|
committer | Jüri Valdmann <juri.valdmann@qt.io> | 2019-09-23 08:49:18 +0000 |
commit | c02bd9109172291ee27ef7aff623ea8c20ee4d13 (patch) | |
tree | 2925f93ad8158cf6b3e0cd5e2a2f46356be7c1a7 | |
parent | 2ebef7c14e20472fd41290c6effa8ffb679a8650 (diff) | |
download | qtwebengine-chromium-c02bd9109172291ee27ef7aff623ea8c20ee4d13.tar.gz |
FIXUP: Silence most warnings
Add -Wno-return-type (6949 warnings) and -Wno-deprecated-copy (306 warnings) to
cflags_cc for GCC.
Guard #pragma clang with #ifdef __clang__.
Revert some now-unnecessary fixes.
Tested with GCC 9.1.
Change-Id: I34b63f50201da5e4cdbce88f354836ba753ab85e
Reviewed-by: Michael Brüning <michael.bruning@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
9 files changed, 16 insertions, 7 deletions
diff --git a/chromium/base/bind_internal.h b/chromium/base/bind_internal.h index 85fcc50a58a..d59300dfdd0 100644 --- a/chromium/base/bind_internal.h +++ b/chromium/base/bind_internal.h @@ -733,7 +733,6 @@ bool QueryCancellationTraitsImpl(BindStateBase::CancellationQueryMode mode, functor, std::get<indices>(bound_args)...); } NOTREACHED(); - return false; } // Relays |base| to corresponding CallbackCancellationTraits<>::Run(). Returns diff --git a/chromium/base/callback_internal.cc b/chromium/base/callback_internal.cc index d710682e1fa..6a185d90929 100644 --- a/chromium/base/callback_internal.cc +++ b/chromium/base/callback_internal.cc @@ -21,7 +21,6 @@ bool QueryCancellationTraitsForNonCancellables( return true; } NOTREACHED(); - return false; } } // namespace diff --git a/chromium/build/config/compiler/BUILD.gn b/chromium/build/config/compiler/BUILD.gn index 2d6de47ea7c..be485fd89b9 100644 --- a/chromium/build/config/compiler/BUILD.gn +++ b/chromium/build/config/compiler/BUILD.gn @@ -1508,6 +1508,8 @@ config("default_warnings") { cflags_cc += [ "-Wno-class-memaccess" ] cflags_cc += [ "-Wno-subobject-linkage" ] cflags_cc += [ "-Wno-invalid-offsetof" ] + cflags_cc += [ "-Wno-return-type" ] + cflags_cc += [ "-Wno-deprecated-copy" ] } } diff --git a/chromium/content/common/input/event_with_latency_info.h b/chromium/content/common/input/event_with_latency_info.h index f2b9b95ae02..0b97bdd35ad 100644 --- a/chromium/content/common/input/event_with_latency_info.h +++ b/chromium/content/common/input/event_with_latency_info.h @@ -49,9 +49,8 @@ class EventWithLatencyInfo { void CoalesceWith(const EventWithLatencyInfo& other) { // |other| should be a newer event than |this|. - if (other.latency.trace_id() >= 0 && latency.trace_id() >= 0) { + if (other.latency.trace_id() >= 0 && latency.trace_id() >= 0) DCHECK_GT(other.latency.trace_id(), latency.trace_id()); - } // New events get coalesced into older events, and the newer timestamp // should always be preserved. diff --git a/chromium/net/third_party/quiche/src/quic/core/proto/cached_network_parameters_proto.h b/chromium/net/third_party/quiche/src/quic/core/proto/cached_network_parameters_proto.h index 6a37aa1845c..4a7da5d79e4 100644 --- a/chromium/net/third_party/quiche/src/quic/core/proto/cached_network_parameters_proto.h +++ b/chromium/net/third_party/quiche/src/quic/core/proto/cached_network_parameters_proto.h @@ -5,11 +5,15 @@ #ifndef QUICHE_QUIC_CORE_PROTO_CACHED_NETWORK_PARAMETERS_PROTO_H_ #define QUICHE_QUIC_CORE_PROTO_CACHED_NETWORK_PARAMETERS_PROTO_H_ +#ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Weverything" +#endif #include "net/third_party/quiche/src/quic/core/proto/cached_network_parameters.pb.h" +#ifdef __clang__ #pragma clang diagnostic pop +#endif #endif // QUICHE_QUIC_CORE_PROTO_CACHED_NETWORK_PARAMETERS_PROTO_H_ diff --git a/chromium/net/third_party/quiche/src/quic/core/proto/crypto_server_config_proto.h b/chromium/net/third_party/quiche/src/quic/core/proto/crypto_server_config_proto.h index 4383e8ecae3..3ae9a216216 100644 --- a/chromium/net/third_party/quiche/src/quic/core/proto/crypto_server_config_proto.h +++ b/chromium/net/third_party/quiche/src/quic/core/proto/crypto_server_config_proto.h @@ -5,11 +5,15 @@ #ifndef QUICHE_QUIC_CORE_PROTO_CRYPTO_SERVER_CONFIG_PROTO_H_ #define QUICHE_QUIC_CORE_PROTO_CRYPTO_SERVER_CONFIG_PROTO_H_ +#ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Weverything" +#endif #include "net/third_party/quiche/src/quic/core/proto/crypto_server_config.pb.h" +#ifdef __clang__ #pragma clang diagnostic pop +#endif #endif // QUICHE_QUIC_CORE_PROTO_CRYPTO_SERVER_CONFIG_PROTO_H_ diff --git a/chromium/net/third_party/quiche/src/quic/core/proto/source_address_token_proto.h b/chromium/net/third_party/quiche/src/quic/core/proto/source_address_token_proto.h index 25f527488c0..6becc9907fe 100644 --- a/chromium/net/third_party/quiche/src/quic/core/proto/source_address_token_proto.h +++ b/chromium/net/third_party/quiche/src/quic/core/proto/source_address_token_proto.h @@ -5,11 +5,15 @@ #ifndef QUICHE_QUIC_CORE_PROTO_SOURCE_ADDRESS_TOKEN_PROTO_H_ #define QUICHE_QUIC_CORE_PROTO_SOURCE_ADDRESS_TOKEN_PROTO_H_ +#ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Weverything" +#endif #include "net/third_party/quiche/src/quic/core/proto/source_address_token.pb.h" +#ifdef __clang__ #pragma clang diagnostic pop +#endif #endif // QUICHE_QUIC_CORE_PROTO_SOURCE_ADDRESS_TOKEN_PROTO_H_ diff --git a/chromium/third_party/blink/renderer/core/dom/collection_index_cache.h b/chromium/third_party/blink/renderer/core/dom/collection_index_cache.h index 0f3e870bf6c..caf4bf7b3c1 100644 --- a/chromium/third_party/blink/renderer/core/dom/collection_index_cache.h +++ b/chromium/third_party/blink/renderer/core/dom/collection_index_cache.h @@ -217,9 +217,8 @@ CollectionIndexCache<Collection, NodeType>::NodeAfterCachedNode( collection.TraverseForwardToOffset(index, *CachedNode(), current_index); if (!current_node) { // Did not find the node. On plus side, we now know the length. - if (IsCachedNodeCountValid()) { + if (IsCachedNodeCountValid()) DCHECK_EQ(current_index + 1, CachedNodeCount()); - } SetCachedNodeCount(current_index + 1); return nullptr; } diff --git a/chromium/third_party/blink/renderer/platform/wtf/casting.h b/chromium/third_party/blink/renderer/platform/wtf/casting.h index 09951be05f6..ee2873f573b 100644 --- a/chromium/third_party/blink/renderer/platform/wtf/casting.h +++ b/chromium/third_party/blink/renderer/platform/wtf/casting.h @@ -57,7 +57,6 @@ struct DowncastTraits { template <typename U> static bool AllowFrom(const U&) { static_assert(sizeof(U) == 0, "no downcast traits specialization for T"); - return false; } }; |