From 32cb245cb8e0cc4b020ea00f7659a72ffbcbd052 Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Mon, 4 Mar 2024 13:56:20 +0100 Subject: [PATCH] ahci: enable conversion error checking Fixes #5134 --- repos/os/src/drivers/ahci/ata_protocol.h | 4 ++-- repos/os/src/drivers/ahci/target.mk | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/repos/os/src/drivers/ahci/ata_protocol.h b/repos/os/src/drivers/ahci/ata_protocol.h index b8abccb9d2..c99e5f3197 100644 --- a/repos/os/src/drivers/ahci/ata_protocol.h +++ b/repos/os/src/drivers/ahci/ata_protocol.h @@ -312,8 +312,8 @@ class Ata::Protocol : public Ahci::Protocol, Noncopyable *r = request; - size_t slot = _slots.index(*r); - _slot_states |= 1u << slot; + auto const slot = unsigned(_slots.index(*r)); + _slot_states |= 1u << slot; /* setup fis */ Command_table table(port.command_table_range(slot), diff --git a/repos/os/src/drivers/ahci/target.mk b/repos/os/src/drivers/ahci/target.mk index 7d22e9a0dd..6b73696a0b 100644 --- a/repos/os/src/drivers/ahci/target.mk +++ b/repos/os/src/drivers/ahci/target.mk @@ -3,6 +3,4 @@ SRC_CC += main.cc INC_DIR += $(PRG_DIR) LIBS += base -CC_CXX_WARN_STRICT_CONVERSION = - vpath %.cc $(PRG_DIR)