Skip to content

Commit

Permalink
src: use explicit casts to silence conversion warnings
Browse files Browse the repository at this point in the history
PR-URL: nodejs#26766
Ref nodejs#26733
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  • Loading branch information
zbjornson authored and targos committed Mar 27, 2019
1 parent 0a3f708 commit d00b8ae
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/node_file.h
Original file line number Diff line number Diff line change
Expand Up @@ -194,16 +194,16 @@ constexpr uint64_t ToNative(uv_timespec_t ts) {
template <typename NativeT, typename V8T>
constexpr void FillStatsArray(AliasedBuffer<NativeT, V8T>* fields,
const uv_stat_t* s, const size_t offset = 0) {
fields->SetValue(offset + 0, s->st_dev);
fields->SetValue(offset + 1, s->st_mode);
fields->SetValue(offset + 2, s->st_nlink);
fields->SetValue(offset + 3, s->st_uid);
fields->SetValue(offset + 4, s->st_gid);
fields->SetValue(offset + 5, s->st_rdev);
fields->SetValue(offset + 6, s->st_blksize);
fields->SetValue(offset + 7, s->st_ino);
fields->SetValue(offset + 8, s->st_size);
fields->SetValue(offset + 9, s->st_blocks);
fields->SetValue(offset + 0, static_cast<NativeT>(s->st_dev));
fields->SetValue(offset + 1, static_cast<NativeT>(s->st_mode));
fields->SetValue(offset + 2, static_cast<NativeT>(s->st_nlink));
fields->SetValue(offset + 3, static_cast<NativeT>(s->st_uid));
fields->SetValue(offset + 4, static_cast<NativeT>(s->st_gid));
fields->SetValue(offset + 5, static_cast<NativeT>(s->st_rdev));
fields->SetValue(offset + 6, static_cast<NativeT>(s->st_blksize));
fields->SetValue(offset + 7, static_cast<NativeT>(s->st_ino));
fields->SetValue(offset + 8, static_cast<NativeT>(s->st_size));
fields->SetValue(offset + 9, static_cast<NativeT>(s->st_blocks));
// Dates.
fields->SetValue(offset + 10, ToNative<NativeT>(s->st_atim));
fields->SetValue(offset + 11, ToNative<NativeT>(s->st_mtim));
Expand Down

0 comments on commit d00b8ae

Please sign in to comment.