mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 07:08:04 +02:00
glsl: Update loop_terminator constructor to accept parameters.
Fix defect reported by Coverity Scan. Uninitialized scalar field (UNINIT_CTOR) uninit_member: Non-static class member continue_from_then is not initialized in this constructor nor in any functions that it calls. Suggested-by: Timothy Arceri <tarceri@itsqueeze.com> Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7283>
This commit is contained in:
parent
f74ef15879
commit
7dc17ae5ab
2 changed files with 4 additions and 6 deletions
|
|
@ -355,10 +355,8 @@ loop_terminator *
|
|||
loop_variable_state::insert(ir_if *if_stmt, bool continue_from_then)
|
||||
{
|
||||
void *mem_ctx = ralloc_parent(this);
|
||||
loop_terminator *t = new(mem_ctx) loop_terminator();
|
||||
|
||||
t->ir = if_stmt;
|
||||
t->continue_from_then = continue_from_then;
|
||||
loop_terminator *t = new(mem_ctx) loop_terminator(if_stmt,
|
||||
continue_from_then);
|
||||
|
||||
this->terminators.push_tail(t);
|
||||
|
||||
|
|
|
|||
|
|
@ -194,8 +194,8 @@ public:
|
|||
|
||||
class loop_terminator : public exec_node {
|
||||
public:
|
||||
loop_terminator()
|
||||
: ir(NULL), iterations(-1)
|
||||
loop_terminator(ir_if *ir, bool continue_from_then)
|
||||
: ir(ir), iterations(-1), continue_from_then(continue_from_then)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue