mirror of
https://github.com/reactos/CMake.git
synced 2025-02-20 03:31:55 +00:00
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
This commit is contained in:
parent
03e2757c66
commit
5a72ffb33a
@ -7,7 +7,6 @@
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <cctype>
|
#include <cctype>
|
||||||
#include <cstdint>
|
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
@ -334,7 +333,7 @@ void cmMakefile::PrintCommandTrace(const cmListFileFunction& lff) const
|
|||||||
Json::StreamWriterBuilder builder;
|
Json::StreamWriterBuilder builder;
|
||||||
builder["indentation"] = "";
|
builder["indentation"] = "";
|
||||||
val["file"] = full_path;
|
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["cmd"] = lff.Name.Original;
|
||||||
val["args"] = Json::Value(Json::arrayValue);
|
val["args"] = Json::Value(Json::arrayValue);
|
||||||
for (std::string const& arg : args) {
|
for (std::string const& arg : args) {
|
||||||
@ -342,7 +341,7 @@ void cmMakefile::PrintCommandTrace(const cmListFileFunction& lff) const
|
|||||||
}
|
}
|
||||||
val["time"] = cmSystemTools::GetTime();
|
val["time"] = cmSystemTools::GetTime();
|
||||||
val["frame"] =
|
val["frame"] =
|
||||||
static_cast<std::uint64_t>(this->ExecutionStatusStack.size());
|
static_cast<Json::Value::UInt64>(this->ExecutionStatusStack.size());
|
||||||
msg << Json::writeString(builder, val);
|
msg << Json::writeString(builder, val);
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user