mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
etnaviv: annotate variables only used in debug build
Some of the status variables in the compiler are only used in asserts and thus may be unused in release builds. Annotate them accordingly to avoid 'unused but set' warnings from the compiler. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
This commit is contained in:
parent
b56d903b5a
commit
d015888efb
1 changed files with 4 additions and 7 deletions
|
|
@ -477,8 +477,7 @@ static void
|
|||
etna_compile_parse_declarations(struct etna_compile *c)
|
||||
{
|
||||
struct tgsi_parse_context ctx = { };
|
||||
unsigned status = TGSI_PARSE_OK;
|
||||
status = tgsi_parse_init(&ctx, c->tokens);
|
||||
MAYBE_UNUSED unsigned status = tgsi_parse_init(&ctx, c->tokens);
|
||||
assert(status == TGSI_PARSE_OK);
|
||||
|
||||
while (!tgsi_parse_end_of_tokens(&ctx)) {
|
||||
|
|
@ -530,8 +529,7 @@ static void
|
|||
etna_compile_pass_check_usage(struct etna_compile *c)
|
||||
{
|
||||
struct tgsi_parse_context ctx = { };
|
||||
unsigned status = TGSI_PARSE_OK;
|
||||
status = tgsi_parse_init(&ctx, c->tokens);
|
||||
MAYBE_UNUSED unsigned status = tgsi_parse_init(&ctx, c->tokens);
|
||||
assert(status == TGSI_PARSE_OK);
|
||||
|
||||
for (int idx = 0; idx < c->total_decls; ++idx) {
|
||||
|
|
@ -662,8 +660,7 @@ etna_compile_pass_optimize_outputs(struct etna_compile *c)
|
|||
{
|
||||
struct tgsi_parse_context ctx = { };
|
||||
int inst_idx = 0;
|
||||
unsigned status = TGSI_PARSE_OK;
|
||||
status = tgsi_parse_init(&ctx, c->tokens);
|
||||
MAYBE_UNUSED unsigned status = tgsi_parse_init(&ctx, c->tokens);
|
||||
assert(status == TGSI_PARSE_OK);
|
||||
|
||||
while (!tgsi_parse_end_of_tokens(&ctx)) {
|
||||
|
|
@ -1812,7 +1809,7 @@ static void
|
|||
etna_compile_pass_generate_code(struct etna_compile *c)
|
||||
{
|
||||
struct tgsi_parse_context ctx = { };
|
||||
unsigned status = tgsi_parse_init(&ctx, c->tokens);
|
||||
MAYBE_UNUSED unsigned status = tgsi_parse_init(&ctx, c->tokens);
|
||||
assert(status == TGSI_PARSE_OK);
|
||||
|
||||
int inst_idx = 0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue