mirror of
https://github.com/akuker/RASCSI.git
synced 2024-12-24 12:30:20 +00:00
Fix clang warnings (#423)
* Fixed clang compiler warnings * Removed unused code * Reset compiler
This commit is contained in:
parent
817c1cde31
commit
f7ec0de834
@ -88,14 +88,14 @@ public:
|
||||
SCSIDEV();
|
||||
~SCSIDEV();
|
||||
|
||||
void Reset(); // Device Reset
|
||||
void Reset() override;
|
||||
|
||||
// External API
|
||||
BUS::phase_t Process(); // Run
|
||||
BUS::phase_t Process() override;
|
||||
|
||||
// Other
|
||||
bool IsSASI() const { return false; } // SASI Check
|
||||
bool IsSCSI() const { return true; } // SCSI check
|
||||
bool IsSASI() const override { return false; }
|
||||
bool IsSCSI() const override { return true; }
|
||||
|
||||
void Error(ERROR_CODES::sense_key sense_key = ERROR_CODES::sense_key::NO_SENSE,
|
||||
ERROR_CODES::asc asc = ERROR_CODES::asc::NO_ADDITIONAL_SENSE_INFORMATION) override; // Common error handling
|
||||
@ -103,20 +103,20 @@ public:
|
||||
private:
|
||||
|
||||
// Phase
|
||||
void BusFree(); // Bus free phase
|
||||
void Selection(); // Selection phase
|
||||
void Execute(); // Execution phase
|
||||
void BusFree() override; // Bus free phase
|
||||
void Selection() override; // Selection phase
|
||||
void Execute() override; // Execution phase
|
||||
void MsgOut(); // Message out phase
|
||||
|
||||
// commands
|
||||
void CmdGetEventStatusNotification();
|
||||
void CmdModeSelect10(); // MODE SELECT(10) command
|
||||
void CmdModeSense10(); // MODE SENSE(10) command
|
||||
void CmdModeSelect10();
|
||||
void CmdModeSense10();
|
||||
|
||||
// Data transfer
|
||||
void Send(); // Send data
|
||||
void Receive(); // Receive data
|
||||
bool XferMsg(DWORD msg); // Data transfer message
|
||||
void Send() override;
|
||||
void Receive() override;
|
||||
bool XferMsg(DWORD msg);
|
||||
|
||||
scsi_t scsi; // Internal data
|
||||
};
|
||||
|
@ -82,18 +82,18 @@ public:
|
||||
virtual void TestUnitReady(SASIDEV *) override;
|
||||
void Inquiry(SASIDEV *) override;
|
||||
void RequestSense(SASIDEV *) override;
|
||||
void ModeSelect6(SASIDEV *);
|
||||
void ModeSelect10(SASIDEV *);
|
||||
void ModeSense6(SASIDEV *);
|
||||
void ModeSense10(SASIDEV *);
|
||||
void ModeSelect6(SASIDEV *) override;
|
||||
void ModeSelect10(SASIDEV *) override;
|
||||
void ModeSense6(SASIDEV *) override;
|
||||
void ModeSense10(SASIDEV *) override;
|
||||
void Rezero(SASIDEV *);
|
||||
void FormatUnit(SASIDEV *) override;
|
||||
void ReassignBlocks(SASIDEV *);
|
||||
void StartStopUnit(SASIDEV *);
|
||||
void SendDiagnostic(SASIDEV *);
|
||||
void ReassignBlocks(SASIDEV *) override;
|
||||
void StartStopUnit(SASIDEV *) override;
|
||||
void SendDiagnostic(SASIDEV *) override;
|
||||
void PreventAllowMediumRemoval(SASIDEV *);
|
||||
void SynchronizeCache10(SASIDEV *);
|
||||
void SynchronizeCache16(SASIDEV *);
|
||||
void SynchronizeCache10(SASIDEV *) override;
|
||||
void SynchronizeCache16(SASIDEV *) override;
|
||||
void ReadDefectData10(SASIDEV *);
|
||||
virtual void Read6(SASIDEV *);
|
||||
void Read10(SASIDEV *) override;
|
||||
|
@ -31,7 +31,7 @@ public:
|
||||
~SASIHD() {};
|
||||
|
||||
void Reset();
|
||||
void Open(const Filepath& path);
|
||||
void Open(const Filepath& path) override;
|
||||
|
||||
// Commands
|
||||
int RequestSense(const DWORD *cdb, BYTE *buf) override;
|
||||
|
@ -83,7 +83,7 @@ public:
|
||||
void SetMcastAddr(SASIDEV *);
|
||||
void EnableInterface(SASIDEV *);
|
||||
|
||||
bool Dispatch(SCSIDEV *);
|
||||
bool Dispatch(SCSIDEV *) override;
|
||||
|
||||
const int DAYNAPORT_BUFFER_SIZE = 0x1000000;
|
||||
|
||||
|
@ -1066,10 +1066,8 @@ void SCSIBR::FS_GetCapacity(BYTE *buf)
|
||||
ASSERT(fs);
|
||||
ASSERT(buf);
|
||||
|
||||
int i = 0;
|
||||
DWORD *dp = (DWORD*)buf;
|
||||
DWORD nUnit = ntohl(*dp);
|
||||
i += sizeof(DWORD);
|
||||
|
||||
Human68k::capacity_t cap;
|
||||
fsresult = fs->GetCapacity(nUnit, &cap);
|
||||
@ -1099,7 +1097,6 @@ void SCSIBR::FS_CtrlDrive(BYTE *buf)
|
||||
i += sizeof(DWORD);
|
||||
|
||||
Human68k::ctrldrive_t *pCtrlDrive = (Human68k::ctrldrive_t*)&buf[i];
|
||||
i += sizeof(Human68k::ctrldrive_t);
|
||||
|
||||
fsresult = fs->CtrlDrive(nUnit, pCtrlDrive);
|
||||
|
||||
@ -1117,10 +1114,8 @@ void SCSIBR::FS_GetDPB(BYTE *buf)
|
||||
ASSERT(fs);
|
||||
ASSERT(buf);
|
||||
|
||||
int i = 0;
|
||||
DWORD *dp = (DWORD*)buf;
|
||||
DWORD nUnit = ntohl(*dp);
|
||||
i += sizeof(DWORD);
|
||||
|
||||
Human68k::dpb_t dpb;
|
||||
fsresult = fs->GetDPB(nUnit, &dpb);
|
||||
@ -1173,10 +1168,8 @@ void SCSIBR::FS_DiskWrite(BYTE *buf)
|
||||
ASSERT(fs);
|
||||
ASSERT(buf);
|
||||
|
||||
int i = 0;
|
||||
DWORD *dp = (DWORD*)buf;
|
||||
DWORD nUnit = ntohl(*dp);
|
||||
i += sizeof(DWORD);
|
||||
|
||||
fsresult = fs->DiskWrite(nUnit);
|
||||
}
|
||||
@ -1238,10 +1231,8 @@ void SCSIBR::FS_Flush(BYTE *buf)
|
||||
ASSERT(fs);
|
||||
ASSERT(buf);
|
||||
|
||||
int i = 0;
|
||||
DWORD *dp = (DWORD*)buf;
|
||||
DWORD nUnit = ntohl(*dp);
|
||||
i += sizeof(DWORD);
|
||||
|
||||
fsresult = fs->Flush(nUnit);
|
||||
}
|
||||
@ -1256,10 +1247,8 @@ void SCSIBR::FS_CheckMedia(BYTE *buf)
|
||||
ASSERT(fs);
|
||||
ASSERT(buf);
|
||||
|
||||
int i = 0;
|
||||
DWORD *dp = (DWORD*)buf;
|
||||
DWORD nUnit = ntohl(*dp);
|
||||
i += sizeof(DWORD);
|
||||
|
||||
fsresult = fs->CheckMedia(nUnit);
|
||||
}
|
||||
@ -1274,10 +1263,8 @@ void SCSIBR::FS_Lock(BYTE *buf)
|
||||
ASSERT(fs);
|
||||
ASSERT(buf);
|
||||
|
||||
int i = 0;
|
||||
DWORD *dp = (DWORD*)buf;
|
||||
DWORD nUnit = ntohl(*dp);
|
||||
i += sizeof(DWORD);
|
||||
|
||||
fsresult = fs->Lock(nUnit);
|
||||
}
|
||||
|
@ -108,8 +108,8 @@ private:
|
||||
void OpenIso(const Filepath& path); // Open(ISO)
|
||||
void OpenPhysical(const Filepath& path); // Open(Physical)
|
||||
|
||||
void ReadToc(SASIDEV *);
|
||||
void GetEventStatusNotification(SASIDEV *);
|
||||
void ReadToc(SASIDEV *) override;
|
||||
void GetEventStatusNotification(SASIDEV *) override;
|
||||
|
||||
void LBAtoMSF(DWORD lba, BYTE *msf) const; // LBA→MSF conversion
|
||||
|
||||
|
@ -28,7 +28,7 @@ public:
|
||||
void FinalizeSetup(const Filepath&, off_t);
|
||||
|
||||
void Reset();
|
||||
virtual void Open(const Filepath&);
|
||||
virtual void Open(const Filepath&) override;
|
||||
|
||||
// Commands
|
||||
virtual int Inquiry(const DWORD *cdb, BYTE *buf) override;
|
||||
|
@ -25,7 +25,7 @@ public:
|
||||
SCSIMO();
|
||||
~SCSIMO() {};
|
||||
|
||||
void Open(const Filepath& path);
|
||||
void Open(const Filepath& path) override;
|
||||
|
||||
// Commands
|
||||
int Inquiry(const DWORD *cdb, BYTE *buf) override;
|
||||
|
Loading…
Reference in New Issue
Block a user