diff options
author | Rolf Eike Beer <eike@sf-mail.de> | 2017-09-01 18:50:00 (GMT) |
---|---|---|
committer | Rolf Eike Beer <eike@sf-mail.de> | 2017-09-01 18:50:00 (GMT) |
commit | 353ec237376d940e975bfbe0d982ebeddd21fc29 (patch) | |
tree | 3ca0a2c33f37b9aacf4433ceaa09c6fa5444e23b /Source/CTest | |
parent | 671cc7490ca1dd732cbb3671d4732eb1ee1e180e (diff) | |
download | CMake-353ec237376d940e975bfbe0d982ebeddd21fc29.zip CMake-353ec237376d940e975bfbe0d982ebeddd21fc29.tar.gz CMake-353ec237376d940e975bfbe0d982ebeddd21fc29.tar.bz2 |
use static_cast<> for casts from void*
Diffstat (limited to 'Source/CTest')
-rw-r--r-- | Source/CTest/cmCTestBuildAndTestHandler.cxx | 6 | ||||
-rw-r--r-- | Source/CTest/cmCTestMemCheckHandler.cxx | 2 |
2 files changed, 4 insertions, 4 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); } |