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
@@ -341,8 +341,8 @@ int Test_vStoreHalf_private(cl_device_id device, f2h referenceFunc,
|
||||
int vectorSize, error;
|
||||
cl_program programs[kVectorSizeCount + kStrangeVectorSizeCount][3];
|
||||
cl_kernel kernels[kVectorSizeCount + kStrangeVectorSizeCount][3];
|
||||
cl_program resetProgram;
|
||||
cl_kernel resetKernel;
|
||||
cl_program resetProgram = nullptr;
|
||||
cl_kernel resetKernel = nullptr;
|
||||
|
||||
uint64_t time[kVectorSizeCount + kStrangeVectorSizeCount] = { 0 };
|
||||
uint64_t min_time[kVectorSizeCount + kStrangeVectorSizeCount] = { 0 };
|
||||
@@ -1225,8 +1225,8 @@ int Test_vStoreaHalf_private(cl_device_id device, f2h referenceFunc,
|
||||
int vectorSize, error;
|
||||
cl_program programs[kVectorSizeCount + kStrangeVectorSizeCount][3];
|
||||
cl_kernel kernels[kVectorSizeCount + kStrangeVectorSizeCount][3];
|
||||
cl_program resetProgram;
|
||||
cl_kernel resetKernel;
|
||||
cl_program resetProgram = nullptr;
|
||||
cl_kernel resetKernel = nullptr;
|
||||
|
||||
uint64_t time[kVectorSizeCount + kStrangeVectorSizeCount] = { 0 };
|
||||
uint64_t min_time[kVectorSizeCount + kStrangeVectorSizeCount] = { 0 };
|
||||
|
||||
@@ -144,11 +144,12 @@ static int ParseArgs( int argc, const char **argv )
|
||||
#if (defined( __APPLE__ ) || defined(__linux__) || defined(__MINGW32__))
|
||||
{ // Extract the app name
|
||||
char baseName[ MAXPATHLEN ];
|
||||
strncpy( baseName, argv[0], MAXPATHLEN );
|
||||
strncpy(baseName, argv[0], MAXPATHLEN - 1);
|
||||
baseName[MAXPATHLEN - 1] = '\0';
|
||||
char *base = basename( baseName );
|
||||
if( NULL != base )
|
||||
{
|
||||
strncpy( appName, base, sizeof( appName ) );
|
||||
strncpy(appName, base, sizeof(appName) - 1);
|
||||
appName[ sizeof( appName ) -1 ] = '\0';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user