From 033b2f8d5d73fe5342eb4eff5c802fcbc4112bdc Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 16 Sep 2025 11:35:31 +0200 Subject: [PATCH] Cleanup: Initialize closure weight to silence warning on Windows This appears to be a false positive. It warns when the function gets called with this argument, but the function does not actually use it. Pull Request: https://projects.blender.org/blender/blender/pulls/146175 --- intern/cycles/kernel/svm/svm.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/intern/cycles/kernel/svm/svm.h b/intern/cycles/kernel/svm/svm.h index a529b8cce9d..c059fac5c38 100644 --- a/intern/cycles/kernel/svm/svm.h +++ b/intern/cycles/kernel/svm/svm.h @@ -102,7 +102,8 @@ ccl_device void svm_eval_nodes(KernelGlobals kg, const uint32_t path_flag) { float stack[SVM_STACK_SIZE]; - Spectrum closure_weight; + /* Initialiez to silence (false positive?) warning about uninitialzied use on Windows. */ + Spectrum closure_weight = zero_spectrum(); int offset = sd->shader & SHADER_MASK; while (true) {