[Piglit] [PATCH] util: Fix printf format warning in piglit-vbo.cpp.

Vinson Lee vlee at vmware.com
Tue Nov 29 11:52:17 PST 2011


Fixes this GCC warning.
piglit-vbo.cpp: In constructor ‘vertex_attrib_description::vertex_attrib_description(GLuint, const char*)’:
piglit-vbo.cpp:221: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 2 has type ‘size_t’

Signed-off-by: Vinson Lee <vlee at vmware.com>
---
 tests/util/piglit-vbo.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tests/util/piglit-vbo.cpp b/tests/util/piglit-vbo.cpp
index 525e859..eb23e34 100644
--- a/tests/util/piglit-vbo.cpp
+++ b/tests/util/piglit-vbo.cpp
@@ -218,7 +218,7 @@ vertex_attrib_description::vertex_attrib_description(GLuint prog,
 	}
 
 	if (this->count < 1 || this->count > 4) {
-		printf("Count must be between 1 and 4.  Got: %lu\n", count);
+		printf("Count must be between 1 and 4.  Got: %lu\n", (unsigned long) count);
 		piglit_report_result(PIGLIT_FAIL);
 	}
 }
-- 
1.7.1



More information about the Piglit mailing list