mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 22:19: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
@@ -1448,7 +1448,9 @@ cl_program MakeProgram(Type outType, Type inType, SaturationMode sat,
|
||||
char inName[32];
|
||||
char outName[32];
|
||||
strncpy(inName, gTypeNames[inType], sizeof(inName));
|
||||
inName[sizeof(inName) - 1] = '\0';
|
||||
strncpy(outName, gTypeNames[outType], sizeof(outName));
|
||||
outName[sizeof(outName) - 1] = '\0';
|
||||
sprintf(testName, "test_implicit_%s_%s", outName, inName);
|
||||
|
||||
source << "__kernel void " << testName << "( __global " << inName
|
||||
@@ -1473,8 +1475,10 @@ cl_program MakeProgram(Type outType, Type inType, SaturationMode sat,
|
||||
switch (vectorSizetmp)
|
||||
{
|
||||
case 1:
|
||||
strncpy(inName, gTypeNames[inType], sizeof(inName));
|
||||
strncpy(outName, gTypeNames[outType], sizeof(outName));
|
||||
strncpy(inName, gTypeNames[inType], sizeof(inName) - 1);
|
||||
inName[sizeof(inName) - 1] = '\0';
|
||||
strncpy(outName, gTypeNames[outType], sizeof(outName) - 1);
|
||||
outName[sizeof(outName) - 1] = '\0';
|
||||
snprintf(convertString, sizeof(convertString), "convert_%s%s%s",
|
||||
outName, gSaturationNames[sat],
|
||||
gRoundingModeNames[round]);
|
||||
@@ -1482,8 +1486,10 @@ cl_program MakeProgram(Type outType, Type inType, SaturationMode sat,
|
||||
vlog("Building %s( %s ) test\n", convertString, inName);
|
||||
break;
|
||||
case 3:
|
||||
strncpy(inName, gTypeNames[inType], sizeof(inName));
|
||||
strncpy(outName, gTypeNames[outType], sizeof(outName));
|
||||
strncpy(inName, gTypeNames[inType], sizeof(inName) - 1);
|
||||
inName[sizeof(inName) - 1] = '\0';
|
||||
strncpy(outName, gTypeNames[outType], sizeof(outName) - 1);
|
||||
outName[sizeof(outName) - 1] = '\0';
|
||||
snprintf(convertString, sizeof(convertString),
|
||||
"convert_%s3%s%s", outName, gSaturationNames[sat],
|
||||
gRoundingModeNames[round]);
|
||||
|
||||
Reference in New Issue
Block a user