[Piglit] [PATCH] util: Fix printf format warning in piglit-vbo.cpp.
Brian Paul
brianp at vmware.com
Tue Nov 29 16:09:58 PST 2011
On 11/29/2011 12:52 PM, Vinson Lee wrote:
> 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);
> }
> }
This and the other patch:
Reviewed-by: Brian Paul <brianp at vmware.com>
More information about the Piglit
mailing list