Skip to content

Commit

Permalink
Avoid compiler warning about comparison. (#7768)
Browse files Browse the repository at this point in the history
  • Loading branch information
trivialfis committed Mar 31, 2022
1 parent 522636c commit 6fa1afd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/common/json.cc
Original file line number Diff line number Diff line change
Expand Up @@ -923,7 +923,7 @@ void WriteTypedArray(JsonTypedArray<T, kind> const* arr, std::vector<char>* stre
auto s = stream->size();
stream->resize(s + arr->Size() * sizeof(T));
auto const& vec = arr->GetArray();
for (size_t i = 0; i < n; ++i) {
for (int64_t i = 0; i < n; ++i) {
auto v = ToBigEndian(vec[i]);
std::memcpy(stream->data() + s, &v, sizeof(v));
s += sizeof(v);
Expand Down

0 comments on commit 6fa1afd

Please sign in to comment.