mirror of
https://github.com/mmueller41/genode.git
synced 2026-01-21 20:42:56 +01:00
os: Properly initialize File_system::Watch_handle.
This comes up when building the code with clang 13. It happens due to
recently enabled Wconversion warning, which in case of clang also
enables implicit-int-conversion warning. The warning reads:
fs_file_system.h:937:44: error: higher order bits are zeroes after
implicit conversion [-Werror,-Wimplicit-int-conversion]
::File_system::Watch_handle fs_handle { -1U };
~~~~~~~~~ ^~~
This can be fixed by properly specifying fs_handle value to be of
unsigned long type.
Issue #4354
This commit is contained in:
committed by
Christian Helmuth
parent
27b798fa4f
commit
f2dab083f6
@@ -934,7 +934,7 @@ class Vfs::Fs_file_system : public File_system
|
||||
using namespace ::File_system;
|
||||
|
||||
Watch_result res = WATCH_ERR_UNACCESSIBLE;
|
||||
::File_system::Watch_handle fs_handle { -1U };
|
||||
::File_system::Watch_handle fs_handle { -1UL };
|
||||
|
||||
try { fs_handle = _fs.watch(path); }
|
||||
catch (Unavailable) { return WATCH_ERR_UNACCESSIBLE; }
|
||||
|
||||
Reference in New Issue
Block a user