Mesa (master): r600/sb: Initialize sb_context members in constructor.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Nov 20 01:00:11 UTC 2020
Module: Mesa
Branch: master
Commit: 54e8138bbc8f694eaa47bfb289251ae7c7e12210
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=54e8138bbc8f694eaa47bfb289251ae7c7e12210
Author: Vinson Lee <vlee at freedesktop.org>
Date: Mon Nov 2 17:59:46 2020 -0800
r600/sb: Initialize sb_context members in constructor.
Fix defects reported by Coverity Scan.
Uninitialized scalar field (UNINIT_CTOR)
uninit_member: Non-static class member alu_temp_gprs is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member max_fetch is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member has_trans is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member vtx_src_num is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member num_slots is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member uses_mova_gpr is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member r6xx_gpr_index_workaround is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member stack_workaround_8xx is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member stack_workaround_9xx is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member wavefront_size is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member stack_entry_size is not initialized in this constructor nor in any functions that it calls.
Signed-off-by: Vinson Lee <vlee at freedesktop.org>
Reviewed-by: Gert Wollny <gert.wollny at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7413>
---
src/gallium/drivers/r600/sb/sb_bc.h | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/gallium/drivers/r600/sb/sb_bc.h b/src/gallium/drivers/r600/sb/sb_bc.h
index 942e228d95c..ef2f398556e 100644
--- a/src/gallium/drivers/r600/sb/sb_bc.h
+++ b/src/gallium/drivers/r600/sb/sb_bc.h
@@ -692,7 +692,12 @@ public:
static unsigned dskip_mode;
sb_context() : src_stats(), opt_stats(), isa(0),
- hw_chip(HW_CHIP_UNKNOWN), hw_class(HW_CLASS_UNKNOWN) {}
+ hw_chip(HW_CHIP_UNKNOWN), hw_class(HW_CLASS_UNKNOWN),
+ alu_temp_gprs(0), max_fetch(0), has_trans(false), vtx_src_num(0),
+ num_slots(0), uses_mova_gpr(false),
+ r6xx_gpr_index_workaround(false), stack_workaround_8xx(false),
+ stack_workaround_9xx(false), wavefront_size(0),
+ stack_entry_size(0) {}
int init(r600_isa *isa, sb_hw_chip chip, sb_hw_class cclass);
More information about the mesa-commit
mailing list