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:
Piotr Tworek 2021-12-18 22:20:29 +01:00 committed by Christian Helmuth
parent 27b798fa4f
commit f2dab083f6

View File

@ -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; }