diff options
author | Raul Tambre <raul.tambre@cleveron.com> | 2020-01-28 06:40:54 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-01-28 16:47:33 (GMT) |
commit | 5a72ffb33a23fbc1ea12d4e3572f46650744d950 (patch) | |
tree | 37153ff5c850348be21000993da87e67c0e8fcac | |
parent | 03e2757c665f285f3a75d75841473bc7afb2bbc9 (diff) | |
download | CMake-5a72ffb33a23fbc1ea12d4e3572f46650744d950.zip CMake-5a72ffb33a23fbc1ea12d4e3572f46650744d950.tar.gz CMake-5a72ffb33a23fbc1ea12d4e3572f46650744d950.tar.bz2 |
cmMakefile: Fix construction of Json::Value from fixed-size int types
Cast to the Json-provided fixed-size integer types rather than assuming
that the `std::*` variants match.
Fixes: #20278
-rw-r--r-- | Source/cmMakefile.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 59995be..83eef38 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -7,7 +7,6 @@ #include <algorithm> #include <cassert> #include <cctype> -#include <cstdint> #include <cstdio> #include <cstdlib> #include <cstring> @@ -334,7 +333,7 @@ void cmMakefile::PrintCommandTrace(const cmListFileFunction& lff) const Json::StreamWriterBuilder builder; builder["indentation"] = ""; val["file"] = full_path; - val["line"] = static_cast<std::int64_t>(lff.Line); + val["line"] = static_cast<Json::Value::Int64>(lff.Line); val["cmd"] = lff.Name.Original; val["args"] = Json::Value(Json::arrayValue); for (std::string const& arg : args) { @@ -342,7 +341,7 @@ void cmMakefile::PrintCommandTrace(const cmListFileFunction& lff) const } val["time"] = cmSystemTools::GetTime(); val["frame"] = - static_cast<std::uint64_t>(this->ExecutionStatusStack.size()); + static_cast<Json::Value::UInt64>(this->ExecutionStatusStack.size()); msg << Json::writeString(builder, val); #endif break; |