summaryrefslogtreecommitdiff
path: root/chromium/third_party
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2018-10-19 14:56:23 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2022-12-13 16:43:16 +0100
commitd0b30de9533df9e4d09b879ea1647e4c65f901c7 (patch)
tree490851eb486b5b66d84df40669029db077ff111a /chromium/third_party
parentde9a9a42cf40ef86a45e0f1d062cf209df9541cd (diff)
downloadqtwebengine-chromium-d0b30de9533df9e4d09b879ea1647e4c65f901c7.tar.gz
Silence most warnings
Suppress and fix many clang, GCC and MSVC warnings "cause the night is crap and full of warnings" Change-Id: I09882f850bac97c04a3d772e5f6386ce896c57b9 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'chromium/third_party')
-rw-r--r--chromium/third_party/blink/renderer/BUILD.gn1
-rw-r--r--chromium/third_party/blink/renderer/bindings/core/v8/generated_code_helper.h2
-rw-r--r--chromium/third_party/blink/renderer/build/linux/prefix.h2
-rw-r--r--chromium/third_party/blink/renderer/build/mac/prefix.h2
-rw-r--r--chromium/third_party/blink/renderer/build/win/precompile.h2
-rw-r--r--chromium/third_party/blink/renderer/core/precompile_core.h2
-rw-r--r--chromium/third_party/blink/renderer/platform/precompile_platform.h2
-rw-r--r--chromium/third_party/blink/renderer/platform/text/hyphenation/hyphenator_aosp.cc2
-rw-r--r--chromium/third_party/blink/renderer/platform/text/segmented_string.h4
-rw-r--r--chromium/third_party/blink/renderer/platform/wtf/hash_traits.h2
-rw-r--r--chromium/third_party/khronos/GLES2/gl2.h12
-rw-r--r--chromium/third_party/khronos/GLES2/gl2ext.h2
-rw-r--r--chromium/third_party/mesa_headers/GL/gl.h12
-rw-r--r--chromium/third_party/mesa_headers/GL/glext.h2
14 files changed, 39 insertions, 10 deletions
diff --git a/chromium/third_party/blink/renderer/BUILD.gn b/chromium/third_party/blink/renderer/BUILD.gn
index a5c45ce2d17..dc2ee781abb 100644
--- a/chromium/third_party/blink/renderer/BUILD.gn
+++ b/chromium/third_party/blink/renderer/BUILD.gn
@@ -58,6 +58,7 @@ config("inside_blink") {
"-Wno-sign-conversion",
"-Wno-implicit-float-conversion",
"-Wno-implicit-int-conversion",
+ "-Wno-unused-variable",
]
}
}
diff --git a/chromium/third_party/blink/renderer/bindings/core/v8/generated_code_helper.h b/chromium/third_party/blink/renderer/bindings/core/v8/generated_code_helper.h
index 3793821a159..8204fc16daa 100644
--- a/chromium/third_party/blink/renderer/bindings/core/v8/generated_code_helper.h
+++ b/chromium/third_party/blink/renderer/bindings/core/v8/generated_code_helper.h
@@ -118,7 +118,7 @@ typename IDLSequence<T>::ImplType VariadicArgumentsToNativeValues(
if (UNLIKELY(exception_state.HadException()))
return VectorType();
}
- return std::move(result);
+ return result;
}
CORE_EXPORT absl::optional<size_t> FindIndexInEnumStringTable(
diff --git a/chromium/third_party/blink/renderer/build/linux/prefix.h b/chromium/third_party/blink/renderer/build/linux/prefix.h
index 542333a40ee..603718ba828 100644
--- a/chromium/third_party/blink/renderer/build/linux/prefix.h
+++ b/chromium/third_party/blink/renderer/build/linux/prefix.h
@@ -9,7 +9,7 @@
// any C++ headers must go in the __cplusplus block below.
#if defined(THIRD_PARTY_BLINK_RENDERER_BUILD_LINUX_PREFIX_H_)
-#error You shouldn't include the precompiled header file more than once.
+#error "You shouldn't include the precompiled header file more than once."
#endif
#define THIRD_PARTY_BLINK_RENDERER_BUILD_LINUX_PREFIX_H_
diff --git a/chromium/third_party/blink/renderer/build/mac/prefix.h b/chromium/third_party/blink/renderer/build/mac/prefix.h
index 5f7eb126ea1..c2a7745b78a 100644
--- a/chromium/third_party/blink/renderer/build/mac/prefix.h
+++ b/chromium/third_party/blink/renderer/build/mac/prefix.h
@@ -27,7 +27,7 @@
*/
#ifdef THIRD_PARTY_BLINK_RENDERER_BUILD_MAC_PREFIX_H_
-#error You shouldn't include the precompiled header file more than once.
+#error "You shouldn't include the precompiled header file more than once."
#endif
#define THIRD_PARTY_BLINK_RENDERER_BUILD_MAC_PREFIX_H_
diff --git a/chromium/third_party/blink/renderer/build/win/precompile.h b/chromium/third_party/blink/renderer/build/win/precompile.h
index fcd0296e08a..868b2e67757 100644
--- a/chromium/third_party/blink/renderer/build/win/precompile.h
+++ b/chromium/third_party/blink/renderer/build/win/precompile.h
@@ -6,7 +6,7 @@
// no-std-usage-because-pch-file
#ifdef THIRD_PARTY_BLINK_RENDERER_BUILD_WIN_PRECOMPILE_H_
-#error You shouldn't include the precompiled header file more than once.
+#error "You shouldn't include the precompiled header file more than once."
#endif
#define THIRD_PARTY_BLINK_RENDERER_BUILD_WIN_PRECOMPILE_H_
diff --git a/chromium/third_party/blink/renderer/core/precompile_core.h b/chromium/third_party/blink/renderer/core/precompile_core.h
index 00cbcd2e734..e88f40c0c00 100644
--- a/chromium/third_party/blink/renderer/core/precompile_core.h
+++ b/chromium/third_party/blink/renderer/core/precompile_core.h
@@ -3,7 +3,7 @@
// found in the LICENSE file.
#ifdef THIRD_PARTY_BLINK_RENDERER_CORE_PRECOMPILE_CORE_H_
-#error You shouldn't include the precompiled header file more than once.
+#error "You shouldn't include the precompiled header file more than once."
#endif
#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_PRECOMPILE_CORE_H_
diff --git a/chromium/third_party/blink/renderer/platform/precompile_platform.h b/chromium/third_party/blink/renderer/platform/precompile_platform.h
index 0ee7a20102c..83a9e903de4 100644
--- a/chromium/third_party/blink/renderer/platform/precompile_platform.h
+++ b/chromium/third_party/blink/renderer/platform/precompile_platform.h
@@ -5,7 +5,7 @@
// no-include-guard-because-pch-file
#ifdef THIRD_PARTY_BLINK_RENDERER_PLATFORM_PRECOMPILE_PLATFORM_H_
-#error You shouldn't include the precompiled header file more than once.
+#error "You shouldn't include the precompiled header file more than once."
#endif
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_PRECOMPILE_PLATFORM_H_
diff --git a/chromium/third_party/blink/renderer/platform/text/hyphenation/hyphenator_aosp.cc b/chromium/third_party/blink/renderer/platform/text/hyphenation/hyphenator_aosp.cc
index e7430a2872c..a5b5fef1001 100644
--- a/chromium/third_party/blink/renderer/platform/text/hyphenation/hyphenator_aosp.cc
+++ b/chromium/third_party/blink/renderer/platform/text/hyphenation/hyphenator_aosp.cc
@@ -171,7 +171,7 @@ bool Hyphenator::alphabetLookup(uint16_t* alpha_codes,
alpha_codes[0] = 0;
for (wtf_size_t i = 0; i < len; i++) {
uint16_t c = word[i];
- auto* p = std::lower_bound(begin, end, c << 11);
+ auto* p = std::lower_bound(begin, end, uint32_t(c) << 11);
if (p == end) {
return false;
}
diff --git a/chromium/third_party/blink/renderer/platform/text/segmented_string.h b/chromium/third_party/blink/renderer/platform/text/segmented_string.h
index b2b95dc21a5..cd60dcfbcfe 100644
--- a/chromium/third_party/blink/renderer/platform/text/segmented_string.h
+++ b/chromium/third_party/blink/renderer/platform/text/segmented_string.h
@@ -139,12 +139,12 @@ class PLATFORM_EXPORT SegmentedSubstring {
ALWAYS_INLINE int offset() const {
DCHECK_LE(data_start_, data_.string8_ptr);
- return static_cast<int>(data_.string8_ptr - data_start_) >> !is_8bit_;
+ return static_cast<int>(data_.string8_ptr - data_start_) >> (!is_8bit_ ? 1 : 0);
}
ALWAYS_INLINE int length() const {
DCHECK_LE(data_.string8_ptr, data_last_char_);
- return static_cast<int>(data_end() - data_.string8_ptr) >> !is_8bit_;
+ return static_cast<int>(data_end() - data_.string8_ptr) >> (!is_8bit_ ? 1 : 0);
}
private:
diff --git a/chromium/third_party/blink/renderer/platform/wtf/hash_traits.h b/chromium/third_party/blink/renderer/platform/wtf/hash_traits.h
index 31710543a6a..6ba1bc3fb80 100644
--- a/chromium/third_party/blink/renderer/platform/wtf/hash_traits.h
+++ b/chromium/third_party/blink/renderer/platform/wtf/hash_traits.h
@@ -207,7 +207,7 @@ struct HashTraits<P*> : GenericHashTraits<P*> {
static void ConstructDeletedValue(P*& slot, bool) {
slot = reinterpret_cast<P*>(-1);
}
- static bool IsDeletedValue(const P* value) {
+ static bool IsDeletedValue(std::add_const_t<P>* value) {
return value == reinterpret_cast<P*>(-1);
}
};
diff --git a/chromium/third_party/khronos/GLES2/gl2.h b/chromium/third_party/khronos/GLES2/gl2.h
index f4473788bba..47aace52b99 100644
--- a/chromium/third_party/khronos/GLES2/gl2.h
+++ b/chromium/third_party/khronos/GLES2/gl2.h
@@ -85,8 +85,12 @@ typedef khronos_uint8_t GLubyte;
#define GL_DEPTH_BUFFER_BIT 0x00000100
#define GL_STENCIL_BUFFER_BIT 0x00000400
#define GL_COLOR_BUFFER_BIT 0x00004000
+#ifndef GL_FALSE
#define GL_FALSE 0
+#endif
+#ifndef GL_TRUE
#define GL_TRUE 1
+#endif
#define GL_POINTS 0x0000
#define GL_LINES 0x0001
#define GL_LINE_LOOP 0x0002
@@ -94,8 +98,12 @@ typedef khronos_uint8_t GLubyte;
#define GL_TRIANGLES 0x0004
#define GL_TRIANGLE_STRIP 0x0005
#define GL_TRIANGLE_FAN 0x0006
+#ifndef GL_ZERO
#define GL_ZERO 0
+#endif
+#ifndef GL_ONE
#define GL_ONE 1
+#endif
#define GL_SRC_COLOR 0x0300
#define GL_ONE_MINUS_SRC_COLOR 0x0301
#define GL_SRC_ALPHA 0x0302
@@ -143,7 +151,9 @@ typedef khronos_uint8_t GLubyte;
#define GL_POLYGON_OFFSET_FILL 0x8037
#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
#define GL_SAMPLE_COVERAGE 0x80A0
+#ifndef GL_NO_ERROR
#define GL_NO_ERROR 0
+#endif
#define GL_INVALID_ENUM 0x0500
#define GL_INVALID_VALUE 0x0501
#define GL_INVALID_OPERATION 0x0502
@@ -373,7 +383,9 @@ typedef khronos_uint8_t GLubyte;
#define GL_COLOR_ATTACHMENT0 0x8CE0
#define GL_DEPTH_ATTACHMENT 0x8D00
#define GL_STENCIL_ATTACHMENT 0x8D20
+#ifndef GL_NONE
#define GL_NONE 0
+#endif
#define GL_FRAMEBUFFER_COMPLETE 0x8CD5
#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6
#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
diff --git a/chromium/third_party/khronos/GLES2/gl2ext.h b/chromium/third_party/khronos/GLES2/gl2ext.h
index 3472b000661..284ecd24711 100644
--- a/chromium/third_party/khronos/GLES2/gl2ext.h
+++ b/chromium/third_party/khronos/GLES2/gl2ext.h
@@ -2978,7 +2978,9 @@ GL_APICALL void GL_APIENTRY glCopyBufferSubDataNV (GLenum readTarget, GLenum wri
#define GL_COVERAGE_COMPONENT4_NV 0x8ED1
#define GL_COVERAGE_ATTACHMENT_NV 0x8ED2
#define GL_COVERAGE_BUFFERS_NV 0x8ED3
+#ifndef GL_COVERAGE_SAMPLES_NV
#define GL_COVERAGE_SAMPLES_NV 0x8ED4
+#endif
#define GL_COVERAGE_ALL_FRAGMENTS_NV 0x8ED5
#define GL_COVERAGE_EDGE_FRAGMENTS_NV 0x8ED6
#define GL_COVERAGE_AUTOMATIC_NV 0x8ED7
diff --git a/chromium/third_party/mesa_headers/GL/gl.h b/chromium/third_party/mesa_headers/GL/gl.h
index 60518d2eb4d..020dc0d8708 100644
--- a/chromium/third_party/mesa_headers/GL/gl.h
+++ b/chromium/third_party/mesa_headers/GL/gl.h
@@ -170,8 +170,12 @@ typedef double GLclampd; /* double precision float in [0,1] */
*/
/* Boolean values */
+#ifndef GL_FALSE
#define GL_FALSE 0x0
+#endif
+#ifndef GL_TRUE
#define GL_TRUE 0x1
+#endif
/* Data types */
#define GL_BYTE 0x1400
@@ -371,8 +375,12 @@ typedef double GLclampd; /* double precision float in [0,1] */
#define GL_BLEND 0x0BE2
#define GL_BLEND_SRC 0x0BE1
#define GL_BLEND_DST 0x0BE0
+#ifndef GL_ZERO
#define GL_ZERO 0x0
+#endif
+#ifndef GL_ONE
#define GL_ONE 0x1
+#endif
#define GL_SRC_COLOR 0x0300
#define GL_ONE_MINUS_SRC_COLOR 0x0301
#define GL_SRC_ALPHA 0x0302
@@ -462,7 +470,9 @@ typedef double GLclampd; /* double precision float in [0,1] */
#define GL_DECR 0x1E03
/* Buffers, Pixel Drawing/Reading */
+#ifndef GL_NONE
#define GL_NONE 0x0
+#endif
#define GL_LEFT 0x0406
#define GL_RIGHT 0x0407
/*GL_FRONT 0x0404 */
@@ -690,7 +700,9 @@ typedef double GLclampd; /* double precision float in [0,1] */
#define GL_EXTENSIONS 0x1F03
/* Errors */
+#ifndef GL_NO_ERROR
#define GL_NO_ERROR 0x0
+#endif
#define GL_INVALID_ENUM 0x0500
#define GL_INVALID_VALUE 0x0501
#define GL_INVALID_OPERATION 0x0502
diff --git a/chromium/third_party/mesa_headers/GL/glext.h b/chromium/third_party/mesa_headers/GL/glext.h
index 8036db50337..5edd5009fdf 100644
--- a/chromium/third_party/mesa_headers/GL/glext.h
+++ b/chromium/third_party/mesa_headers/GL/glext.h
@@ -5883,7 +5883,9 @@ extern "C" {
#endif
#ifndef GL_NV_multisample_coverage
+#ifndef GL_COVERAGE_SAMPLES_NV
#define GL_COVERAGE_SAMPLES_NV 0x80A9
+#endif
#define GL_COLOR_SAMPLES_NV 0x8E20
#endif