From f13f0e1f77acc8a95fbd93cf8c9016442193b628 Mon Sep 17 00:00:00 2001 From: "Juan A. Suarez Romero" Date: Mon, 23 Dec 2024 17:42:35 +0100 Subject: [PATCH] v3d: remove intermediate variable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Static analyzer is complaining that value stored to `v3d` during its initialization is never read. But the variable is used just below in a loop, so it is not clear if this is just a false positive. In any case, having this intermediate variable provides nothing, specially when it is used only in a single place. So rather remove it and use the full variable. Reviewed-by: Alejandro PiƱeiro Signed-off-by: Juan A. Suarez Romero Part-of: --- src/gallium/drivers/v3d/v3dx_emit.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/gallium/drivers/v3d/v3dx_emit.c b/src/gallium/drivers/v3d/v3dx_emit.c index 2055ec036c7..e8f6d894745 100644 --- a/src/gallium/drivers/v3d/v3dx_emit.c +++ b/src/gallium/drivers/v3d/v3dx_emit.c @@ -181,10 +181,9 @@ emit_varying_flags(struct v3d_job *job, uint32_t *flags, enum V3DX(Varying_Flags_Action) lower, enum V3DX(Varying_Flags_Action) higher)) { - struct v3d_context *v3d = job->v3d; bool emitted_any = false; - for (int i = 0; i < ARRAY_SIZE(v3d->prog.fs->prog_data.fs->flat_shade_flags); i++) { + for (int i = 0; i < ARRAY_SIZE(job->v3d->prog.fs->prog_data.fs->flat_shade_flags); i++) { if (!flags[i]) continue;