Address SonarQube issues

This commit is contained in:
Uwe Seimet 2023-10-02 10:33:54 +02:00
parent 1d5efa35b5
commit f13ccbe166
4 changed files with 4 additions and 4 deletions

View File

@ -30,7 +30,7 @@ DiskCache::DiskCache(const string& path, int size, uint32_t blocks, off_t imgoff
bool DiskCache::Save() const
{
// Save valid tracks
return none_of(cache.begin(), cache.end(), [this](const cache_t& c)
return ranges::none_of(cache.begin(), cache.end(), [this](const cache_t& c)
{ return c.disktrk != nullptr && !c.disktrk->Save(sec_path); });
}

View File

@ -596,7 +596,7 @@ void Piscsi::ShutDown(AbstractController::piscsi_shutdown_mode shutdown_mode)
{
CleanUp();
switch(shutdown_mode) { //NOSONAR using enum is not supported by the bullseye compiler
switch(shutdown_mode) {
case AbstractController::piscsi_shutdown_mode::STOP_PISCSI:
spdlog::info("PiSCSI shutdown requested");
break;

View File

@ -96,7 +96,7 @@ TEST(PhaseHandlerTest, Phases)
}
TEST(PhaseHandlerTest, ProcessPhase)
{ //NOSONAR using enum is not supported by the bullseye clang++ compiler
{
MockPhaseHandler handler;
handler.SetPhase(phase_t::selection);

View File

@ -90,7 +90,7 @@ TEST(PrimaryDeviceTest, CheckReservation)
}
TEST(PrimaryDeviceTest, ReserveReleaseUnit)
{ //NOSONAR using enum is not supported by the bullseye clang++ compiler
{
auto [controller, device] = CreatePrimaryDevice();
device->Dispatch(scsi_command::eCmdReserve6);