ir3: mark __alias_n as UNUSED in foreach_src_in_alias_group_n
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

Recent versions of GCC started throwing a warning here when this macro
is used from foreach_src_in_alias_group.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41353>
This commit is contained in:
Job Noorman 2026-05-05 06:32:13 +02:00 committed by Marge Bot
parent 956f4c96e1
commit 49c658972f

View file

@ -13,6 +13,7 @@
#include "util/bitscan.h"
#include "util/list.h"
#include "util/macros.h"
#include "util/set.h"
#include "util/u_debug.h"
@ -1928,7 +1929,7 @@ ir3_src_is_first_in_group(struct ir3_register *src)
#define foreach_src_in_alias_group_n(__alias, __alias_n, __instr, __start) \
for (struct ir3_register *__alias = __instr->srcs[__start]; \
__alias && (__alias->flags & IR3_REG_FIRST_ALIAS); __alias = NULL) \
for (unsigned __i = __start, __alias_n = 0; \
for (unsigned __i = __start, UNUSED __alias_n = 0; \
__i < __instr->srcs_count && \
(__i == __start || !ir3_src_is_first_in_group(__instr->srcs[__i])); \
__i++, __alias_n++) \