Skip to content

Commit

Permalink
src: use explicit casts to silence conversion warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
zbjornson committed Mar 19, 2019
1 parent ebcd502 commit 8ddced4
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 8ddced4

Please sign in to comment.