aco: Initialize mad_info member literal_idx.

Fix defect reported by Coverity Scan.

Uninitialized scalar field (UNINIT_CTOR)
uninit_member: Non-static class member literal_idx is not initialized in
this constructor nor in any functions that it calls.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Tony Wasserka <tony.wasserka@gmx.de>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6832>
This commit is contained in:
Vinson Lee
2020-09-22 17:51:06 -07:00
committed by Marge Bot
parent 93b8cdfe8b
commit 70945dd362
+1 -1
View File
@@ -77,7 +77,7 @@ struct mad_info {
bool check_literal;
mad_info(aco_ptr<Instruction> instr, uint32_t id)
: add_instr(std::move(instr)), mul_temp_id(id), check_literal(false) {}
: add_instr(std::move(instr)), mul_temp_id(id), literal_idx(0), check_literal(false) {}
};
enum Label {