mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 18:18:06 +02:00
compiler/glsl: Fix warning about unused function
The helper check_node_type() is only used when DEBUG is set (in the function below), but ASSERTED macro uses NDEBUG. So just guard the helper with #ifdef. If we see more such cases we might consider a ASSERTED-like macro for the DEBUG case. Reviewed-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
parent
eac8a3b9af
commit
0661480029
1 changed files with 3 additions and 1 deletions
|
|
@ -1052,7 +1052,8 @@ ir_validate::validate_ir(ir_instruction *ir, void *data)
|
|||
_mesa_set_add(ir_set, ir);
|
||||
}
|
||||
|
||||
ASSERTED static void
|
||||
#ifdef DEBUG
|
||||
static void
|
||||
check_node_type(ir_instruction *ir, void *data)
|
||||
{
|
||||
(void) data;
|
||||
|
|
@ -1065,6 +1066,7 @@ check_node_type(ir_instruction *ir, void *data)
|
|||
if (value != NULL)
|
||||
assert(value->type != glsl_type::error_type);
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
validate_ir_tree(exec_list *instructions)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue