Skip to content

draw: fix uninit variable false positive

Mike Blumenkrantz requested to merge zmike/mesa:draw into main

What does this MR do and why?

draw: fix uninit variable false positive

In function ‘generate_clipmask’, inlined from ‘draw_llvm_generate’ at ../src/gallium/auxiliary/draw/draw_llvm.c:1975:24: ../src/gallium/auxiliary/draw/draw_llvm.c:1302:25: warning: ‘sum’ may be used uninitialized [-Wmaybe-uninitialized] 1302 | sum = lp_build_fmuladd(builder, planes, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1303 | (LLVMValueRef[]){cv_x, cv_y, cv_z, cv_w}[i], sum); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/gallium/auxiliary/draw/draw_llvm.c: In function ‘draw_llvm_generate’: ../src/gallium/auxiliary/draw/draw_llvm.c:1149:44: note: ‘sum’ was declared here 1149 | LLVMValueRef plane1, planes, plane_ptr, sum; | ^~~

Merge request reports