summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-09-06 14:48:40 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-09-06 14:48:44 (GMT)
commit354835bd7341897149af218b387dc9e20a413454 (patch)
tree3be7d239ea4b2044b7effc648a9e5721667931ac
parentff0847b2d524b42e0da60d8b0459e8e5310786b3 (diff)
parent353ec237376d940e975bfbe0d982ebeddd21fc29 (diff)
downloadCMake-354835bd7341897149af218b387dc9e20a413454.zip
CMake-354835bd7341897149af218b387dc9e20a413454.tar.gz
CMake-354835bd7341897149af218b387dc9e20a413454.tar.bz2
Merge topic 'static_cast'
353ec237 use static_cast<> for casts from void* Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1225
-rw-r--r--Source/CTest/cmCTestBuildAndTestHandler.cxx6
-rw-r--r--Source/CTest/cmCTestMemCheckHandler.cxx2
-rw-r--r--Source/cmLoadCommandCommand.cxx2
-rw-r--r--Source/cmakemain.cxx2
4 files changed, 6 insertions, 6 deletions
diff --git a/Source/CTest/cmCTestBuildAndTestHandler.cxx b/Source/CTest/cmCTestBuildAndTestHandler.cxx
index b6c25b8..f9ff2d7 100644
--- a/Source/CTest/cmCTestBuildAndTestHandler.cxx
+++ b/Source/CTest/cmCTestBuildAndTestHandler.cxx
@@ -115,21 +115,21 @@ int cmCTestBuildAndTestHandler::RunCMake(std::string* outstring,
void CMakeMessageCallback(const char* m, const char* /*unused*/,
bool& /*unused*/, void* s)
{
- std::string* out = reinterpret_cast<std::string*>(s);
+ std::string* out = static_cast<std::string*>(s);
*out += m;
*out += "\n";
}
void CMakeProgressCallback(const char* msg, float /*unused*/, void* s)
{
- std::string* out = reinterpret_cast<std::string*>(s);
+ std::string* out = static_cast<std::string*>(s);
*out += msg;
*out += "\n";
}
void CMakeOutputCallback(const char* m, size_t len, void* s)
{
- std::string* out = reinterpret_cast<std::string*>(s);
+ std::string* out = static_cast<std::string*>(s);
out->append(m, len);
}
diff --git a/Source/CTest/cmCTestMemCheckHandler.cxx b/Source/CTest/cmCTestMemCheckHandler.cxx
index 7d11550..3f11543 100644
--- a/Source/CTest/cmCTestMemCheckHandler.cxx
+++ b/Source/CTest/cmCTestMemCheckHandler.cxx
@@ -33,7 +33,7 @@ static CatToErrorType cmCTestMemCheckBoundsChecker[] = {
static void xmlReportError(int line, const char* msg, void* data)
{
- cmCTest* ctest = reinterpret_cast<cmCTest*>(data);
+ cmCTest* ctest = static_cast<cmCTest*>(data);
cmCTestLog(ctest, ERROR_MESSAGE, "Error parsing XML in stream at line "
<< line << ": " << msg << std::endl);
}
diff --git a/Source/cmLoadCommandCommand.cxx b/Source/cmLoadCommandCommand.cxx
index 5ce48e3..a871df9 100644
--- a/Source/cmLoadCommandCommand.cxx
+++ b/Source/cmLoadCommandCommand.cxx
@@ -120,7 +120,7 @@ bool cmLoadedCommand::InitialPass(std::vector<std::string> const& args,
int argc = static_cast<int>(args.size());
char** argv = nullptr;
if (argc) {
- argv = reinterpret_cast<char**>(malloc(argc * sizeof(char*)));
+ argv = static_cast<char**>(malloc(argc * sizeof(char*)));
}
int i;
for (i = 0; i < argc; ++i) {
diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx
index e6f88a7..a60b2b2 100644
--- a/Source/cmakemain.cxx
+++ b/Source/cmakemain.cxx
@@ -102,7 +102,7 @@ static int do_build(int ac, char const* const* av);
static cmMakefile* cmakemainGetMakefile(void* clientdata)
{
- cmake* cm = reinterpret_cast<cmake*>(clientdata);
+ cmake* cm = static_cast<cmake*>(clientdata);
if (cm && cm->GetDebugOutput()) {
cmGlobalGenerator* gg = cm->GetGlobalGenerator();
if (gg) {