From 5a72ffb33a23fbc1ea12d4e3572f46650744d950 Mon Sep 17 00:00:00 2001 From: Raul Tambre Date: Tue, 28 Jan 2020 08:40:54 +0200 Subject: [PATCH] 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 --- Source/cmMakefile.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 59995be53e..83eef38755 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -7,7 +7,6 @@ #include #include #include -#include #include #include #include @@ -334,7 +333,7 @@ void cmMakefile::PrintCommandTrace(const cmListFileFunction& lff) const Json::StreamWriterBuilder builder; builder["indentation"] = ""; val["file"] = full_path; - val["line"] = static_cast(lff.Line); + val["line"] = static_cast(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(this->ExecutionStatusStack.size()); + static_cast(this->ExecutionStatusStack.size()); msg << Json::writeString(builder, val); #endif break;