From 6e85484e373ff2943cc70148aed0fd95264f5818 Mon Sep 17 00:00:00 2001 From: Uwe Seimet Date: Tue, 10 Dec 2024 11:50:42 +0100 Subject: [PATCH] Fix Sonar issues --- cpp/base/primary_device.cpp | 4 ++-- cpp/base/primary_device.h | 4 ++-- cpp/devices/tape.cpp | 2 +- cpp/devices/tape.h | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cpp/base/primary_device.cpp b/cpp/base/primary_device.cpp index ca1908ce..0ac3c1c4 100644 --- a/cpp/base/primary_device.cpp +++ b/cpp/base/primary_device.cpp @@ -184,7 +184,7 @@ void PrimaryDevice::Inquiry() DataInPhase(allocation_length); } -void PrimaryDevice::ReportLuns() +void PrimaryDevice::ReportLuns() const { // Only SELECT REPORT mode 0 is supported if (GetCdbByte(2)) { @@ -244,7 +244,7 @@ void PrimaryDevice::RequestSense() DataInPhase(length); } -void PrimaryDevice::SendDiagnostic() +void PrimaryDevice::SendDiagnostic() const { // Do not support parameter list if (GetCdbByte(3) || GetCdbByte(4)) { diff --git a/cpp/base/primary_device.h b/cpp/base/primary_device.h index 891fb76a..b0e3ac92 100644 --- a/cpp/base/primary_device.h +++ b/cpp/base/primary_device.h @@ -110,7 +110,7 @@ class PrimaryDevice : public Device virtual void Inquiry(); virtual void RequestSense(); - void SendDiagnostic(); + void SendDiagnostic() const; void ReserveUnit(); void ReleaseUnit(); @@ -187,7 +187,7 @@ class PrimaryDevice : public Device void SetController(AbstractController*); void TestUnitReady(); - void ReportLuns(); + void ReportLuns() const; vector HandleRequestSense() const; diff --git a/cpp/devices/tape.cpp b/cpp/devices/tape.cpp index a2cf54a8..6492c86d 100644 --- a/cpp/devices/tape.cpp +++ b/cpp/devices/tape.cpp @@ -419,7 +419,7 @@ void Tape::Erase6() StatusPhase(); } -void Tape::ReadBlockLimits() +void Tape::ReadBlockLimits() const { SetInt32(GetController()->GetBuffer(), 0, 0xffffff); SetInt16(GetController()->GetBuffer(), 4, 4); diff --git a/cpp/devices/tape.h b/cpp/devices/tape.h index fdb29c93..c701ee37 100644 --- a/cpp/devices/tape.h +++ b/cpp/devices/tape.h @@ -73,7 +73,7 @@ class Tape : public StorageDevice void Read6(); void Write6(); void Erase6(); - void ReadBlockLimits(); + void ReadBlockLimits() const; void Rewind(); void Space6(); void WriteFilemarks(bool);