rump: fix compiler warning

Fixes two warnings of this type:

! src/lib/vfs/rump/vfs_rump.cc:214:52: warning: narrowing conversion of
! ‘(s.stat::st_mode & 64)’ from ‘__mode_t’ {aka ‘unsigned int’} to ‘bool’
! [-Wnarrowing]
!
!  214 |                           .executable = (s.st_mode & S_IXUSR) };
!      |                                         ~~~~~~~~~~~^~~~~~~~~~

Fixes #4160
This commit is contained in:
Martin Stein 2021-05-19 14:30:19 +02:00 committed by Christian Helmuth
parent 7b09675236
commit 0069660958

View File

@ -211,7 +211,7 @@ class Vfs::Rump_file_system : public File_system
Node_rwx const rwx { .readable = true,
.writeable = true,
.executable = (s.st_mode & S_IXUSR) };
.executable = (s.st_mode & S_IXUSR) != 0 };
vfs_dir = {
.fileno = s.st_ino,
@ -702,7 +702,7 @@ class Vfs::Rump_file_system : public File_system
.type = type(sb.st_mode),
.rwx = { .readable = true,
.writeable = true,
.executable = (sb.st_mode & S_IXUSR) },
.executable = (sb.st_mode & S_IXUSR) != 0 },
.inode = sb.st_ino,
.device = sb.st_dev,