Mesa (7.9): glsl: Fix 'control reaches end of non-void function' warning.
Ian Romanick
idr at kemper.freedesktop.org
Fri Dec 17 02:21:27 UTC 2010
Module: Mesa
Branch: 7.9
Commit: 54a596e34a3349bae5b4b97c40533abb6c30d6cd
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=54a596e34a3349bae5b4b97c40533abb6c30d6cd
Author: Vinson Lee <vlee at vmware.com>
Date: Wed Nov 17 22:42:51 2010 -0800
glsl: Fix 'control reaches end of non-void function' warning.
Fix this GCC warning.
ir.cpp: In static member function
'static unsigned int ir_expression::get_num_operands(ir_expression_operation)':
ir.cpp:199: warning: control reaches end of non-void function
(cherry picked from commit 855c66bde7e51c3486e4c6abc7096a1a949a98e1)
---
src/glsl/ir.cpp | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/glsl/ir.cpp b/src/glsl/ir.cpp
index 0199472..4aa212e 100644
--- a/src/glsl/ir.cpp
+++ b/src/glsl/ir.cpp
@@ -196,6 +196,9 @@ ir_expression::get_num_operands(ir_expression_operation op)
if (op <= ir_last_binop)
return 2;
+
+ assert(false);
+ return 0;
}
static const char *const operator_strs[] = {
More information about the mesa-commit
mailing list