st/nine: Fix incompatible-pointer-types-discards-qualifiers errors.

../src/gallium/state_trackers/nine/nine_ff.c:129:28: error: initializing 'struct nine_ff_vs_key *' with an expression of type 'const void *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
    struct nine_ff_vs_key *vs = key;
                           ^    ~~~
../src/gallium/state_trackers/nine/nine_ff.c:145:28: error: initializing 'struct nine_ff_ps_key *' with an expression of type 'const void *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
    struct nine_ff_ps_key *ps = key;
                           ^    ~~~

Fixes: fdd96578ef ("nine: Add state tracker nine for Direct3D9 (v3)")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Andre Heider <a.heider@gmail.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4015>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4015>
(cherry picked from commit 5ffa6eab88)
This commit is contained in:
Vinson Lee 2020-03-01 21:38:18 -08:00 committed by Eric Engestrom
parent c53788cd41
commit 5de89fe2ff
2 changed files with 3 additions and 3 deletions

View file

@ -193,7 +193,7 @@
"description": "st/nine: Fix incompatible-pointer-types-discards-qualifiers errors.",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"master_sha": null,
"because_sha": "fdd96578ef2dfe9c4ad5aab5858036298d444a64"
},

View file

@ -126,7 +126,7 @@ struct nine_ff_ps_key
static unsigned nine_ff_vs_key_hash(void *key)
{
struct nine_ff_vs_key *vs = key;
const struct nine_ff_vs_key *vs = key;
unsigned i;
uint32_t hash = vs->value32[0];
for (i = 1; i < ARRAY_SIZE(vs->value32); ++i)
@ -142,7 +142,7 @@ static int nine_ff_vs_key_comp(void *key1, void *key2)
}
static unsigned nine_ff_ps_key_hash(void *key)
{
struct nine_ff_ps_key *ps = key;
const struct nine_ff_ps_key *ps = key;
unsigned i;
uint32_t hash = ps->value32[0];
for (i = 1; i < ARRAY_SIZE(ps->value32); ++i)