summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/SystemTools.cxx
diff options
context:
space:
mode:
authorBill Lorensen <lorensen@crd.ge.com>2008-05-11 02:48:53 (GMT)
committerBill Lorensen <lorensen@crd.ge.com>2008-05-11 02:48:53 (GMT)
commit68dfcefbcb755018ddadfa8bf132114a1b3fa28c (patch)
treeec2603b6260154bb983ada7940bfdde838725087 /Source/kwsys/SystemTools.cxx
parentb837ade9445ff74a5b59239eaa2a65b97256b426 (diff)
downloadCMake-68dfcefbcb755018ddadfa8bf132114a1b3fa28c.zip
CMake-68dfcefbcb755018ddadfa8bf132114a1b3fa28c.tar.gz
CMake-68dfcefbcb755018ddadfa8bf132114a1b3fa28c.tar.bz2
COMP: sprintf warnings. DWORD should use %ld rather than %d. Also, const char *p, a shadowed variable warning.
Diffstat (limited to 'Source/kwsys/SystemTools.cxx')
-rw-r--r--Source/kwsys/SystemTools.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx
index 7cd404e..d5d530d 100644
--- a/Source/kwsys/SystemTools.cxx
+++ b/Source/kwsys/SystemTools.cxx
@@ -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 += ")";
}