diff options
author | Zach Bjornson <zbbjornson@gmail.com> | 2019-03-19 06:18:48 +0300 |
---|---|---|
committer | Daniel Bevenius <daniel.bevenius@gmail.com> | 2019-03-22 07:47:47 +0300 |
commit | 0b516fac79aada4c3b6cc7fdc446573ead395ff3 (patch) | |
tree | 39c126fe60286457defd6100d1b1a46512f41b15 /src/node_file.h | |
parent | 382e859afc7e66600dccfadd4125088444e063c3 (diff) |
src: use explicit casts to silence conversion warnings
PR-URL: https://github.com/nodejs/node/pull/26766
Ref https://github.com/nodejs/node/issues/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>
Diffstat (limited to 'src/node_file.h')
-rw-r--r-- | src/node_file.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/node_file.h b/src/node_file.h index 6d2ec48bcdc..746967f364c 100644 --- a/src/node_file.h +++ b/src/node_file.h @@ -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)); |