summaryrefslogtreecommitdiffstats
path: root/Source/cmCacheManager.cxx
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2009-09-30 15:41:34 (GMT)
committerDavid Cole <david.cole@kitware.com>2009-09-30 15:41:34 (GMT)
commita9dcc7fd47048a25f79f04a0d0a57a81aede617b (patch)
tree367c4e907bdab9961e981e44a40de016fa7a574c /Source/cmCacheManager.cxx
parent67530409a91156b06b3f8076bbd2e96969319fd4 (diff)
downloadCMake-a9dcc7fd47048a25f79f04a0d0a57a81aede617b.zip
CMake-a9dcc7fd47048a25f79f04a0d0a57a81aede617b.tar.gz
CMake-a9dcc7fd47048a25f79f04a0d0a57a81aede617b.tar.bz2
Fix warnings in CMake source code. Suppress warnings in Lexer and Parser files that are 'too hard' to fix.
Diffstat (limited to 'Source/cmCacheManager.cxx')
-rw-r--r--Source/cmCacheManager.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx
index b1f969a..e1a1076 100644
--- a/Source/cmCacheManager.cxx
+++ b/Source/cmCacheManager.cxx
@@ -462,11 +462,13 @@ bool cmCacheManager::SaveCache(const char* path)
if ( currentcwd[0] >= 'A' && currentcwd[0] <= 'Z' &&
currentcwd[1] == ':' )
{
- currentcwd[0] = currentcwd[0] - 'A' + 'a';
+ // Cast added to avoid compiler warning. Cast is ok because
+ // value is guaranteed to fit in char by the above if...
+ currentcwd[0] = static_cast<char>(currentcwd[0] - 'A' + 'a');
}
cmSystemTools::ConvertToUnixSlashes(currentcwd);
this->AddCacheEntry("CMAKE_CACHEFILE_DIR", currentcwd.c_str(),
- "This is the directory where this CMakeCahe.txt"
+ "This is the directory where this CMakeCache.txt"
" was created", cmCacheManager::INTERNAL);
fout << "# This is the CMakeCache file.\n"