[Piglit] [PATCH] crossbar: Fix printf format warning.

Brian Paul brianp at vmware.com
Mon Jan 16 06:53:14 PST 2012


On 01/15/2012 12:22 AM, Vinson Lee wrote:
> Fix this GCC warning.
> crossbar.c:246:7: warning: format ‘%u’ expects argument of type
> ‘unsigned int’, but argument 2 has type ‘long unsigned int’ [-Wformat]
>
> Signed-off-by: Vinson Lee<vlee at freedesktop.org>
> ---
>   tests/texturing/crossbar.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/tests/texturing/crossbar.c b/tests/texturing/crossbar.c
> index bc23ed0..e404bff 100644
> --- a/tests/texturing/crossbar.c
> +++ b/tests/texturing/crossbar.c
> @@ -243,7 +243,7 @@ static void Init( void )
>      }
>
>      if (Interactive)
> -      printf("\nAll %u squares should be the same color.\n", NUM_TESTS + 1);
> +      printf("\nAll %lu squares should be the same color.\n", (unsigned long) NUM_TESTS + 1);
>
>      (void) memset( temp, 0x00, sizeof( temp ) );
>      glBindTexture( GL_TEXTURE_2D, 1 );

Looks OK to me.

Reviewed-by: Brian Paul <brianp at vmware.com>


More information about the Piglit mailing list