diff --git a/kernel/CMakeLists.txt b/kernel/CMakeLists.txt index b26d0c163f..795d072091 100644 --- a/kernel/CMakeLists.txt +++ b/kernel/CMakeLists.txt @@ -148,7 +148,7 @@ target_compile_definitions(kernel PUBLIC __arch=${BANAN_ARCH}) target_compile_options(kernel PUBLIC -O2 -g) target_compile_options(kernel PUBLIC $<$:-Wno-literal-suffix -fno-rtti -fno-exceptions>) target_compile_options(kernel PUBLIC -fmacro-prefix-map=${CMAKE_CURRENT_SOURCE_DIR}=.) -target_compile_options(kernel PUBLIC -fstack-protector -ffreestanding -Wall -Werror=return-type -Wstack-usage=1024 -fno-omit-frame-pointer -mgeneral-regs-only) +target_compile_options(kernel PUBLIC -fstack-protector -ffreestanding -Wall -Wextra -Werror -Wstack-usage=1024 -fno-omit-frame-pointer -mgeneral-regs-only) # This might not work with other toolchains target_compile_options(kernel PUBLIC $<$:-Wno-invalid-offsetof>) diff --git a/kernel/kernel/Device/FramebufferDevice.cpp b/kernel/kernel/Device/FramebufferDevice.cpp index 3f2b5de64a..c2ae7e8803 100644 --- a/kernel/kernel/Device/FramebufferDevice.cpp +++ b/kernel/kernel/Device/FramebufferDevice.cpp @@ -233,6 +233,7 @@ namespace Kernel virtual BAN::ErrorOr> clone(PageTable& new_page_table) override { + (void)new_page_table; return BAN::Error::from_errno(ENOTSUP); } @@ -275,4 +276,4 @@ namespace Kernel return BAN::UniqPtr(BAN::move(region)); } -} \ No newline at end of file +} diff --git a/kernel/kernel/FS/TmpFS/FileSystem.cpp b/kernel/kernel/FS/TmpFS/FileSystem.cpp index 4bc9d1771c..1754dc4fed 100644 --- a/kernel/kernel/FS/TmpFS/FileSystem.cpp +++ b/kernel/kernel/FS/TmpFS/FileSystem.cpp @@ -197,7 +197,7 @@ namespace Kernel LockGuard _(m_lock); size_t result = first_data_page; - TRY(for_each_indirect_paddr_allocating(m_data_pages, [&] (paddr_t paddr, bool allocated) { + TRY(for_each_indirect_paddr_allocating(m_data_pages, [&] (paddr_t, bool allocated) { if (allocated) return BAN::Iteration::Break; result++; diff --git a/kernel/kernel/Memory/FileBackedRegion.cpp b/kernel/kernel/Memory/FileBackedRegion.cpp index 1d09795b0d..6b6a001c8c 100644 --- a/kernel/kernel/Memory/FileBackedRegion.cpp +++ b/kernel/kernel/Memory/FileBackedRegion.cpp @@ -194,7 +194,7 @@ namespace Kernel return true; } - BAN::ErrorOr> FileBackedRegion::clone(PageTable& new_page_table) + BAN::ErrorOr> FileBackedRegion::clone(PageTable&) { ASSERT_NOT_REACHED(); } diff --git a/kernel/kernel/Memory/kmalloc.cpp b/kernel/kernel/Memory/kmalloc.cpp index eb3fa32ce0..6244361b66 100644 --- a/kernel/kernel/Memory/kmalloc.cpp +++ b/kernel/kernel/Memory/kmalloc.cpp @@ -289,8 +289,11 @@ static constexpr bool is_power_of_two(size_t value) return (value & (value - 1)) == 0; } -void* kmalloc(size_t size, size_t align, bool force_indentity_map) +void* kmalloc(size_t size, size_t align, bool force_identity_map) { + // currently kmalloc is always identity mapped + (void)force_identity_map; + const kmalloc_info& info = s_kmalloc_info; ASSERT(is_power_of_two(align));