[Mesa-dev] [PATCH] i965/vs: include format argument in debug printf

Tapani Pälli tapani.palli at intel.com
Thu Oct 18 23:45:20 PDT 2012


otherwise some compilers will throw error
"error: format not a string literal and no format arguments"

Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
---
 src/mesa/drivers/dri/i965/brw_vec4.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp
index 9eed599..5c52d3a 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp
@@ -891,7 +891,7 @@ vec4_visitor::dump_instruction(vec4_instruction *inst)
       static const char *chans[4] = {"x", "y", "z", "w"};
       printf(".");
       for (int c = 0; c < 4; c++) {
-         printf(chans[BRW_GET_SWZ(inst->src[i].swizzle, c)]);
+         printf("%s", chans[BRW_GET_SWZ(inst->src[i].swizzle, c)]);
       }
 
       if (i < 3)
-- 
1.7.11.7



More information about the mesa-dev mailing list