From 8ddced449d8f389c1c4fd691f6f97bf159dcdd03 Mon Sep 17 00:00:00 2001 From: Zach Bjornson Date: Mon, 18 Mar 2019 20:18:48 -0700 Subject: [PATCH] src: use explicit casts to silence conversion warnings Ref https://github.com/nodejs/node/issues/26733 --- src/node_file.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/node_file.h b/src/node_file.h index 6d2ec48bcdcba5..746967f364c1e6 100644 --- a/src/node_file.h +++ b/src/node_file.h @@ -194,16 +194,16 @@ constexpr uint64_t ToNative(uv_timespec_t ts) { template constexpr void FillStatsArray(AliasedBuffer* 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(s->st_dev)); + fields->SetValue(offset + 1, static_cast(s->st_mode)); + fields->SetValue(offset + 2, static_cast(s->st_nlink)); + fields->SetValue(offset + 3, static_cast(s->st_uid)); + fields->SetValue(offset + 4, static_cast(s->st_gid)); + fields->SetValue(offset + 5, static_cast(s->st_rdev)); + fields->SetValue(offset + 6, static_cast(s->st_blksize)); + fields->SetValue(offset + 7, static_cast(s->st_ino)); + fields->SetValue(offset + 8, static_cast(s->st_size)); + fields->SetValue(offset + 9, static_cast(s->st_blocks)); // Dates. fields->SetValue(offset + 10, ToNative(s->st_atim)); fields->SetValue(offset + 11, ToNative(s->st_mtim));