From 5229e83de58dbbf486e7aa7a169f30c5914479a4 Mon Sep 17 00:00:00 2001 From: churl Date: Mon, 23 May 2022 17:07:42 +0200 Subject: [PATCH] changed some clang-tidy warnings --- c_os/devices/CGA.cc | 6 +++--- c_os/kernel/interrupts/IntDispatcher.cc | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/c_os/devices/CGA.cc b/c_os/devices/CGA.cc index a424efa..61a9e99 100755 --- a/c_os/devices/CGA.cc +++ b/c_os/devices/CGA.cc @@ -187,7 +187,7 @@ unsigned char CGA::attribute(CGA::color bg, CGA::color fg, bool blink) { /* Hier muess Code eingefuegt werden */ - return static_cast(blink) << 7 // B0000000 - | (bg & 0x7) << 4 // 0HHH0000 (Hintergrund) - | (fg & 0xF); // 0000VVVV (Vordergrund) + return (int)blink << 7 // B0000000 + | (bg & 0x7) << 4 // 0HHH0000 (Hintergrund) + | (fg & 0xF); // 0000VVVV (Vordergrund) } diff --git a/c_os/kernel/interrupts/IntDispatcher.cc b/c_os/kernel/interrupts/IntDispatcher.cc index 26f2d22..af807b2 100755 --- a/c_os/kernel/interrupts/IntDispatcher.cc +++ b/c_os/kernel/interrupts/IntDispatcher.cc @@ -63,12 +63,12 @@ int IntDispatcher::assign(unsigned int vector, ISR& isr) { /* hier muss Code eingefuegt werden */ if (vector >= this->size) { - if constexpr (DEBUG) kout << "Invalid vector number when assigning" << endl; + if constexpr (DEBUG) { kout << "Invalid vector number when assigning" << endl; } return -1; } this->map[vector] = &isr; - if constexpr (DEBUG) kout << "Registered ISR for vector " << dec << vector << endl; + if constexpr (DEBUG) { kout << "Registered ISR for vector " << dec << vector << endl; } return 0; }