From 5a8c3daba3a7bf5d1798db48e31f8c89760b03a1 Mon Sep 17 00:00:00 2001 From: Nicolas Sauzede Date: Fri, 8 Nov 2019 01:02:02 +0100 Subject: [PATCH] os: fix stat mode signedness warning --- vlib/os/os.v | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vlib/os/os.v b/vlib/os/os.v index 8b420cd39a..d56868c7bc 100644 --- a/vlib/os/os.v +++ b/vlib/os/os.v @@ -48,7 +48,7 @@ struct FileInfo { struct C.stat { st_size int - st_mode int + st_mode u32 st_mtime int } @@ -794,7 +794,7 @@ pub fn is_dir(path string) bool { return false } // ref: https://code.woboq.org/gcc/include/sys/stat.h.html - return (statbuf.st_mode & S_IFMT) == S_IFDIR + return (int(statbuf.st_mode) & S_IFMT) == S_IFDIR } }