glsl: Fix 'format not a string literal and no format arguments' warning.
authorVinson Lee <vlee@vmware.com>
Wed, 15 Sep 2010 12:17:57 +0000 (05:17 -0700)
committerVinson Lee <vlee@vmware.com>
Wed, 15 Sep 2010 12:17:57 +0000 (05:17 -0700)
Fix the following GCC warning.
loop_controls.cpp: In function 'int calculate_iterations(ir_rvalue*, ir_rvalue*, ir_rvalue*, ir_expression_operation)':
loop_controls.cpp:88: warning: format not a string literal and no format arguments

src/glsl/loop_controls.cpp

index 9619d8ae55540fb2e8e5e081e7915972335e4676..2ef3d305254d0985d5ccb51c5a6b2f41e74b5268 100644 (file)
@@ -85,7 +85,7 @@ int
 calculate_iterations(ir_rvalue *from, ir_rvalue *to, ir_rvalue *increment,
                     enum ir_expression_operation op)
 {
-   void *mem_ctx = talloc_init(__func__);
+   void *mem_ctx = talloc_init("%s", __func__);
 
    ir_expression *const sub =
       new(mem_ctx) ir_expression(ir_binop_sub, from->type, to, from);