mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-22 23:29:02 +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
@@ -69,7 +69,7 @@ static inline size_t get_format_size(cl_context context,
|
||||
}
|
||||
|
||||
cl_int error = 0;
|
||||
cl_mem buffer;
|
||||
cl_mem buffer = nullptr;
|
||||
if (imageType == CL_MEM_OBJECT_IMAGE1D_BUFFER)
|
||||
{
|
||||
buffer = clCreateBuffer(context, flags,
|
||||
|
||||
@@ -769,7 +769,7 @@ int image_from_buffer_fill_positive(cl_device_id device, cl_context context,
|
||||
err = clFinish(queue);
|
||||
test_error(err, "Error clFinish");
|
||||
|
||||
cl_mem image1d_buffer;
|
||||
cl_mem image1d_buffer = nullptr;
|
||||
if (imageType == CL_MEM_OBJECT_IMAGE1D_BUFFER)
|
||||
{
|
||||
image1d_buffer = clCreateBuffer(context, flag, buffer_size,
|
||||
|
||||
@@ -1191,7 +1191,7 @@ int test_read_image_2D( cl_context context, cl_command_queue queue, cl_kernel ke
|
||||
{
|
||||
int error;
|
||||
static int initHalf = 0;
|
||||
cl_mem imageBuffer;
|
||||
cl_mem imageBuffer = nullptr;
|
||||
cl_mem_flags image_read_write_flags = CL_MEM_READ_ONLY;
|
||||
size_t threads[2];
|
||||
|
||||
|
||||
@@ -223,7 +223,7 @@ int test_write_image( cl_device_id device, cl_context context, cl_command_queue
|
||||
clProtectedImage protImage;
|
||||
clMemWrapper unprotImage;
|
||||
cl_mem image;
|
||||
cl_mem imageBuffer;
|
||||
cl_mem imageBuffer = nullptr;
|
||||
|
||||
if( gMemFlagsToUse == CL_MEM_USE_HOST_PTR )
|
||||
{
|
||||
@@ -910,7 +910,7 @@ int test_write_image_formats(cl_device_id device, cl_context context,
|
||||
gTestCount++;
|
||||
|
||||
print_write_header( &imageFormat, false );
|
||||
int retCode;
|
||||
int retCode = 0;
|
||||
switch (imageType)
|
||||
{
|
||||
case CL_MEM_OBJECT_IMAGE1D:
|
||||
|
||||
Reference in New Issue
Block a user