From fc8bc41b84cab6c754a964cd6b6fe5eb91cdf22d Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Sat, 20 Sep 2025 13:14:35 +0200 Subject: [PATCH] Cleanup: Compiler warning in GPU kernel compilation Silence false positive about function not returning. Pull Request: https://projects.blender.org/blender/blender/pulls/146178 --- intern/cycles/kernel/integrator/volume_stack.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/intern/cycles/kernel/integrator/volume_stack.h b/intern/cycles/kernel/integrator/volume_stack.h index 6678a78a566..f45b6dc37da 100644 --- a/intern/cycles/kernel/integrator/volume_stack.h +++ b/intern/cycles/kernel/integrator/volume_stack.h @@ -23,6 +23,12 @@ ccl_device_forceinline VolumeStack volume_stack_read(const IntegratorGenericStat else { return integrator_state_read_volume_stack(state, i); } + +# ifdef __KERNEL_GPU__ + /* Silence false positive warning with some GPU compilers. */ + VolumeStack stack = {}; + return stack; +# endif } template