mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
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:
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
@ -3127,8 +3127,8 @@ static void declare_predefined_types(struct hlsl_ctx *ctx)
|
|||||||
|
|
||||||
for (bt = 0; bt <= HLSL_TYPE_LAST_SCALAR; ++bt)
|
for (bt = 0; bt <= HLSL_TYPE_LAST_SCALAR; ++bt)
|
||||||
{
|
{
|
||||||
unsigned int n_variants = 0;
|
|
||||||
const char *const *variants;
|
const char *const *variants;
|
||||||
|
unsigned int n_variants;
|
||||||
|
|
||||||
switch (bt)
|
switch (bt)
|
||||||
{
|
{
|
||||||
@ -3148,6 +3148,8 @@ static void declare_predefined_types(struct hlsl_ctx *ctx)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
n_variants = 0;
|
||||||
|
variants = NULL;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user