mirror of
https://github.com/simh/simh.git
synced 2026-01-25 19:56:25 +00:00
SCP: Cleanup gcc compiler flagged potential issues
Compiler warnings about undeclared case fall throughs, and potential buffer overruns,
This commit is contained in:
@@ -3464,15 +3464,16 @@ if ((sDynamic) &&
|
||||
else
|
||||
ParentName[i/2] = Pdata[i] ? Pdata[i] : Pdata[i+1];
|
||||
free (Pdata);
|
||||
memset (CheckPath, 0, sizeof (CheckPath));
|
||||
if (0 == memcmp (sDynamic->ParentLocatorEntries[j].PlatformCode, "W2ku", 4))
|
||||
strncpy (CheckPath, ParentName, sizeof (CheckPath)-1);
|
||||
strlcpy (CheckPath, ParentName, sizeof (CheckPath));
|
||||
else
|
||||
if (0 == memcmp (sDynamic->ParentLocatorEntries[j].PlatformCode, "W2ru", 4)) {
|
||||
const char *c;
|
||||
|
||||
if ((c = strrchr (szVHDPath, '\\'))) {
|
||||
memcpy (CheckPath, szVHDPath, c-szVHDPath+1);
|
||||
strncpy (CheckPath+strlen(CheckPath), ParentName, sizeof (CheckPath)-(strlen (CheckPath)+1));
|
||||
strlcat (CheckPath, ParentName, sizeof (CheckPath));
|
||||
}
|
||||
}
|
||||
VhdPathToHostPath (CheckPath, CheckPath, sizeof (CheckPath));
|
||||
|
||||
Reference in New Issue
Block a user