[Mesa-dev] [PATCH] mesa: use PRId64/PRIu64 when printing 64-bit ints

Nicolai Hähnle nhaehnle at gmail.com
Wed Feb 8 09:27:37 UTC 2017


On 08.02.2017 01:59, Timothy Arceri wrote:
> ---
>  src/mesa/main/uniform_query.cpp | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/mesa/main/uniform_query.cpp b/src/mesa/main/uniform_query.cpp
> index 418cfc9..575f1cb 100644
> --- a/src/mesa/main/uniform_query.cpp
> +++ b/src/mesa/main/uniform_query.cpp
> @@ -563,10 +563,10 @@ log_uniform(const void *values, enum glsl_base_type basicType,
>  	 printf("%d ", v[i].i);
>  	 break;
>        case GLSL_TYPE_UINT64:
> -         printf("%lu ", *(uint64_t* )&v[i * 2].u);
> +         printf("%" PRId64 " ", *(uint64_t* )&v[i * 2].u);

There's a PRIu64 as well, isn't there? With that fixed:

Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>

>           break;
>        case GLSL_TYPE_INT64:
> -         printf("%ld ", *(int64_t* )&v[i * 2].u);
> +         printf("%" PRId64 " ", *(int64_t* )&v[i * 2].u);
>           break;
>        case GLSL_TYPE_FLOAT:
>  	 printf("%g ", v[i].f);
>



More information about the mesa-dev mailing list