Mesa (7.9): glsl: Fix erroneous cast in ast_jump_statement::hir()

Ian Romanick idr at kemper.freedesktop.org
Wed Dec 15 23:15:08 UTC 2010


Module: Mesa
Branch: 7.9
Commit: 69cc62b907c852647f94ba2f702a6908191a013c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=69cc62b907c852647f94ba2f702a6908191a013c

Author: Chad Versace <chad.versace at intel.com>
Date:   Wed Nov 17 10:28:01 2010 -0800

glsl: Fix erroneous cast in ast_jump_statement::hir()

Return values were erroneously cast from (ir_rvalue*) to (ir_expression*).

NOTE: This is a candidate for the 7.9 branch.
(cherry picked from commit b4cdba687c098eea2ecc61349a4ea02a8769909e)

---

 src/glsl/ast_to_hir.cpp |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
index 6029b6d..58d9696 100644
--- a/src/glsl/ast_to_hir.cpp
+++ b/src/glsl/ast_to_hir.cpp
@@ -2447,8 +2447,7 @@ ast_jump_statement::hir(exec_list *instructions,
 			     state->current_function->function_name());
 	 }
 
-	 ir_expression *const ret = (ir_expression *)
-	    opt_return_value->hir(instructions, state);
+	 ir_rvalue *const ret = opt_return_value->hir(instructions, state);
 	 assert(ret != NULL);
 
 	 /* Implicit conversions are not allowed for return values. */




More information about the mesa-commit mailing list