mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
Fix more warnings in math_brute_force (#1502)
* Fix "‘nadj’ may be used uninitialized in this function [-Werror=maybe-uninitialized]". * Fix "specified bound 4096 equals destination size [-Werror=stringop-truncation]". Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
This commit is contained in:
committed by
GitHub
parent
7859a33182
commit
a87e686757
@@ -360,16 +360,18 @@ static int ParseArgs(int argc, const char **argv)
|
||||
int singleThreaded = 0;
|
||||
|
||||
{ // Extract the app name
|
||||
strncpy(appName, argv[0], MAXPATHLEN);
|
||||
strncpy(appName, argv[0], MAXPATHLEN - 1);
|
||||
appName[MAXPATHLEN - 1] = '\0';
|
||||
|
||||
#if defined(__APPLE__)
|
||||
char baseName[MAXPATHLEN];
|
||||
char *base = NULL;
|
||||
strncpy(baseName, argv[0], MAXPATHLEN);
|
||||
strncpy(baseName, argv[0], MAXPATHLEN - 1);
|
||||
baseName[MAXPATHLEN - 1] = '\0';
|
||||
base = basename(baseName);
|
||||
if (NULL != base)
|
||||
{
|
||||
strncpy(appName, base, sizeof(appName));
|
||||
strncpy(appName, base, sizeof(appName) - 1);
|
||||
appName[sizeof(appName) - 1] = '\0';
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user