mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
Fix Build Warnings for AArch64 (#2242)
This commit links to issue (#2234). When cross-compiling for AArch64, using gcc 13.3, you encounter three warnings types that turn into errors: - maybe-uninitialized - stringop-truncation - strict-aliasing This commit fixes all the warnings found, in regards to the first two rules. To resolve the warnigns due to strict-aliasing, I am editing the CMake build system. Signed-off-by: Antonios Christidis <a-christidis@ti.com>
This commit is contained in:
committed by
GitHub
parent
bcfa1f7c26
commit
2031e21a58
@@ -25,7 +25,7 @@ int test_copy_image_size_1D( cl_context context, cl_command_queue queue, image_d
|
||||
size_t src_lod = 0, src_width_lod = imageInfo->width, src_row_pitch_lod;
|
||||
size_t dst_lod = 0, dst_width_lod = imageInfo->width, dst_row_pitch_lod;
|
||||
size_t width_lod = imageInfo->width;
|
||||
size_t max_mip_level;
|
||||
size_t max_mip_level = 0;
|
||||
|
||||
if( gTestMipmaps )
|
||||
{
|
||||
|
||||
@@ -25,7 +25,7 @@ int test_copy_image_size_1D_array( cl_context context, cl_command_queue queue, i
|
||||
size_t src_lod = 0, src_width_lod = imageInfo->width, src_row_pitch_lod;
|
||||
size_t dst_lod = 0, dst_width_lod = imageInfo->width, dst_row_pitch_lod;
|
||||
size_t width_lod = imageInfo->width;
|
||||
size_t max_mip_level;
|
||||
size_t max_mip_level = 0;
|
||||
|
||||
if( gTestMipmaps )
|
||||
{
|
||||
|
||||
@@ -27,7 +27,7 @@ int test_copy_image_size_2D( cl_context context, cl_command_queue queue, image_d
|
||||
size_t dst_lod = 0, dst_width_lod = imageInfo->width, dst_row_pitch_lod;
|
||||
size_t dst_height_lod = imageInfo->height;
|
||||
size_t width_lod = imageInfo->width, height_lod = imageInfo->height;
|
||||
size_t max_mip_level;
|
||||
size_t max_mip_level = 0;
|
||||
|
||||
if( gTestMipmaps )
|
||||
{
|
||||
|
||||
@@ -72,7 +72,7 @@ int test_copy_image_size_2D_2D_array( cl_context context, cl_command_queue queue
|
||||
size_t threeImage_lod = 0, threeImage_width_lod = threeImage->width, threeImage_row_pitch_lod, threeImage_slice_pitch_lod;
|
||||
size_t threeImage_height_lod = threeImage->height;
|
||||
size_t width_lod, height_lod;
|
||||
size_t twoImage_max_mip_level,threeImage_max_mip_level;
|
||||
size_t twoImage_max_mip_level = 0, threeImage_max_mip_level = 0;
|
||||
|
||||
if( gTestMipmaps )
|
||||
{
|
||||
|
||||
@@ -68,7 +68,7 @@ int test_copy_image_size_2D_3D( cl_context context, cl_command_queue queue, imag
|
||||
size_t threeImage_lod = 0, threeImage_width_lod = threeImage->width, threeImage_row_pitch_lod, threeImage_slice_pitch_lod;
|
||||
size_t threeImage_height_lod = threeImage->height, depth_lod = threeImage->depth;
|
||||
size_t width_lod, height_lod;
|
||||
size_t twoImage_max_mip_level,threeImage_max_mip_level;
|
||||
size_t twoImage_max_mip_level = 0, threeImage_max_mip_level = 0;
|
||||
|
||||
if( gTestMipmaps )
|
||||
{
|
||||
|
||||
@@ -39,8 +39,8 @@ extern int test_copy_image_set_1D_buffer_1D(cl_device_id device,
|
||||
|
||||
int test_image_type( cl_device_id device, cl_context context, cl_command_queue queue, MethodsToTest testMethod, cl_mem_flags flags )
|
||||
{
|
||||
const char *name;
|
||||
cl_mem_object_type imageType;
|
||||
const char *name = nullptr;
|
||||
cl_mem_object_type imageType = 0;
|
||||
|
||||
if ( gTestMipmaps )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user