vkd3d-shader/hlsl: Make sure variants is initialized in declare_predefined_types().

MSVC is too stupid to see it is unused when n_variants=0.
This commit is contained in:
Stefan Dösinger 2023-05-25 12:44:26 +02:00 committed by Alexandre Julliard
parent 771e442af1
commit 5e88ab22aa
Notes: Alexandre Julliard 2023-06-27 23:33:08 +02:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Zebediah Figura (@zfigura)
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/171

View File

@ -3127,8 +3127,8 @@ static void declare_predefined_types(struct hlsl_ctx *ctx)
for (bt = 0; bt <= HLSL_TYPE_LAST_SCALAR; ++bt)
{
unsigned int n_variants = 0;
const char *const *variants;
unsigned int n_variants;
switch (bt)
{
@ -3148,6 +3148,8 @@ static void declare_predefined_types(struct hlsl_ctx *ctx)
break;
default:
n_variants = 0;
variants = NULL;
break;
}