Mesa (master): r300g: fix warnings when printing uint64_t

Marek Olšák mareko at kemper.freedesktop.org
Mon Apr 26 18:32:49 UTC 2010


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

Author: Marek Olšák <maraeo at gmail.com>
Date:   Mon Apr 26 20:16:59 2010 +0200

r300g: fix warnings when printing uint64_t

Though not nice, this is the correct way.

---

 src/gallium/drivers/r300/r300_context.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/r300/r300_context.c b/src/gallium/drivers/r300/r300_context.c
index 43a4249..4f721eb 100644
--- a/src/gallium/drivers/r300/r300_context.c
+++ b/src/gallium/drivers/r300/r300_context.c
@@ -37,6 +37,8 @@
 #include "r300_state_invariant.h"
 #include "r300_winsys.h"
 
+#include <inttypes.h>
+
 static void r300_destroy_context(struct pipe_context* context)
 {
     struct r300_context* r300 = r300_context(context);
@@ -49,9 +51,9 @@ static void r300_destroy_context(struct pipe_context* context)
     /* Print stats, if enabled. */
     if (SCREEN_DBG_ON(r300->screen, DBG_STATS)) {
         fprintf(stderr, "r300: Stats for context %p:\n", r300);
-        fprintf(stderr, "    : Flushes: %llu\n", r300->flush_counter);
+        fprintf(stderr, "    : Flushes: %" PRIu64 "\n", r300->flush_counter);
         foreach(atom, &r300->atom_list) {
-            fprintf(stderr, "    : %s: %llu emits\n",
+            fprintf(stderr, "    : %s: %" PRIu64 " emits\n",
                 atom->name, atom->counter);
         }
     }




More information about the mesa-commit mailing list