[Mesa-dev] [PATCH] i965: fix build warning on clang
Tapani Pälli
tapani.palli at intel.com
Fri Sep 15 06:04:18 UTC 2017
On 09/14/2017 09:31 PM, Jordan Justen wrote:
> On 2017-09-14 00:26:39, Tapani Pälli wrote:
>> fixes following warning:
>> warning: format specifies type 'long' but the argument has type 'uint64_t' (aka 'unsigned long long')
>>
>> cast is needed to avoid this turning in to another warning on 32bit build:
>> warning: format specifies type 'unsigned long long' but the argument has type 'uint64_t' (aka 'unsigned long')
>
> size is uint64_t, so the (unsigned long long) cast shouldn't be needed
> for 32-bit, right?
Ah right, got confused with the warnings .. cast was required so that
64bit build would not warn.
> Otherwise: Reviewed-by: Jordan Justen <jordan.l.justen at intel.com>
>
>>
>> Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
>> ---
>> src/mesa/drivers/dri/i965/brw_bufmgr.c | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/src/mesa/drivers/dri/i965/brw_bufmgr.c b/src/mesa/drivers/dri/i965/brw_bufmgr.c
>> index b9d6a39f1f..cc1a2d1f49 100644
>> --- a/src/mesa/drivers/dri/i965/brw_bufmgr.c
>> +++ b/src/mesa/drivers/dri/i965/brw_bufmgr.c
>> @@ -396,7 +396,8 @@ retry:
>>
>> pthread_mutex_unlock(&bufmgr->lock);
>>
>> - DBG("bo_create: buf %d (%s) %ldb\n", bo->gem_handle, bo->name, size);
>> + DBG("bo_create: buf %d (%s) %llub\n", bo->gem_handle, bo->name,
>> + (unsigned long long) size);
>>
>> return bo;
>>
>> --
>> 2.13.5
>>
>> _______________________________________________
>> mesa-dev mailing list
>> mesa-dev at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list