Mesa (main): vulkan: fix uninitialized variables
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Nov 23 19:32:45 UTC 2021
Module: Mesa
Branch: main
Commit: d7957df3184846e6bbaec985640dacafce45458c
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d7957df3184846e6bbaec985640dacafce45458c
Author: Michel Zou <xantares09 at hotmail.com>
Date: Sat Nov 20 13:52:42 2021 +0100
vulkan: fix uninitialized variables
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13892>
---
src/vulkan/util/vk_util.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/vulkan/util/vk_util.h b/src/vulkan/util/vk_util.h
index cbe68a604cf..386e9e469f0 100644
--- a/src/vulkan/util/vk_util.h
+++ b/src/vulkan/util/vk_util.h
@@ -282,7 +282,7 @@ vk_spec_info_to_nir_spirv(const VkSpecializationInfo *spec_info,
#define STACK_ARRAY_SIZE 8
#define STACK_ARRAY(type, name, size) \
- type _stack_##name[STACK_ARRAY_SIZE], *const name = \
+ type _stack_##name[STACK_ARRAY_SIZE] = {0}, *const name = \
(size) <= STACK_ARRAY_SIZE ? _stack_##name : malloc((size) * sizeof(type))
#define STACK_ARRAY_FINISH(name) \
More information about the mesa-commit
mailing list