[Piglit] [PATCH] shader_runner: Fix printf format warnings.
Brian Paul
brianp at vmware.com
Wed Nov 30 06:13:23 PST 2011
On 11/29/2011 06:03 PM, Vinson Lee wrote:
> Fixes these GCC warnings.
> shader_runner.c: In function ‘piglit_display’:
> shader_runner.c:995: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 2 has type ‘size_t’
> shader_runner.c:1003: 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/shaders/shader_runner.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c
> index 216728a..5a24e50 100644
> --- a/tests/shaders/shader_runner.c
> +++ b/tests/shaders/shader_runner.c
> @@ -992,7 +992,7 @@ piglit_display(void)
> piglit_report_result(PIGLIT_FAIL);
> } else if ((size_t) first>= num_vbo_rows) {
> printf("draw arrays 'first' must be< %lu\n",
> - num_vbo_rows);
> + (unsigned long) num_vbo_rows);
> piglit_report_result(PIGLIT_FAIL);
> }
> if (count<= 0) {
> @@ -1000,7 +1000,7 @@ piglit_display(void)
> piglit_report_result(PIGLIT_FAIL);
> } else if (count> num_vbo_rows - (size_t) first) {
> printf("draw arrays cannot draw beyond %lu\n",
> - num_vbo_rows);
> + (unsigned long) num_vbo_rows);
> piglit_report_result(PIGLIT_FAIL);
> }
> /* TODO: wrapper? */
Reviewed-by: Brian Paul <brianp at vmware.com>
More information about the Piglit
mailing list