| Summary: |
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] |
| Product: |
Mesa
|
Reporter: |
Vinson Lee <vlee> |
| Component: |
Other | Assignee: |
mesa-dev |
| Status: |
RESOLVED
FIXED
|
QA Contact: |
mesa-dev |
| Severity: |
normal
|
|
|
| Priority: |
medium
|
CC: |
bugzilla, jason
|
| Version: |
git | Keywords: |
bisected, regression |
| Hardware: |
x86-64 (AMD64) | |
|
| OS: |
Mac OS X (All) | |
|
| Whiteboard: |
|
|
i915 platform:
|
|
i915 features:
|
|
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.
CXX vma_random_test-vma_random_test.o 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<uint_fast32_t>( ) commit 943fecc5691b55b8ce8740d133dd70614effb72d Author: Scott D Phillips <scott.d.phillips@intel.com> Date: Fri May 4 17:11:13 2018 -0700 util: Add a randomized test for the virtual memory allocator The test pseudo-randomly makes allocations and deallocations with the virtual memory allocator and checks that the results are consistent. Specifically, we test that: * no result from the allocator overlaps an already allocated range * allocated memory fulfills the stated alignment requirement * a failed result from the allocator could not have been fulfilled * memory freed to the allocator can later be allocated again v2: - fix if() in test() to actually run fill() v3: - add c++11 build flag (Jason) - test the full 64-bit range (Jason) Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>