mirror of
https://github.com/reactos/CMake.git
synced 2024-11-25 04:29:52 +00:00
COMP: sprintf warnings. DWORD should use %ld rather than %d. Also, const char *p, a shadowed variable warning.
This commit is contained in:
parent
b837ade944
commit
68dfcefbcb
@ -379,7 +379,7 @@ kwsysProcess* kwsysProcess_New(void)
|
||||
|
||||
/* Construct the executable name from the process id and kwsysProcess
|
||||
instance. This should be unique. */
|
||||
sprintf(fwdName, KWSYS_NAMESPACE_STRING "pew9xfwd_%u_%p.exe",
|
||||
sprintf(fwdName, KWSYS_NAMESPACE_STRING "pew9xfwd_%ld_%p.exe",
|
||||
GetCurrentProcessId(), cp);
|
||||
|
||||
/* If we have a temp directory, use it. */
|
||||
|
@ -2998,7 +2998,7 @@ bool SystemInformationImplementation::QueryOSInformation()
|
||||
}
|
||||
}
|
||||
|
||||
sprintf (operatingSystem, "%s(Build %d)", osvi.szCSDVersion, osvi.dwBuildNumber & 0xFFFF);
|
||||
sprintf (operatingSystem, "%s(Build %ld)", osvi.szCSDVersion, osvi.dwBuildNumber & 0xFFFF);
|
||||
this->OSVersion = operatingSystem;
|
||||
}
|
||||
else
|
||||
@ -3047,7 +3047,7 @@ bool SystemInformationImplementation::QueryOSInformation()
|
||||
if (osvi.dwMajorVersion <= 4)
|
||||
{
|
||||
// NB: NT 4.0 and earlier.
|
||||
sprintf (operatingSystem, "version %d.%d %s (Build %d)",
|
||||
sprintf (operatingSystem, "version %ld.%ld %s (Build %ld)",
|
||||
osvi.dwMajorVersion,
|
||||
osvi.dwMinorVersion,
|
||||
osvi.szCSDVersion,
|
||||
@ -3078,7 +3078,7 @@ bool SystemInformationImplementation::QueryOSInformation()
|
||||
else
|
||||
{
|
||||
// Windows 2000 and everything else.
|
||||
sprintf (operatingSystem,"%s(Build %d)", osvi.szCSDVersion, osvi.dwBuildNumber & 0xFFFF);
|
||||
sprintf (operatingSystem,"%s(Build %ld)", osvi.szCSDVersion, osvi.dwBuildNumber & 0xFFFF);
|
||||
this->OSVersion = operatingSystem;
|
||||
}
|
||||
break;
|
||||
|
@ -3125,9 +3125,9 @@ void SystemTools::SplitPath(const char* p,
|
||||
if(root.size() == 1)
|
||||
{
|
||||
#if defined(_WIN32) && !defined(__CYGWIN__)
|
||||
if(const char* p = getenv("USERPROFILE"))
|
||||
if(const char* userp = getenv("USERPROFILE"))
|
||||
{
|
||||
homedir = p;
|
||||
homedir = userp;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
@ -4279,10 +4279,10 @@ kwsys_stl::string SystemTools::GetOperatingSystemNameAndVersion()
|
||||
}
|
||||
|
||||
res += " ";
|
||||
sprintf(buffer, "%d", osvi.dwMajorVersion);
|
||||
sprintf(buffer, "%ld", osvi.dwMajorVersion);
|
||||
res += buffer;
|
||||
res += ".";
|
||||
sprintf(buffer, "%d", osvi.dwMinorVersion);
|
||||
sprintf(buffer, "%ld", osvi.dwMinorVersion);
|
||||
res += buffer;
|
||||
}
|
||||
|
||||
@ -4304,7 +4304,7 @@ kwsys_stl::string SystemTools::GetOperatingSystemNameAndVersion()
|
||||
if (lRet == ERROR_SUCCESS)
|
||||
{
|
||||
res += " Service Pack 6a (Build ";
|
||||
sprintf(buffer, "%d", osvi.dwBuildNumber & 0xFFFF);
|
||||
sprintf(buffer, "%ld", osvi.dwBuildNumber & 0xFFFF);
|
||||
res += buffer;
|
||||
res += ")";
|
||||
}
|
||||
@ -4313,7 +4313,7 @@ kwsys_stl::string SystemTools::GetOperatingSystemNameAndVersion()
|
||||
res += " ";
|
||||
res += osvi.szCSDVersion;
|
||||
res += " (Build ";
|
||||
sprintf(buffer, "%d", osvi.dwBuildNumber & 0xFFFF);
|
||||
sprintf(buffer, "%ld", osvi.dwBuildNumber & 0xFFFF);
|
||||
res += buffer;
|
||||
res += ")";
|
||||
}
|
||||
@ -4325,7 +4325,7 @@ kwsys_stl::string SystemTools::GetOperatingSystemNameAndVersion()
|
||||
res += " ";
|
||||
res += osvi.szCSDVersion;
|
||||
res += " (Build ";
|
||||
sprintf(buffer, "%d", osvi.dwBuildNumber & 0xFFFF);
|
||||
sprintf(buffer, "%ld", osvi.dwBuildNumber & 0xFFFF);
|
||||
res += buffer;
|
||||
res += ")";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user