aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorCaio Marcelo de Oliveira Filho <[email protected]>2019-08-23 07:57:13 -0700
committerCaio Marcelo de Oliveira Filho <[email protected]>2019-08-23 13:25:27 -0700
commit0661480029f1f9be9c542893285d9fe68f0f0115 (patch)
treec8361e3fcfc87daa0662e639c2e8fc60fbf57ce1 /src
parenteac8a3b9af15d8264e104fe31471e3d1f13c6930 (diff)
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 <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/compiler/glsl/ir_validate.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/compiler/glsl/ir_validate.cpp b/src/compiler/glsl/ir_validate.cpp
index 9be4e721f1a..dea98f2fa77 100644
--- a/src/compiler/glsl/ir_validate.cpp
+++ b/src/compiler/glsl/ir_validate.cpp
@@ -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)