Skip to content

Commit 6911678

Browse files
zbjornsontargos
authored andcommitted
src: use explicit casts to silence conversion warnings
PR-URL: #26766 Ref #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>
1 parent 509ad40 commit 6911678

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/node_file.h

+10-10
Original file line numberDiff line numberDiff line change
@@ -194,16 +194,16 @@ constexpr uint64_t ToNative(uv_timespec_t ts) {
194194
template <typename NativeT, typename V8T>
195195
constexpr void FillStatsArray(AliasedBuffer<NativeT, V8T>* fields,
196196
const uv_stat_t* s, const size_t offset = 0) {
197-
fields->SetValue(offset + 0, s->st_dev);
198-
fields->SetValue(offset + 1, s->st_mode);
199-
fields->SetValue(offset + 2, s->st_nlink);
200-
fields->SetValue(offset + 3, s->st_uid);
201-
fields->SetValue(offset + 4, s->st_gid);
202-
fields->SetValue(offset + 5, s->st_rdev);
203-
fields->SetValue(offset + 6, s->st_blksize);
204-
fields->SetValue(offset + 7, s->st_ino);
205-
fields->SetValue(offset + 8, s->st_size);
206-
fields->SetValue(offset + 9, s->st_blocks);
197+
fields->SetValue(offset + 0, static_cast<NativeT>(s->st_dev));
198+
fields->SetValue(offset + 1, static_cast<NativeT>(s->st_mode));
199+
fields->SetValue(offset + 2, static_cast<NativeT>(s->st_nlink));
200+
fields->SetValue(offset + 3, static_cast<NativeT>(s->st_uid));
201+
fields->SetValue(offset + 4, static_cast<NativeT>(s->st_gid));
202+
fields->SetValue(offset + 5, static_cast<NativeT>(s->st_rdev));
203+
fields->SetValue(offset + 6, static_cast<NativeT>(s->st_blksize));
204+
fields->SetValue(offset + 7, static_cast<NativeT>(s->st_ino));
205+
fields->SetValue(offset + 8, static_cast<NativeT>(s->st_size));
206+
fields->SetValue(offset + 9, static_cast<NativeT>(s->st_blocks));
207207
// Dates.
208208
fields->SetValue(offset + 10, ToNative<NativeT>(s->st_atim));
209209
fields->SetValue(offset + 11, ToNative<NativeT>(s->st_mtim));

0 commit comments

Comments
 (0)