Mesa (main): nv50/ir: Initialize Value member id in constructor.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Jul 15 05:58:30 UTC 2021
Module: Mesa
Branch: main
Commit: 6e4e6d952715fbcbf92dfcf8ded366274e4ab1a4
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=6e4e6d952715fbcbf92dfcf8ded366274e4ab1a4
Author: Vinson Lee <vlee at freedesktop.org>
Date: Wed Apr 21 21:06:28 2021 -0700
nv50/ir: Initialize Value member id in constructor.
Fix defect reported by Coverity Scan.
Uninitialized scalar field (UNINIT_CTOR)
uninit_member: Non-static class member id is not initialized in
this constructor nor in any functions that it calls.
Suggested-by: Karol Herbst <kherbst at redhat.com>
Signed-off-by: Vinson Lee <vlee at freedesktop.org>
Reviewed-by: Karol Herbst <kherbst at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10401>
---
src/gallium/drivers/nouveau/codegen/nv50_ir.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp
index f5b75cd111a..990feb73234 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp
@@ -214,7 +214,7 @@ ValueDef::replace(const ValueRef &repVal, bool doSet)
set(repVal.get());
}
-Value::Value()
+Value::Value() : id(-1)
{
join = this;
memset(®, 0, sizeof(reg));
More information about the mesa-commit
mailing list