From 5cbc734081dc5ddc1e3c012a70fd4877e32b6bc3 Mon Sep 17 00:00:00 2001 From: Andrew Kaster Date: Mon, 3 Jan 2022 02:58:56 -0700 Subject: [PATCH] SystemMonitor: Remove unused functions and enable warning globally These two helpers were the only unused functions clang could detect in the entire codebase. Now that's commitment to no dead code :^) --- CMakeLists.txt | 1 - .../Applications/SystemMonitor/MemoryStatsWidget.cpp | 10 ---------- 2 files changed, 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f321f37a7c4..46903ac993c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -201,7 +201,6 @@ elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang$") add_compile_options(-Wno-null-pointer-subtraction) add_compile_options(-Wno-unneeded-internal-declaration) add_compile_options(-Wno-unused-const-variable) - add_compile_options(-Wno-unused-function) add_compile_options(-Wno-unused-private-field) add_compile_options(-fno-aligned-allocation) add_compile_options(-fconstexpr-steps=16777216) diff --git a/Userland/Applications/SystemMonitor/MemoryStatsWidget.cpp b/Userland/Applications/SystemMonitor/MemoryStatsWidget.cpp index a197e1eadb7..4c87363484e 100644 --- a/Userland/Applications/SystemMonitor/MemoryStatsWidget.cpp +++ b/Userland/Applications/SystemMonitor/MemoryStatsWidget.cpp @@ -67,16 +67,6 @@ static inline u64 page_count_to_bytes(size_t count) return count * 4096; } -static inline u64 page_count_to_kb(u64 count) -{ - return page_count_to_bytes(count) / 1024; -} - -static inline u64 bytes_to_kb(u64 bytes) -{ - return bytes / 1024; -} - void MemoryStatsWidget::refresh() { auto proc_memstat = Core::File::construct("/proc/memstat");