glsl: Fix 'control reaches end of non-void function' warning.
authorVinson Lee <vlee@vmware.com>
Thu, 18 Nov 2010 06:42:51 +0000 (22:42 -0800)
committerVinson Lee <vlee@vmware.com>
Thu, 18 Nov 2010 06:43:52 +0000 (22:43 -0800)
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

src/glsl/ir.cpp

index 4468d9f832411adac293c8d39acc29ffb64e2b85..8c5441d332bf0d2ea85c9760718afd9d2a3c1171 100644 (file)
@@ -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[] = {