Mesa (master): mesa: casts to silence new warnings from printf()

Brian Paul brianp at kemper.freedesktop.org
Fri Feb 19 19:45:56 UTC 2010


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

Author: Brian Paul <brianp at vmware.com>
Date:   Fri Feb 19 12:45:49 2010 -0700

mesa: casts to silence new warnings from printf()

---

 src/mesa/main/debug.c        |    4 ++--
 src/mesa/shader/prog_print.c |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/mesa/main/debug.c b/src/mesa/main/debug.c
index 246dbd4..33b35e0 100644
--- a/src/mesa/main/debug.c
+++ b/src/mesa/main/debug.c
@@ -490,9 +490,9 @@ _mesa_dump_color_buffer(const char *filename)
    _mesa_ReadPixels(0, 0, w, h, GL_RGBA, GL_UNSIGNED_BYTE, buf);
 
    printf("ReadBuffer %p 0x%x  DrawBuffer %p 0x%x\n",
-	  ctx->ReadBuffer->_ColorReadBuffer,
+	  (void *) ctx->ReadBuffer->_ColorReadBuffer,
 	  ctx->ReadBuffer->ColorReadBuffer,
-	  ctx->DrawBuffer->_ColorDrawBuffers[0],
+	  (void *) ctx->DrawBuffer->_ColorDrawBuffers[0],
 	  ctx->DrawBuffer->ColorDrawBuffer[0]);
    printf("Writing %d x %d color buffer to %s\n", w, h, filename);
    write_ppm(filename, buf, w, h, 4, 0, 1, 2, GL_TRUE);
diff --git a/src/mesa/shader/prog_print.c b/src/mesa/shader/prog_print.c
index a933f21..b4905ab 100644
--- a/src/mesa/shader/prog_print.c
+++ b/src/mesa/shader/prog_print.c
@@ -603,7 +603,7 @@ _mesa_fprint_instruction_opt(FILE *f,
 
    switch (inst->Opcode) {
    case OPCODE_PRINT:
-      fprintf(f, "PRINT '%s'", inst->Data);
+      fprintf(f, "PRINT '%s'", (char *) inst->Data);
       if (inst->SrcReg[0].File != PROGRAM_UNDEFINED) {
          fprintf(f, ", ");
          fprintf(f, "%s[%d]%s",




More information about the mesa-commit mailing list