summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorMatthias Maennich <matthias@maennich.net>2017-09-19 15:57:08 +0200
committerBrad King <brad.king@kitware.com>2017-09-28 07:23:41 -0400
commitb128f8c5bc02f716c700d4560b949b05afdcb659 (patch)
tree5c1bad7f18ccaeccf5c7daad2056c888df9cbcd1 /Source
parentbb0ad1bea81f60cbbb2c66c2c0ab24ee12db0026 (diff)
downloadcmake-b128f8c5bc02f716c700d4560b949b05afdcb659.tar.gz
Clean up some C-Style casts
Fix issues diagnosed by clang-tidy [google-readability-casting] Signed-off-by: Matthias Maennich <matthias@maennich.net>
Diffstat (limited to 'Source')
-rw-r--r--Source/CPack/cmCPackDragNDropGenerator.cxx2
-rw-r--r--Source/cmSystemTools.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/Source/CPack/cmCPackDragNDropGenerator.cxx b/Source/CPack/cmCPackDragNDropGenerator.cxx
index 4fbd194108..e5329adbbe 100644
--- a/Source/CPack/cmCPackDragNDropGenerator.cxx
+++ b/Source/CPack/cmCPackDragNDropGenerator.cxx
@@ -561,7 +561,7 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir,
cmCPackLogger(cmCPackLog::LOG_ERROR, languages[i]
<< " is not a recognized language" << std::endl);
}
- char* iso_language_cstr = (char*)malloc(65);
+ char* iso_language_cstr = static_cast<char*>(malloc(65));
CFStringGetCString(iso_language, iso_language_cstr, 64,
kCFStringEncodingMacRoman);
LangCode lang = 0;
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 4fd10a432b..6fdfd44608 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -2065,7 +2065,7 @@ void cmSystemTools::FindCMakeResources(const char* argv0)
#undef CM_EXE_PATH_LOCAL_SIZE
char* exe_path = exe_path_local;
if (_NSGetExecutablePath(exe_path, &exe_path_size) < 0) {
- exe_path = (char*)malloc(exe_path_size);
+ exe_path = static_cast<char*>(malloc(exe_path_size));
_NSGetExecutablePath(exe_path, &exe_path_size);
}
exe_dir =