Mesa (glsl2): glsl2: added casts to silence warnings
Brian Paul
brianp at kemper.freedesktop.org
Wed Aug 11 21:06:41 UTC 2010
Module: Mesa
Branch: glsl2
Commit: d3b66be3c7a3e9e29913ea86880c516e2b7a3ce0
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d3b66be3c7a3e9e29913ea86880c516e2b7a3ce0
Author: Brian Paul <brianp at vmware.com>
Date: Wed Aug 11 14:00:36 2010 -0600
glsl2: added casts to silence warnings
---
src/glsl/ir_print_visitor.cpp | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/glsl/ir_print_visitor.cpp b/src/glsl/ir_print_visitor.cpp
index 39b11bb..83e6403 100644
--- a/src/glsl/ir_print_visitor.cpp
+++ b/src/glsl/ir_print_visitor.cpp
@@ -45,7 +45,7 @@ _mesa_print_ir(exec_list *instructions,
const glsl_type *const s = state->user_structures[i];
printf("(structure (%s) (%s@%p) (%u) (\n",
- s->name, s->name, s, s->length);
+ s->name, s->name, (void *) s, s->length);
for (unsigned j = 0; j < s->length; j++) {
printf("\t((");
@@ -83,7 +83,7 @@ print_type(const glsl_type *t)
printf(" %u)", t->length);
} else if ((t->base_type == GLSL_TYPE_STRUCT)
&& (strncmp("gl_", t->name, 3) != 0)) {
- printf("%s@%p", t->name, t);
+ printf("%s@%p", t->name, (void *) t);
} else {
printf("%s", t->name);
}
@@ -104,7 +104,7 @@ void ir_print_visitor::visit(ir_variable *ir)
cent, inv, mode[ir->mode], interp[ir->interpolation]);
print_type(ir->type);
- printf(" %s@%p)", ir->name, ir);
+ printf(" %s@%p)", ir->name, (void *) ir);
}
@@ -266,7 +266,7 @@ void ir_print_visitor::visit(ir_swizzle *ir)
void ir_print_visitor::visit(ir_dereference_variable *ir)
{
ir_variable *var = ir->variable_referenced();
- printf("(var_ref %s@%p) ", var->name, var);
+ printf("(var_ref %s@%p) ", var->name, (void *) var);
}
More information about the mesa-commit
mailing list