nir: Remove dead nir_const_value variables

nir_const_value variables in nir_const_value_for_int and
nor_const_value_for_uint are unused resulting in unnecessary dead code.
The unused-variable warning has been suppressed by the memset following
their declarations.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24851>
This commit is contained in:
Piotr Kocia
2023-08-23 17:05:48 +02:00
committed by Marge Bot
parent 74bf80323e
commit 27eafbcd4e

View File

@@ -313,9 +313,6 @@ nir_const_value_for_raw_uint(uint64_t x, unsigned bit_size)
static inline nir_const_value
nir_const_value_for_int(int64_t i, unsigned bit_size)
{
nir_const_value v;
memset(&v, 0, sizeof(v));
assert(bit_size <= 64);
if (bit_size < 64) {
assert(i >= (-(1ll << (bit_size - 1))));
@@ -328,9 +325,6 @@ nir_const_value_for_int(int64_t i, unsigned bit_size)
static inline nir_const_value
nir_const_value_for_uint(uint64_t u, unsigned bit_size)
{
nir_const_value v;
memset(&v, 0, sizeof(v));
assert(bit_size <= 64);
if (bit_size < 64)
assert(u < (1ull << bit_size));