Enable more warning needed for Skia to build with Dawn on Linux
The new warnings are: - -Wdeprecated-copy - -Winvalid-offsetof - -Wpessimizing-move And the list of warnings was sorted alphabetically. Bug: chromium:1072449 Change-Id: I9f3eecae645455c481ecc2e0be4df350e1453907 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20381 Reviewed-by: Zhenyao Mo <zmo@google.com> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
parent
094d1d4c05
commit
00b90ea832
|
@ -425,9 +425,16 @@ namespace dawn_wire {
|
||||||
ObjectHandle::ObjectHandle(ObjectId id, ObjectGeneration generation)
|
ObjectHandle::ObjectHandle(ObjectId id, ObjectGeneration generation)
|
||||||
: id(id), generation(generation) {
|
: id(id), generation(generation) {
|
||||||
}
|
}
|
||||||
|
|
||||||
ObjectHandle::ObjectHandle(const volatile ObjectHandle& rhs)
|
ObjectHandle::ObjectHandle(const volatile ObjectHandle& rhs)
|
||||||
: id(rhs.id), generation(rhs.generation) {
|
: id(rhs.id), generation(rhs.generation) {
|
||||||
}
|
}
|
||||||
|
ObjectHandle& ObjectHandle::operator=(const volatile ObjectHandle& rhs) {
|
||||||
|
id = rhs.id;
|
||||||
|
generation = rhs.generation;
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
ObjectHandle& ObjectHandle::AssignFrom(const ObjectHandle& rhs) {
|
ObjectHandle& ObjectHandle::AssignFrom(const ObjectHandle& rhs) {
|
||||||
id = rhs.id;
|
id = rhs.id;
|
||||||
generation = rhs.generation;
|
generation = rhs.generation;
|
||||||
|
|
|
@ -27,7 +27,9 @@ namespace dawn_wire {
|
||||||
|
|
||||||
ObjectHandle();
|
ObjectHandle();
|
||||||
ObjectHandle(ObjectId id, ObjectGeneration generation);
|
ObjectHandle(ObjectId id, ObjectGeneration generation);
|
||||||
|
|
||||||
ObjectHandle(const volatile ObjectHandle& rhs);
|
ObjectHandle(const volatile ObjectHandle& rhs);
|
||||||
|
ObjectHandle& operator=(const volatile ObjectHandle& rhs);
|
||||||
|
|
||||||
// MSVC has a bug where it thinks the volatile copy assignment is a duplicate.
|
// MSVC has a bug where it thinks the volatile copy assignment is a duplicate.
|
||||||
// Workaround this by forwarding to a different function AssignFrom.
|
// Workaround this by forwarding to a different function AssignFrom.
|
||||||
|
|
|
@ -90,16 +90,19 @@ config("dawn_internal") {
|
||||||
# Enable more warnings that were found when using Dawn in other projects
|
# Enable more warnings that were found when using Dawn in other projects
|
||||||
if (is_clang) {
|
if (is_clang) {
|
||||||
cflags = [
|
cflags = [
|
||||||
"-Wstrict-prototypes",
|
|
||||||
"-Winconsistent-missing-destructor-override",
|
|
||||||
"-Wshadow-field",
|
|
||||||
"-Wmissing-field-initializers",
|
|
||||||
"-Wcstring-format-directive",
|
|
||||||
"-Wtautological-unsigned-zero-compare",
|
|
||||||
"-Wreturn-std-move-in-c++11",
|
|
||||||
"-Wconditional-uninitialized",
|
"-Wconditional-uninitialized",
|
||||||
|
"-Wcstring-format-directive",
|
||||||
"-Wc++11-narrowing",
|
"-Wc++11-narrowing",
|
||||||
|
"-Wdeprecated-copy",
|
||||||
"-Wextra-semi-stmt",
|
"-Wextra-semi-stmt",
|
||||||
|
"-Winconsistent-missing-destructor-override",
|
||||||
|
"-Winvalid-offsetof",
|
||||||
|
"-Wmissing-field-initializers",
|
||||||
|
"-Wpessimizing-move",
|
||||||
|
"-Wreturn-std-move-in-c++11",
|
||||||
|
"-Wshadow-field",
|
||||||
|
"-Wstrict-prototypes",
|
||||||
|
"-Wtautological-unsigned-zero-compare",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -176,6 +176,10 @@ namespace utils {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ComboRenderPassDescriptor::ComboRenderPassDescriptor(const ComboRenderPassDescriptor& other) {
|
||||||
|
*this = other;
|
||||||
|
}
|
||||||
|
|
||||||
const ComboRenderPassDescriptor& ComboRenderPassDescriptor::operator=(
|
const ComboRenderPassDescriptor& ComboRenderPassDescriptor::operator=(
|
||||||
const ComboRenderPassDescriptor& otherRenderPass) {
|
const ComboRenderPassDescriptor& otherRenderPass) {
|
||||||
cDepthStencilAttachmentInfo = otherRenderPass.cDepthStencilAttachmentInfo;
|
cDepthStencilAttachmentInfo = otherRenderPass.cDepthStencilAttachmentInfo;
|
||||||
|
|
|
@ -59,6 +59,8 @@ namespace utils {
|
||||||
public:
|
public:
|
||||||
ComboRenderPassDescriptor(std::initializer_list<wgpu::TextureView> colorAttachmentInfo,
|
ComboRenderPassDescriptor(std::initializer_list<wgpu::TextureView> colorAttachmentInfo,
|
||||||
wgpu::TextureView depthStencil = wgpu::TextureView());
|
wgpu::TextureView depthStencil = wgpu::TextureView());
|
||||||
|
|
||||||
|
ComboRenderPassDescriptor(const ComboRenderPassDescriptor& otherRenderPass);
|
||||||
const ComboRenderPassDescriptor& operator=(
|
const ComboRenderPassDescriptor& operator=(
|
||||||
const ComboRenderPassDescriptor& otherRenderPass);
|
const ComboRenderPassDescriptor& otherRenderPass);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue