Re: [Mesa-dev] [PATCH mesa] vma/tests: cast away implementation detail of using strtoul()

2018-06-06 Thread Dylan Baker
Yeah, Scott and I thought that went to the list before I did an offer the 
shoulder review, then realized it didn't after pushing.

On June 6, 2018 10:31:38 AM PDT, Eric Anholt  wrote:
>Eric Engestrom  writes:
>
>> On MacOS, the build fails because of a compiler complaint about
>> a downcast:
>>
>>   vma_random_test.cpp:239:18: error: non-constant-expression cannot
>be narrowed from type 'unsigned long' to 'uint_fast32_t' (aka 'unsigned
>int') in initializer list [-Wc++11-narrowing]
>>  random_test r{seed};
>>^~~~
>>   vma_random_test.cpp:239:18: note: insert an explicit cast to
>silence this issue
>>  random_test r{seed};
>>^~~~
>>static_cast( )
>>
>> Let's take the compiler's suggestion, as we only needed a long here
>to
>> use strtoul().
>>
>> Cc: Scott D Phillips 
>> Signed-off-by: Eric Engestrom 
>
>This commit seems to have resolved the issue:
>
>commit 08535dd8860951ce4572cd2590e417a1f3d96b3d
>Author: Scott D Phillips 
>Date:   Tue Jun 5 09:29:43 2018 -0700
>
>util/tests/vma: Fix warning c++11-narrowing
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH mesa] vma/tests: cast away implementation detail of using strtoul()

2018-06-06 Thread Eric Anholt
Eric Engestrom  writes:

> On MacOS, the build fails because of a compiler complaint about
> a downcast:
>
>   vma_random_test.cpp:239:18: error: non-constant-expression cannot be 
> narrowed from type 'unsigned long' to 'uint_fast32_t' (aka 'unsigned int') in 
> initializer list [-Wc++11-narrowing]
>  random_test r{seed};
>^~~~
>   vma_random_test.cpp:239:18: note: insert an explicit cast to silence this 
> issue
>  random_test r{seed};
>^~~~
>static_cast( )
>
> Let's take the compiler's suggestion, as we only needed a long here to
> use strtoul().
>
> Cc: Scott D Phillips 
> Signed-off-by: Eric Engestrom 

This commit seems to have resolved the issue:

commit 08535dd8860951ce4572cd2590e417a1f3d96b3d
Author: Scott D Phillips 
Date:   Tue Jun 5 09:29:43 2018 -0700

util/tests/vma: Fix warning c++11-narrowing


signature.asc
Description: PGP signature
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev