From f97f93865012c5b271a5d3f81d4ea6f58d07c047 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tapani=20P=C3=A4lli?= Date: Tue, 10 Jan 2017 10:14:03 +0200 Subject: [PATCH] nir: change asserts to unreachable in nir_type_conversion_op MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit this is to avoid following compilation error on Android: error: control may reach end of non-void function [-Werror,-Wreturn-type] Signed-off-by: Tapani Pälli Reviewed-by: Samuel Iglesias Gonsálvez --- src/compiler/nir/nir.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/compiler/nir/nir.c b/src/compiler/nir/nir.c index a2af3909464..f501e235c5c 100644 --- a/src/compiler/nir/nir.c +++ b/src/compiler/nir/nir.c @@ -1998,7 +1998,7 @@ nir_type_conversion_op(nir_alu_type src, nir_alu_type dst) return nir_op_f2i; }; default: - assert(!"Invalid conversion"); + unreachable("Invalid conversion"); }; } @@ -2031,9 +2031,9 @@ nir_type_conversion_op(nir_alu_type src, nir_alu_type dst) case nir_type_float: return nir_op_d2f; default: - assert(!"Invalid conversion"); + unreachable("Invalid conversion"); }; default: - assert(!"Invalid conversion"); + unreachable("Invalid conversion"); }; } -- 2.30.2