From b2a4658349ba5177f825d039aff136909544a2d4 Mon Sep 17 00:00:00 2001 From: Hudd Date: Fri, 22 Mar 2024 13:46:39 +0400 Subject: [PATCH] io: cleanup --- io/include/aw/io/mmap_file.h | 2 +- io/win32/file.c++ | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/io/include/aw/io/mmap_file.h b/io/include/aw/io/mmap_file.h index 99e24a3c..98469732 100644 --- a/io/include/aw/io/mmap_file.h +++ b/io/include/aw/io/mmap_file.h @@ -123,7 +123,7 @@ struct mmap_file { : _file{fd} { if (!ec) - create_mapping( ec, perms ); + create_mapping( ec, perms ); } mmap_file(fs::path const& path, map_perms perms = map_perms::rdwr) diff --git a/io/win32/file.c++ b/io/win32/file.c++ index a316fc9d..03e60efc 100644 --- a/io/win32/file.c++ +++ b/io/win32/file.c++ @@ -7,6 +7,7 @@ * There is NO WARRANTY, to the extent permitted by law. */ #include +#include #include "winapi_helpers.h" #include "path.h" namespace aw { @@ -41,6 +42,8 @@ int get_openmode( file_mode mode ) case fm::exclusive: case fm::none: return OPEN_EXISTING; + default: + assert(!"unreachable"); }; } } // namespace