Mesa (master): gen_matypes: eliminate printf warnings

Dylan Noblesmith nobled at kemper.freedesktop.org
Sun Dec 18 17:13:10 UTC 2011


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

Author: nobled <nobled at dreamwidth.org>
Date:   Thu Dec  8 20:53:25 2011 +0000

gen_matypes: eliminate printf warnings

The VERT_BIT_* defines are 64-bit values now, but the printf
was still expecting a simple int.

---

 src/mesa/x86/gen_matypes.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/src/mesa/x86/gen_matypes.c b/src/mesa/x86/gen_matypes.c
index ebd6ce6..97f71f9 100644
--- a/src/mesa/x86/gen_matypes.c
+++ b/src/mesa/x86/gen_matypes.c
@@ -32,6 +32,11 @@
  * Mesa, including lighting, clipping, texture image conversion etc.
  */
 
+#ifndef __STDC_FORMAT_MACROS
+#define __STDC_FORMAT_MACROS
+#endif
+#include <inttypes.h>
+
 #include "main/glheader.h"
 #include "main/mtypes.h"
 #include "tnl/t_context.h"
@@ -68,7 +73,7 @@ do {									\
    printf( "#define %s\t%lu\n", s, (unsigned long) sizeof(t) );
 
 #define DEFINE( s, d )							\
-   printf( "#define %s\t0x%llx\n", s, (uint64_t)d );
+   printf( "#define %s\t0x%" PRIx64 "\n", s, (uint64_t) d );
 
 
 




More information about the mesa-commit mailing list