Mesa (master): glsl: Fix ' format not a string literal and no format arguments' warning.

Vinson Lee vlee at kemper.freedesktop.org
Wed Sep 15 12:19:23 UTC 2010


Module: Mesa
Branch: master
Commit: f20f2cc3306310f6fc4c338f91cfac10f98335d3
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f20f2cc3306310f6fc4c338f91cfac10f98335d3

Author: Vinson Lee <vlee at vmware.com>
Date:   Wed Sep 15 05:17:57 2010 -0700

glsl: Fix 'format not a string literal and no format arguments' warning.

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 |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/glsl/loop_controls.cpp b/src/glsl/loop_controls.cpp
index 9619d8a..2ef3d30 100644
--- a/src/glsl/loop_controls.cpp
+++ b/src/glsl/loop_controls.cpp
@@ -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);




More information about the mesa-commit mailing list