From b4ff67c8a9bebd99eb3c06ea141fe0f1b8feb5a4 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Mon, 22 Dec 2025 14:53:33 +0100 Subject: chore: clean up linter warnings --- arch/x86_64/include/x86_64/cpu/control_register.hpp | 1 + arch/x86_64/include/x86_64/cpu/registers.hpp | 2 ++ arch/x86_64/include/x86_64/memory/kernel_mapper.hpp | 1 + arch/x86_64/include/x86_64/memory/recursive_page_mapper.hpp | 2 ++ arch/x86_64/include/x86_64/vga/crtc.hpp | 2 -- arch/x86_64/src/kapi/cio.cpp | 1 - arch/x86_64/src/kapi/memory.cpp | 10 ++++------ 7 files changed, 10 insertions(+), 9 deletions(-) (limited to 'arch/x86_64') diff --git a/arch/x86_64/include/x86_64/cpu/control_register.hpp b/arch/x86_64/include/x86_64/cpu/control_register.hpp index e626b3b..9c3bad5 100644 --- a/arch/x86_64/include/x86_64/cpu/control_register.hpp +++ b/arch/x86_64/include/x86_64/cpu/control_register.hpp @@ -10,6 +10,7 @@ #include #include #include +#include namespace teachos::cpu::x86_64 { diff --git a/arch/x86_64/include/x86_64/cpu/registers.hpp b/arch/x86_64/include/x86_64/cpu/registers.hpp index 8eb89e3..3ddd539 100644 --- a/arch/x86_64/include/x86_64/cpu/registers.hpp +++ b/arch/x86_64/include/x86_64/cpu/registers.hpp @@ -1,6 +1,8 @@ #ifndef TEACHOS_X86_64_CPU_REGISTERS_HPP #define TEACHOS_X86_64_CPU_REGISTERS_HPP +#include "kapi/memory.hpp" + #include "x86_64/cpu/control_register.hpp" // IWYU pragma: export #include "x86_64/cpu/model_specific_register.hpp" // IWYU pragma: export diff --git a/arch/x86_64/include/x86_64/memory/kernel_mapper.hpp b/arch/x86_64/include/x86_64/memory/kernel_mapper.hpp index 5b9c2fd..c393d73 100644 --- a/arch/x86_64/include/x86_64/memory/kernel_mapper.hpp +++ b/arch/x86_64/include/x86_64/memory/kernel_mapper.hpp @@ -7,6 +7,7 @@ #include #include +#include #include namespace teachos::memory::x86_64 diff --git a/arch/x86_64/include/x86_64/memory/recursive_page_mapper.hpp b/arch/x86_64/include/x86_64/memory/recursive_page_mapper.hpp index dc52065..819f404 100644 --- a/arch/x86_64/include/x86_64/memory/recursive_page_mapper.hpp +++ b/arch/x86_64/include/x86_64/memory/recursive_page_mapper.hpp @@ -3,6 +3,8 @@ #include "kapi/memory.hpp" +#include + namespace teachos::memory::x86_64 { diff --git a/arch/x86_64/include/x86_64/vga/crtc.hpp b/arch/x86_64/include/x86_64/vga/crtc.hpp index d4b4f51..fde69c2 100644 --- a/arch/x86_64/include/x86_64/vga/crtc.hpp +++ b/arch/x86_64/include/x86_64/vga/crtc.hpp @@ -12,13 +12,11 @@ namespace teachos::vga::x86_64::crtc /** * @brief The address port of the CRT Controller. */ - // NOLINTNEXTLINE(cppcoreguidelines-avoid-magic-numbers) using address = io::port<0x3d4, std::byte, io::port_write>; /** * @brief The data port of the CRT Controller. */ - // NOLINTNEXTLINE(cppcoreguidelines-avoid-magic-numbers) using data = io::port<0x3d5, std::byte, io::port_read, io::port_write>; namespace registers diff --git a/arch/x86_64/src/kapi/cio.cpp b/arch/x86_64/src/kapi/cio.cpp index ade02aa..617146e 100644 --- a/arch/x86_64/src/kapi/cio.cpp +++ b/arch/x86_64/src/kapi/cio.cpp @@ -7,7 +7,6 @@ namespace teachos::cio { - // NOLINTNEXTLINE(cppcoreguidelines-avoid-non-const-global-variables) auto static constinit vga_device = std::optional{}; auto init() -> void diff --git a/arch/x86_64/src/kapi/memory.cpp b/arch/x86_64/src/kapi/memory.cpp index 5234110..73ee669 100644 --- a/arch/x86_64/src/kapi/memory.cpp +++ b/arch/x86_64/src/kapi/memory.cpp @@ -148,13 +148,11 @@ namespace teachos::memory } } - } // namespace + auto constinit region_based_allocator = std::optional{}; + auto constinit buffered_allocator = std::optional>{}; + auto constinit recursive_page_mapper = std::optional{}; - // NOLINTBEGIN(cppcoreguidelines-avoid-non-const-global-variables) - auto constinit region_based_allocator = std::optional{}; - auto constinit buffered_allocator = std::optional>{}; - auto constinit recursive_page_mapper = std::optional{}; - // NOLINTEND(cppcoreguidelines-avoid-non-const-global-variables) + } // namespace auto init() -> void { -- cgit v1.2.3