Mesa (master): d3d12: Initialize local_resource member mapped in constructor.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Dec 30 06:01:26 UTC 2020
Module: Mesa
Branch: master
Commit: 15e7e6443cb70139e428189f661c3ca648929521
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=15e7e6443cb70139e428189f661c3ca648929521
Author: Vinson Lee <vlee at freedesktop.org>
Date: Mon Dec 21 17:52:04 2020 -0800
d3d12: Initialize local_resource member mapped in constructor.
Fix defect reported by Coverity Scan.
Uninitialized scalar field (UNINIT_CTOR)
uninit_member: Non-static class member mapped is not initialized in this
constructor nor in any functions that it calls.
Signed-off-by: Vinson Lee <vlee at freedesktop.org>
Reviewed-by: Erik Faye-Lund <erik.faye-lund at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8193>
---
src/gallium/drivers/d3d12/d3d12_resource.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/gallium/drivers/d3d12/d3d12_resource.cpp b/src/gallium/drivers/d3d12/d3d12_resource.cpp
index 660328ad7b9..5ef1b014bde 100644
--- a/src/gallium/drivers/d3d12/d3d12_resource.cpp
+++ b/src/gallium/drivers/d3d12/d3d12_resource.cpp
@@ -622,7 +622,8 @@ synchronize(struct d3d12_context *ctx,
/* A wrapper to make sure local resources are freed and unmapped with
* any exit path */
struct local_resource {
- local_resource(pipe_screen *s, struct pipe_resource *tmpl)
+ local_resource(pipe_screen *s, struct pipe_resource *tmpl) :
+ mapped(false)
{
res = d3d12_resource(d3d12_resource_create(s, tmpl));
}
More information about the mesa-commit
mailing list