aboutsummaryrefslogtreecommitdiff
path: root/kernel/src
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@ost.ch>2025-12-22 14:53:33 +0100
committerFelix Morgner <felix.morgner@ost.ch>2025-12-22 14:53:33 +0100
commitb4ff67c8a9bebd99eb3c06ea141fe0f1b8feb5a4 (patch)
tree3730f8ea9c880d97e3a63426fac9939976c39921 /kernel/src
parent5c01134b95fc83b485720c3d06ef0284e4ba8568 (diff)
downloadteachos-b4ff67c8a9bebd99eb3c06ea141fe0f1b8feb5a4.tar.xz
teachos-b4ff67c8a9bebd99eb3c06ea141fe0f1b8feb5a4.zip
chore: clean up linter warnings
Diffstat (limited to 'kernel/src')
-rw-r--r--kernel/src/kapi/cio.cpp3
-rw-r--r--kernel/src/kapi/memory.cpp6
-rw-r--r--kernel/src/kstd/print.cpp1
3 files changed, 3 insertions, 7 deletions
diff --git a/kernel/src/kapi/cio.cpp b/kernel/src/kapi/cio.cpp
index fd5ad0d..01c6420 100644
--- a/kernel/src/kapi/cio.cpp
+++ b/kernel/src/kapi/cio.cpp
@@ -17,8 +17,7 @@ namespace teachos::cio
constinit null_device null_device::instance;
} // namespace
- // NOLINTNEXTLINE(cppcoreguidelines-avoid-non-const-global-variables)
- constinit auto active_device = static_cast<output_device *>(&null_device::instance);
+ constinit auto static active_device = static_cast<output_device *>(&null_device::instance);
auto set_output_device(output_device & device) -> std::optional<output_device *>
{
diff --git a/kernel/src/kapi/memory.cpp b/kernel/src/kapi/memory.cpp
index d6c84e1..2f707ec 100644
--- a/kernel/src/kapi/memory.cpp
+++ b/kernel/src/kapi/memory.cpp
@@ -50,10 +50,8 @@ namespace teachos::memory
constinit bad_page_mapper bad_page_mapper::instance{};
} // namespace
- // NOLINTNEXTLINE(cppcoreguidelines-avoid-non-const-global-variables)
- constinit auto active_frame_allocator = static_cast<frame_allocator *>(&bad_frame_allocator::instance);
- // NOLINTNEXTLINE(cppcoreguidelines-avoid-non-const-global-variables)
- constinit auto active_page_mapper = static_cast<page_mapper *>(&bad_page_mapper::instance);
+ constinit auto static active_frame_allocator = static_cast<frame_allocator *>(&bad_frame_allocator::instance);
+ constinit auto static active_page_mapper = static_cast<page_mapper *>(&bad_page_mapper::instance);
auto set_frame_allocator(frame_allocator & allocator) -> std::optional<frame_allocator *>
{
diff --git a/kernel/src/kstd/print.cpp b/kernel/src/kstd/print.cpp
index c70f031..2665b9a 100644
--- a/kernel/src/kstd/print.cpp
+++ b/kernel/src/kstd/print.cpp
@@ -102,7 +102,6 @@ namespace kstd::os
{
while (current != end && *current >= '0' && *current <= '9')
{
- // NOLINTNEXTLINE(cppcoreguidelines-avoid-magic-numbers)
index = index * 10 + static_cast<std::size_t>(*current - '0');
std::advance(current, 1);
}