summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2003-05-28 09:21:37 -0400
committerBill Hoffman <bill.hoffman@kitware.com>2003-05-28 09:21:37 -0400
commit8cb6645ad8779c7066a9a31907004506b595aab2 (patch)
tree0fb33f0cf62d41c4532068d38b96600d2a10474a
parent64db4e2cd8706ea91a8598145cff5d7607e3bfd2 (diff)
downloadcmake-8cb6645ad8779c7066a9a31907004506b595aab2.tar.gz
Remove some borland 6 warnings
-rw-r--r--Source/CTest/cmCTestSubmit.cxx4
-rw-r--r--Source/cmCTest.cxx3
-rw-r--r--Source/cmDynamicLoader.cxx13
-rw-r--r--Source/cmGlobalVisualStudio71Generator.cxx2
-rw-r--r--Source/cmSystemTools.cxx6
5 files changed, 11 insertions, 17 deletions
diff --git a/Source/CTest/cmCTestSubmit.cxx b/Source/CTest/cmCTestSubmit.cxx
index 0d647ebefc..24f3e5e77b 100644
--- a/Source/CTest/cmCTestSubmit.cxx
+++ b/Source/CTest/cmCTestSubmit.cxx
@@ -299,7 +299,6 @@ bool cmCTestSubmit::TriggerUsingHTTP(const std::vector<std::string>& files,
const std::string& url)
{
CURL *curl;
- CURLcode res = CURLcode();
/* In windows, this will init the winsock stuff */
::curl_global_init(CURL_GLOBAL_ALL);
@@ -363,8 +362,7 @@ bool cmCTestSubmit::TriggerUsingHTTP(const std::vector<std::string>& files,
std::cout << "Trigger url: " << turl.c_str() << std::endl;
}
curl_easy_setopt(curl, CURLOPT_URL, turl.c_str());
- res = curl_easy_perform(curl);
- if ( res )
+ if ( curl_easy_perform(curl) )
{
std::cout << "Error when uploading" << std::endl;
::curl_easy_cleanup(curl);
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index 1b5c8e67db..fe185739f3 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -170,10 +170,9 @@ static const char* cmCTestWarningExceptions[] = {
std::string cmCTest::MakeXMLSafe(const std::string& str)
{
- std::string::size_type pos = 0;
cmOStringStream ost;
char buffer[10];
- for ( pos = 0; pos < str.size(); pos ++ )
+ for (std::string::size_type pos = 0; pos < str.size(); pos ++ )
{
unsigned char ch = str[pos];
if ( (ch > 126 || ch < 32) && ch != 9 && ch != 10 && ch != 13 )
diff --git a/Source/cmDynamicLoader.cxx b/Source/cmDynamicLoader.cxx
index 8eff2e787e..d9cd119185 100644
--- a/Source/cmDynamicLoader.cxx
+++ b/Source/cmDynamicLoader.cxx
@@ -259,15 +259,14 @@ int cmDynamicLoader::CloseLibrary(cmLibHandle lib)
cmDynamicLoaderFunction
cmDynamicLoader::GetSymbolAddress(cmLibHandle lib, const char* sym)
{
- void* result = 0;
#ifdef UNICODE
- wchar_t *wsym = new wchar_t [mbstowcs(NULL, sym, 32000)];
- mbstowcs(wsym, sym, 32000);
- void *ret = GetProcAddress(lib, wsym);
- delete [] wsym;
- result = ret;
+ wchar_t *wsym = new wchar_t [mbstowcs(NULL, sym, 32000)];
+ mbstowcs(wsym, sym, 32000);
+ void *ret = GetProcAddress(lib, wsym);
+ delete [] wsym;
+ void* result = ret;
#else
- result = GetProcAddress(lib, sym);
+ void* result = GetProcAddress(lib, sym);
#endif
// Hack to cast pointer-to-data to pointer-to-function.
return *reinterpret_cast<cmDynamicLoaderFunction*>(&result);
diff --git a/Source/cmGlobalVisualStudio71Generator.cxx b/Source/cmGlobalVisualStudio71Generator.cxx
index 8fc1a08817..d38c3004e0 100644
--- a/Source/cmGlobalVisualStudio71Generator.cxx
+++ b/Source/cmGlobalVisualStudio71Generator.cxx
@@ -203,7 +203,6 @@ void cmGlobalVisualStudio71Generator::WriteProjectDepends(std::ostream& fout,
const cmTarget& target
)
{
- int depcount = 0;
// insert Begin Project Dependency Project_Dep_Name project stuff here
if (target.GetType() != cmTarget::STATIC_LIBRARY)
{
@@ -237,7 +236,6 @@ void cmGlobalVisualStudio71Generator::WriteProjectDepends(std::ostream& fout,
{
fout << "\t\t{" << this->CreateGUID(i->c_str()) << "} = {"
<< this->CreateGUID(i->c_str()) << "}\n";
- depcount++;
}
}
}
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 218c87d3ae..46bcabd9ba 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -704,12 +704,12 @@ void cmSystemTools::ConvertToUnixSlashes(std::string& path)
pos++;
}
// Remove all // from the path just like most unix shells
+#ifndef _WIN32
int start_find = 0;
-
-#ifdef _WIN32
+#else
// However, on windows if the first characters are both slashes,
// then keep them that way, so that network paths can be handled.
- start_find = 1;
+ int start_find = 1;
#endif
while((pos = path.find("//", start_find)) != std::string::npos)