From 0e7a86880e946b01c006d95d2408ef9219f96d95 Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Mon, 20 Jul 2020 07:47:12 +0100 Subject: [PATCH] Fix unused code. --- Aaru.Checksums | 2 +- Aaru.CommonTypes | 2 +- Aaru.Compression/TeleDiskLzh.cs | 1 - .../Devices/Dumping/CompactDisc/Error.cs | 9 +++-- .../Devices/Dumping/CompactDisc/LeadOuts.cs | 34 ++++++++---------- .../Devices/Dumping/CompactDisc/Pregap.cs | 12 +++---- Aaru.Core/Devices/Dumping/MiniDisc.cs | 6 ++-- .../PlayStationPortable/MemoryStick.cs | 2 +- .../Dumping/PlayStationPortable/UMD.cs | 2 +- Aaru.Core/Devices/Dumping/SBC.cs | 2 +- Aaru.Core/Devices/ReaderATA.cs | 8 ++--- Aaru.Core/Devices/Report/Scsi.cs | 2 +- Aaru.Core/Entropy.cs | 4 +-- Aaru.Core/Error.cs | 4 --- Aaru.Core/Media/Detection/MMC.cs | 5 +-- Aaru.Core/Media/Info/CompactDisc.cs | 5 +-- Aaru.Devices/Windows/Usb.cs | 1 + Aaru.Filesystems/APFS.cs | 2 ++ Aaru.Filesystems/AppleHFS/Consts.cs | 3 ++ Aaru.Filesystems/AppleHFS/Structs.cs | 2 ++ Aaru.Filesystems/AppleMFS/Consts.cs | 3 ++ Aaru.Filesystems/AppleMFS/Info.cs | 2 -- Aaru.Filesystems/AtheOS.cs | 2 ++ Aaru.Filesystems/BFS.cs | 2 ++ Aaru.Filesystems/CPM/CPM.cs | 4 +-- Aaru.Filesystems/CPM/Structs.cs | 2 ++ Aaru.Filesystems/CPM/Super.cs | 5 ++- Aaru.Filesystems/Cram.cs | 4 +++ Aaru.Filesystems/F2FS.cs | 1 + Aaru.Filesystems/FAT/Consts.cs | 2 ++ Aaru.Filesystems/FAT/Info.cs | 3 +- Aaru.Filesystems/FAT/Structs.cs | 4 +++ Aaru.Filesystems/FAT/Xattr.cs | 2 +- Aaru.Filesystems/FATX/Consts.cs | 2 ++ Aaru.Filesystems/HPOFS/Structs.cs | 2 ++ Aaru.Filesystems/ISO9660/Consts/AAIP.cs | 4 +++ Aaru.Filesystems/ISO9660/Consts/Amiga.cs | 2 ++ Aaru.Filesystems/ISO9660/Consts/CDi.cs | 2 ++ Aaru.Filesystems/ISO9660/Consts/ElTorito.cs | 2 ++ Aaru.Filesystems/ISO9660/Consts/ISO.cs | 2 ++ Aaru.Filesystems/ISO9660/Consts/Internal.cs | 2 ++ Aaru.Filesystems/ISO9660/Consts/RRIP.cs | 2 ++ Aaru.Filesystems/ISO9660/Consts/SUSP.cs | 5 +++ Aaru.Filesystems/ISO9660/Consts/XA.cs | 2 ++ Aaru.Filesystems/ISO9660/Consts/Ziso.cs | 3 ++ Aaru.Filesystems/ISO9660/File.cs | 2 +- Aaru.Filesystems/ISO9660/ISO9660.cs | 2 ++ Aaru.Filesystems/ISO9660/Info.cs | 2 +- Aaru.Filesystems/ISO9660/Structs/ISO.cs | 2 ++ Aaru.Filesystems/ISO9660/Structs/RRIP.cs | 2 ++ Aaru.Filesystems/ISO9660/Structs/SUSP.cs | 2 ++ Aaru.Filesystems/ISO9660/Structs/Ziso.cs | 2 ++ Aaru.Filesystems/ISO9660/Super.cs | 2 +- Aaru.Filesystems/JFS.cs | 2 ++ Aaru.Filesystems/LisaFS/Consts.cs | 3 ++ Aaru.Filesystems/LisaFS/Structs.cs | 2 ++ Aaru.Filesystems/Locus.cs | 3 ++ Aaru.Filesystems/MicroDOS.cs | 3 ++ Aaru.Filesystems/NILFS2.cs | 2 ++ Aaru.Filesystems/Opera/Consts.cs | 2 ++ Aaru.Filesystems/PFS.cs | 2 ++ Aaru.Filesystems/ProDOS.cs | 4 +++ Aaru.Filesystems/QNX4.cs | 2 ++ Aaru.Filesystems/SysV.cs | 5 ++- Aaru.Filesystems/UCSDPascal/Consts.cs | 3 ++ Aaru.Filesystems/UCSDPascal/Structs.cs | 3 ++ Aaru.Filesystems/UDF.cs | 2 ++ Aaru.Filesystems/VMfs.cs | 3 ++ Aaru.Filesystems/Xia.cs | 2 ++ Aaru.Filesystems/ZFS.cs | 3 +- Aaru.Filesystems/dump.cs | 2 +- Aaru.Filesystems/exFAT.cs | 2 ++ Aaru.Filesystems/ext2FS.cs | 1 + Aaru.Filters/AppleDouble.cs | 2 ++ Aaru.Filters/AppleSingle.cs | 2 ++ Aaru.Filters/PCExchange.cs | 2 ++ Aaru.Gui/App.xaml.cs | 3 ++ .../ViewModels/Panels/MediaInfoViewModel.cs | 3 +- Aaru.Gui/ViewModels/Tabs/AtaInfoViewModel.cs | 3 +- Aaru.Gui/ViewModels/Tabs/ScsiInfoViewModel.cs | 7 ++-- Aaru.Gui/ViewModels/Tabs/XboxInfoViewModel.cs | 3 +- .../Windows/ImageConvertViewModel.cs | 2 +- .../Windows/ImageEntropyViewModel.cs | 2 +- .../ViewModels/Windows/MediaScanViewModel.cs | 4 +-- Aaru.Helpers | 2 +- Aaru.Images/AaruFormat/AaruFormat.cs | 4 +-- Aaru.Images/AaruFormat/Constants.cs | 2 +- Aaru.Images/AaruFormat/Enums.cs | 2 ++ Aaru.Images/AaruFormat/Write.cs | 35 ++++++++----------- Aaru.Images/Apple2MG/Constants.cs | 3 ++ Aaru.Images/AppleNIB/Constants.cs | 3 ++ Aaru.Images/BLU/Write.cs | 4 +-- Aaru.Images/BlindWrite5/Enums.cs | 3 ++ Aaru.Images/CDRWin/Structs.cs | 2 ++ Aaru.Images/CHD/CHD.cs | 2 ++ Aaru.Images/CHD/Constants.cs | 3 ++ Aaru.Images/CHD/Enums.cs | 3 ++ Aaru.Images/CHD/Read.cs | 2 ++ Aaru.Images/CHD/Structs.cs | 2 ++ Aaru.Images/CopyQM/Constants.cs | 3 ++ Aaru.Images/D88/Constants.cs | 3 ++ Aaru.Images/D88/Enums.cs | 3 ++ Aaru.Images/DART/Constants.cs | 3 ++ Aaru.Images/DriDiskCopy/Enums.cs | 1 + Aaru.Images/HDCopy/HDCopy.cs | 2 ++ Aaru.Images/HDCopy/Structs.cs | 2 ++ Aaru.Images/IMD/Constants.cs | 3 ++ Aaru.Images/KryoFlux/Constants.cs | 3 ++ Aaru.Images/KryoFlux/Enums.cs | 3 ++ Aaru.Images/MaxiDisk/Enums.cs | 3 ++ Aaru.Images/NDIF/Constants.cs | 3 ++ Aaru.Images/NDIF/Structs.cs | 2 ++ Aaru.Images/Nero/Enums.cs | 1 + Aaru.Images/Nero/Structs.cs | 4 +++ Aaru.Images/Parallels/Constants.cs | 3 ++ Aaru.Images/Parallels/Parallels.cs | 2 ++ Aaru.Images/Partimage/Constants.cs | 3 ++ Aaru.Images/Partimage/Enums.cs | 3 ++ Aaru.Images/Partimage/Structs.cs | 2 ++ Aaru.Images/QCOW2/Constants.cs | 3 ++ Aaru.Images/QED/Constants.cs | 3 ++ Aaru.Images/RayDIM/Enums.cs | 1 + Aaru.Images/TeleDisk/Constants.cs | 3 ++ Aaru.Images/UDIF/Constants.cs | 3 ++ Aaru.Images/UkvFdi/Enums.cs | 2 ++ Aaru.Images/VDI/Enums.cs | 3 ++ Aaru.Images/VHD/Constants.cs | 3 ++ Aaru.Images/VHDX/Constants.cs | 2 ++ Aaru.Images/VHDX/VHDX.cs | 2 ++ Aaru.Images/VMware/Constants.cs | 3 ++ Aaru.Images/WCDiskImage/WCDiskImage.cs | 2 ++ Aaru.Partitions/AppleMap.cs | 2 ++ Aaru.Partitions/BSD.cs | 2 ++ Aaru.Partitions/DragonFlyBSD.cs | 2 ++ Aaru.Partitions/GPT.cs | 2 ++ Aaru.Partitions/MBR.cs | 2 ++ Aaru.Partitions/NeXT.cs | 2 ++ Aaru.Partitions/RDB.cs | 4 +++ Aaru.Partitions/VTOC.cs | 2 ++ Aaru.Partitions/Xbox.cs | 2 ++ Aaru.Settings/Settings.cs | 1 - Aaru.Tests/Filesystems/LFS.cs | 2 ++ Aaru.Tests/Filesystems/NWFS386.cs | 3 +- Aaru.Tests/Filesystems/OCFS2.cs | 2 ++ Aaru.Tests/Filters/AppleDoubleOsX.cs | 4 --- Aaru/Commands/Device/Info.cs | 2 +- Aaru/Commands/Image/Compare.cs | 3 -- Aaru/Commands/Image/Entropy.cs | 2 +- Aaru/Commands/Media/Info.cs | 6 ++-- 149 files changed, 344 insertions(+), 129 deletions(-) diff --git a/Aaru.Checksums b/Aaru.Checksums index c6f338a35..ea5097217 160000 --- a/Aaru.Checksums +++ b/Aaru.Checksums @@ -1 +1 @@ -Subproject commit c6f338a35f212572bb12c29ffef3b984318f6a41 +Subproject commit ea50972175d07e3306b859ebcaefd95661b9fb0c diff --git a/Aaru.CommonTypes b/Aaru.CommonTypes index 2748ee6b3..aeb3630d2 160000 --- a/Aaru.CommonTypes +++ b/Aaru.CommonTypes @@ -1 +1 @@ -Subproject commit 2748ee6b3226465ac7505d54023d886e4b1edfe9 +Subproject commit aeb3630d2608a37895a38626a08632f90d8d1eca diff --git a/Aaru.Compression/TeleDiskLzh.cs b/Aaru.Compression/TeleDiskLzh.cs index 7eb574edc..236b2129f 100644 --- a/Aaru.Compression/TeleDiskLzh.cs +++ b/Aaru.Compression/TeleDiskLzh.cs @@ -62,7 +62,6 @@ namespace Aaru.Compression const int N = 4096; /* Size of string buffer */ const int F = 60; /* Size of look-ahead buffer */ const int THRESHOLD = 2; - const int NIL = N; /* End of tree's node */ /* Huffman coding parameters */ diff --git a/Aaru.Core/Devices/Dumping/CompactDisc/Error.cs b/Aaru.Core/Devices/Dumping/CompactDisc/Error.cs index 120d5023e..430edee00 100644 --- a/Aaru.Core/Devices/Dumping/CompactDisc/Error.cs +++ b/Aaru.Core/Devices/Dumping/CompactDisc/Error.cs @@ -491,11 +491,10 @@ namespace Aaru.Core.Devices.Dumping Dictionary isrcs, ref string mcn, HashSet subchannelExtents, Dictionary smallestPregapLbaPerTrack) { - bool sense = true; // Sense indicator - byte[] cmdBuf = null; // Data buffer - double cmdDuration; // Command execution time - const uint sectorSize = 2352; // Full sector size - byte[] senseBuf = null; // Sense buffer + bool sense = true; // Sense indicator + byte[] cmdBuf = null; // Data buffer + double cmdDuration; // Command execution time + byte[] senseBuf = null; // Sense buffer PlextorSubchannel supportedPlextorSubchannel; if(supportedSubchannel == MmcSubchannel.None || diff --git a/Aaru.Core/Devices/Dumping/CompactDisc/LeadOuts.cs b/Aaru.Core/Devices/Dumping/CompactDisc/LeadOuts.cs index 84f1a1adf..117af4083 100644 --- a/Aaru.Core/Devices/Dumping/CompactDisc/LeadOuts.cs +++ b/Aaru.Core/Devices/Dumping/CompactDisc/LeadOuts.cs @@ -50,7 +50,6 @@ namespace Aaru.Core.Devices.Dumping partial class Dump { /// Dumps inter-session lead-outs - /// Total number of positive sectors /// Size of the read sector in bytes /// Current read speed /// Current dump hardware try @@ -76,14 +75,13 @@ namespace Aaru.Core.Devices.Dumping /// Disc media catalogue number /// List of subchannels not yet dumped correctly /// List of smallest pregap relative address per track - void DumpCdLeadOuts(ulong blocks, uint blockSize, ref double currentSpeed, DumpHardwareType currentTry, - ExtentsULong extents, IbgLog ibgLog, ref double imageWriteDuration, - ExtentsULong leadOutExtents, ref double maxSpeed, MhddLog mhddLog, ref double minSpeed, - bool read6, bool read10, bool read12, bool read16, bool readcd, - MmcSubchannel supportedSubchannel, uint subSize, ref double totalDuration, - SubchannelLog subLog, MmcSubchannel desiredSubchannel, Dictionary isrcs, - ref string mcn, Track[] tracks, HashSet subchannelExtents, - Dictionary smallestPregapLbaPerTrack) + void DumpCdLeadOuts(uint blockSize, ref double currentSpeed, DumpHardwareType currentTry, ExtentsULong extents, + IbgLog ibgLog, ref double imageWriteDuration, ExtentsULong leadOutExtents, + ref double maxSpeed, MhddLog mhddLog, ref double minSpeed, bool read6, bool read10, + bool read12, bool read16, bool readcd, MmcSubchannel supportedSubchannel, uint subSize, + ref double totalDuration, SubchannelLog subLog, MmcSubchannel desiredSubchannel, + Dictionary isrcs, ref string mcn, Track[] tracks, + HashSet subchannelExtents, Dictionary smallestPregapLbaPerTrack) { byte[] cmdBuf = null; // Data buffer const uint sectorSize = 2352; // Full sector size @@ -234,7 +232,6 @@ namespace Aaru.Core.Devices.Dumping } /// Retries inter-session lead-outs - /// Total number of positive sectors /// Size of the read sector in bytes /// Current read speed /// Current dump hardware try @@ -260,14 +257,13 @@ namespace Aaru.Core.Devices.Dumping /// Disc media catalogue number /// List of subchannels not yet dumped correctly /// List of smallest pregap relative address per track - void RetryCdLeadOuts(ulong blocks, uint blockSize, ref double currentSpeed, DumpHardwareType currentTry, - ExtentsULong extents, IbgLog ibgLog, ref double imageWriteDuration, - ExtentsULong leadOutExtents, ref double maxSpeed, MhddLog mhddLog, ref double minSpeed, - bool read6, bool read10, bool read12, bool read16, bool readcd, - MmcSubchannel supportedSubchannel, uint subSize, ref double totalDuration, - SubchannelLog subLog, MmcSubchannel desiredSubchannel, Dictionary isrcs, - ref string mcn, Track[] tracks, HashSet subchannelExtents, - Dictionary smallestPregapLbaPerTrack) + void RetryCdLeadOuts(uint blockSize, ref double currentSpeed, DumpHardwareType currentTry, ExtentsULong extents, + IbgLog ibgLog, ref double imageWriteDuration, ExtentsULong leadOutExtents, + ref double maxSpeed, MhddLog mhddLog, ref double minSpeed, bool read6, bool read10, + bool read12, bool read16, bool readcd, MmcSubchannel supportedSubchannel, uint subSize, + ref double totalDuration, SubchannelLog subLog, MmcSubchannel desiredSubchannel, + Dictionary isrcs, ref string mcn, Track[] tracks, + HashSet subchannelExtents, Dictionary smallestPregapLbaPerTrack) { byte[] cmdBuf = null; // Data buffer const uint sectorSize = 2352; // Full sector size @@ -305,7 +301,7 @@ namespace Aaru.Core.Devices.Dumping // ReSharper restore CompareOfFloatsByEqualityOperator #pragma warning restore RECS0018 // Comparison of floating point numbers with equality operator - PulseProgress?.Invoke(string.Format("Reading sector {0} at lead-out ({1:F3} MiB/sec.)", i, blocks, + PulseProgress?.Invoke(string.Format("Reading sector {0} at lead-out ({1:F3} MiB/sec.)", i, currentSpeed)); if(readcd) diff --git a/Aaru.Core/Devices/Dumping/CompactDisc/Pregap.cs b/Aaru.Core/Devices/Dumping/CompactDisc/Pregap.cs index 9f453cef2..d7bff321a 100644 --- a/Aaru.Core/Devices/Dumping/CompactDisc/Pregap.cs +++ b/Aaru.Core/Devices/Dumping/CompactDisc/Pregap.cs @@ -143,7 +143,7 @@ namespace Aaru.Core.Devices.Dumping for(retries = 0; retries < 10; retries++) { sense = supportsRwSubchannel ? GetSectorForPregapRaw(dev, 11, dbDev, out subBuf, false) - : GetSectorForPregapQ16(dev, 11, dbDev, out subBuf, false); + : GetSectorForPregapQ16(dev, 11, out subBuf, false); if(sense) continue; @@ -217,8 +217,7 @@ namespace Aaru.Core.Devices.Dumping sense = supportsRwSubchannel ? GetSectorForPregapRaw(dev, (uint)lba, dbDev, out subBuf, track.TrackType == TrackType.Audio) - : GetSectorForPregapQ16(dev, (uint)lba, dbDev, out subBuf, - track.TrackType == TrackType.Audio); + : GetSectorForPregapQ16(dev, (uint)lba, out subBuf, track.TrackType == TrackType.Audio); if(sense) { @@ -316,7 +315,7 @@ namespace Aaru.Core.Devices.Dumping sense = supportsRwSubchannel ? GetSectorForPregapRaw(dev, (uint)lba - 10, dbDev, out subBuf, track.TrackType == TrackType.Audio) - : GetSectorForPregapQ16(dev, (uint)lba - 10, dbDev, out subBuf, + : GetSectorForPregapQ16(dev, (uint)lba - 10, out subBuf, track.TrackType == TrackType.Audio); for(retries = 0; retries < 10; retries++) @@ -324,7 +323,7 @@ namespace Aaru.Core.Devices.Dumping sense = supportsRwSubchannel ? GetSectorForPregapRaw(dev, (uint)lba, dbDev, out subBuf, track.TrackType == TrackType.Audio) - : GetSectorForPregapQ16(dev, (uint)lba, dbDev, out subBuf, + : GetSectorForPregapQ16(dev, (uint)lba, out subBuf, track.TrackType == TrackType.Audio); if(sense) @@ -653,8 +652,7 @@ namespace Aaru.Core.Devices.Dumping return sense; } - static bool GetSectorForPregapQ16(Device dev, uint lba, Database.Models.Device dbDev, out byte[] subBuf, - bool audioTrack) + static bool GetSectorForPregapQ16(Device dev, uint lba, out byte[] subBuf, bool audioTrack) { byte[] cmdBuf; bool sense; diff --git a/Aaru.Core/Devices/Dumping/MiniDisc.cs b/Aaru.Core/Devices/Dumping/MiniDisc.cs index 7647748d8..d745e542e 100644 --- a/Aaru.Core/Devices/Dumping/MiniDisc.cs +++ b/Aaru.Core/Devices/Dumping/MiniDisc.cs @@ -457,7 +457,7 @@ namespace Aaru.Core.Devices.Dumping PulseProgress?.Invoke($"Trimming sector {badSector}"); sense = _dev.Read6(out readBuffer, out _, (uint)badSector, blockSize, 1, _dev.Timeout, - out double cmdDuration); + out double _); if(sense || _dev.Error) continue; @@ -485,12 +485,10 @@ namespace Aaru.Core.Devices.Dumping Modes.ModePage? currentModePage = null; byte[] md6; - byte[] md10; if(_persistent) { - Modes.ModePage_01_MMC pgMmc; - Modes.ModePage_01 pg; + Modes.ModePage_01 pg; sense = _dev.ModeSense6(out readBuffer, out _, false, ScsiModeSensePageControl.Current, 0x01, _dev.Timeout, out _); diff --git a/Aaru.Core/Devices/Dumping/PlayStationPortable/MemoryStick.cs b/Aaru.Core/Devices/Dumping/PlayStationPortable/MemoryStick.cs index 4ac400f42..dedc44238 100644 --- a/Aaru.Core/Devices/Dumping/PlayStationPortable/MemoryStick.cs +++ b/Aaru.Core/Devices/Dumping/PlayStationPortable/MemoryStick.cs @@ -301,7 +301,7 @@ namespace Aaru.Core.Devices.Dumping PulseProgress?.Invoke($"Trimming sector {badSector}"); sense = _dev.Read12(out readBuffer, out senseBuf, 0, false, true, false, false, (uint)badSector, - BLOCK_SIZE, 0, 1, false, _dev.Timeout, out double cmdDuration); + BLOCK_SIZE, 0, 1, false, _dev.Timeout, out double _); if(sense || _dev.Error) { diff --git a/Aaru.Core/Devices/Dumping/PlayStationPortable/UMD.cs b/Aaru.Core/Devices/Dumping/PlayStationPortable/UMD.cs index a6a384b31..7b75d2899 100644 --- a/Aaru.Core/Devices/Dumping/PlayStationPortable/UMD.cs +++ b/Aaru.Core/Devices/Dumping/PlayStationPortable/UMD.cs @@ -322,7 +322,7 @@ namespace Aaru.Core.Devices.Dumping sense = _dev.Read12(out readBuffer, out senseBuf, 0, false, true, false, false, (uint)(umdStart + (badSector * 4)), 512, 0, 4, false, _dev.Timeout, - out double cmdDuration); + out double _); if(sense || _dev.Error) { diff --git a/Aaru.Core/Devices/Dumping/SBC.cs b/Aaru.Core/Devices/Dumping/SBC.cs index d9f60fe5e..8e39b248d 100644 --- a/Aaru.Core/Devices/Dumping/SBC.cs +++ b/Aaru.Core/Devices/Dumping/SBC.cs @@ -739,7 +739,7 @@ namespace Aaru.Core.Devices.Dumping PulseProgress?.Invoke($"Trimming sector {badSector}"); - sense = scsiReader.ReadBlock(out readBuffer, badSector, out double cmdDuration); + sense = scsiReader.ReadBlock(out readBuffer, badSector, out double _); if(sense || _dev.Error) continue; diff --git a/Aaru.Core/Devices/ReaderATA.cs b/Aaru.Core/Devices/ReaderATA.cs index 1947c6a55..f5a7add38 100644 --- a/Aaru.Core/Devices/ReaderATA.cs +++ b/Aaru.Core/Devices/ReaderATA.cs @@ -59,10 +59,10 @@ namespace Aaru.Core.Devices internal byte Heads { get; private set; } internal byte Sectors { get; private set; } - (uint, byte, byte) GetDeviceChs() + void GetDeviceChs() { if(_dev.Type != DeviceType.ATA) - return (0, 0, 0); + return; if(_ataId.CurrentCylinders > 0 && _ataId.CurrentHeads > 0 && @@ -78,14 +78,12 @@ namespace Aaru.Core.Devices _ataId.Cylinders <= 0 || _ataId.Heads <= 0 || _ataId.SectorsPerTrack <= 0) - return (Cylinders, Heads, Sectors); + return; Cylinders = _ataId.Cylinders; Heads = (byte)_ataId.Heads; Sectors = (byte)_ataId.SectorsPerTrack; Blocks = (ulong)(Cylinders * Heads * Sectors); - - return (Cylinders, Heads, Sectors); } ulong AtaGetBlocks() diff --git a/Aaru.Core/Devices/Report/Scsi.cs b/Aaru.Core/Devices/Report/Scsi.cs index 6eeb95772..cf0626f3d 100644 --- a/Aaru.Core/Devices/Report/Scsi.cs +++ b/Aaru.Core/Devices/Report/Scsi.cs @@ -47,7 +47,7 @@ namespace Aaru.Core.Devices.Report public Scsi ReportScsiInquiry() { AaruConsole.WriteLine("Querying SCSI INQUIRY..."); - bool sense = _dev.ScsiInquiry(out byte[] buffer, out byte[] senseBuffer); + bool sense = _dev.ScsiInquiry(out byte[] buffer, out _); var report = new Scsi(); diff --git a/Aaru.Core/Entropy.cs b/Aaru.Core/Entropy.cs index 78e77d193..666d8ff8d 100644 --- a/Aaru.Core/Entropy.cs +++ b/Aaru.Core/Entropy.cs @@ -44,12 +44,10 @@ namespace Aaru.Core { readonly bool debug; readonly IMediaImage inputFormat; - bool verbose; - public Entropy(bool debug, bool verbose, IMediaImage inputFormat) + public Entropy(bool debug, IMediaImage inputFormat) { this.debug = debug; - this.verbose = verbose; this.inputFormat = inputFormat; } diff --git a/Aaru.Core/Error.cs b/Aaru.Core/Error.cs index 376d850bd..a010d892c 100644 --- a/Aaru.Core/Error.cs +++ b/Aaru.Core/Error.cs @@ -30,9 +30,7 @@ // Copyright © 2011-2020 Natalia Portillo // ****************************************************************************/ -using System; using Aaru.CommonTypes.Interop; -using PlatformID = Aaru.CommonTypes.Interop.PlatformID; namespace Aaru.Core { @@ -81,8 +79,6 @@ namespace Aaru.Core case PlatformID.Unknown: return $"Unknown error code {errno}"; default: return $"Unknown error code {errno}"; } - - throw new Exception("Arrived an unexpected place"); } static string PrintUnixError(int errno) diff --git a/Aaru.Core/Media/Detection/MMC.cs b/Aaru.Core/Media/Detection/MMC.cs index 362d9547e..2ddc4be0b 100644 --- a/Aaru.Core/Media/Detection/MMC.cs +++ b/Aaru.Core/Media/Detection/MMC.cs @@ -560,7 +560,8 @@ namespace Aaru.Core.Media.Detection false, false, true, MmcHeaderCodes.AllHeaders, true, true, MmcErrorField.None, MmcSubchannel.None, dev.Timeout, out _); - if(IsCdi(sector0, sector16)) + if(!sense && + IsCdi(sector0, sector16)) { mediaType = MediaType.CDIREADY; @@ -1660,7 +1661,7 @@ namespace Aaru.Core.Media.Detection while(sr.Peek() > 0) { - string? line = sr.ReadLine(); + string line = sr.ReadLine(); // End of file if(line is null || diff --git a/Aaru.Core/Media/Info/CompactDisc.cs b/Aaru.Core/Media/Info/CompactDisc.cs index 685333b47..5465580bf 100644 --- a/Aaru.Core/Media/Info/CompactDisc.cs +++ b/Aaru.Core/Media/Info/CompactDisc.cs @@ -248,11 +248,8 @@ namespace Aaru.Core.Media.Info // Convert to BCD minute = ((minute / 10) << 4) + (minute % 10); - ; second = ((second / 10) << 4) + (second % 10); - ; - frame = ((frame / 10) << 4) + (frame % 10); - ; + frame = ((frame / 10) << 4) + (frame % 10); // Scramble M and S minute ^= 0x01; diff --git a/Aaru.Devices/Windows/Usb.cs b/Aaru.Devices/Windows/Usb.cs index ee9b7e85d..3d51a90ad 100644 --- a/Aaru.Devices/Windows/Usb.cs +++ b/Aaru.Devices/Windows/Usb.cs @@ -42,6 +42,7 @@ namespace Aaru.Devices.Windows { // TODO: Even after cleaning, refactoring and xml-documenting, this code needs some love /// Implements functions for getting and accesing information from the USB bus + [SuppressMessage("ReSharper", "UnusedMember.Local"), SuppressMessage("ReSharper", "UnusedType.Local")] internal static partial class Usb { /// Return a list of USB Host Controllers diff --git a/Aaru.Filesystems/APFS.cs b/Aaru.Filesystems/APFS.cs index 582acb28d..858aa03f9 100644 --- a/Aaru.Filesystems/APFS.cs +++ b/Aaru.Filesystems/APFS.cs @@ -31,6 +31,7 @@ // ****************************************************************************/ using System; +using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; using System.Text; using Aaru.CommonTypes; @@ -40,6 +41,7 @@ using Marshal = Aaru.Helpers.Marshal; namespace Aaru.Filesystems { + [SuppressMessage("ReSharper", "UnusedMember.Local")] public class APFS : IFilesystem { const uint APFS_CONTAINER_MAGIC = 0x4253584E; // "NXSB" diff --git a/Aaru.Filesystems/AppleHFS/Consts.cs b/Aaru.Filesystems/AppleHFS/Consts.cs index 152086809..0bdbfc23c 100644 --- a/Aaru.Filesystems/AppleHFS/Consts.cs +++ b/Aaru.Filesystems/AppleHFS/Consts.cs @@ -30,10 +30,13 @@ // Copyright © 2011-2020 Natalia Portillo // ****************************************************************************/ +using System.Diagnostics.CodeAnalysis; + namespace Aaru.Filesystems { // Information from Inside Macintosh // https://developer.apple.com/legacy/library/documentation/mac/pdf/Files/File_Manager.pdf + [SuppressMessage("ReSharper", "UnusedMember.Local")] public partial class AppleHFS { /// Parent ID of the root directory. diff --git a/Aaru.Filesystems/AppleHFS/Structs.cs b/Aaru.Filesystems/AppleHFS/Structs.cs index a3f802f83..fbd678b58 100644 --- a/Aaru.Filesystems/AppleHFS/Structs.cs +++ b/Aaru.Filesystems/AppleHFS/Structs.cs @@ -32,6 +32,8 @@ using System.Runtime.InteropServices; +// ReSharper disable UnusedType.Local + // ReSharper disable IdentifierTypo // ReSharper disable MemberCanBePrivate.Local diff --git a/Aaru.Filesystems/AppleMFS/Consts.cs b/Aaru.Filesystems/AppleMFS/Consts.cs index ba1b1dd72..216e0fe85 100644 --- a/Aaru.Filesystems/AppleMFS/Consts.cs +++ b/Aaru.Filesystems/AppleMFS/Consts.cs @@ -30,9 +30,12 @@ // Copyright © 2011-2020 Natalia Portillo // ****************************************************************************/ +using System.Diagnostics.CodeAnalysis; + namespace Aaru.Filesystems.AppleMFS { // Information from Inside Macintosh Volume II + [SuppressMessage("ReSharper", "UnusedMember.Local")] public partial class AppleMFS { const ushort MFS_MAGIC = 0xD2D7; diff --git a/Aaru.Filesystems/AppleMFS/Info.cs b/Aaru.Filesystems/AppleMFS/Info.cs index 21677bc15..87d682296 100644 --- a/Aaru.Filesystems/AppleMFS/Info.cs +++ b/Aaru.Filesystems/AppleMFS/Info.cs @@ -65,8 +65,6 @@ namespace Aaru.Filesystems.AppleMFS var mdb = new MasterDirectoryBlock(); - byte[] pString = new byte[16]; - byte[] mdbSector = imagePlugin.ReadSector(2 + partition.Start); byte[] bbSector = imagePlugin.ReadSector(0 + partition.Start); diff --git a/Aaru.Filesystems/AtheOS.cs b/Aaru.Filesystems/AtheOS.cs index 560b5e42a..b78b76b7f 100644 --- a/Aaru.Filesystems/AtheOS.cs +++ b/Aaru.Filesystems/AtheOS.cs @@ -31,6 +31,7 @@ // ****************************************************************************/ using System; +using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; using System.Text; using Aaru.CommonTypes; @@ -40,6 +41,7 @@ using Marshal = Aaru.Helpers.Marshal; namespace Aaru.Filesystems { + [SuppressMessage("ReSharper", "UnusedMember.Local")] public class AtheOS : IFilesystem { // Little endian constants (that is, as read by .NET :p) diff --git a/Aaru.Filesystems/BFS.cs b/Aaru.Filesystems/BFS.cs index 076e23768..07040a1ae 100644 --- a/Aaru.Filesystems/BFS.cs +++ b/Aaru.Filesystems/BFS.cs @@ -31,6 +31,7 @@ // ****************************************************************************/ using System; +using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; using System.Text; using Aaru.CommonTypes; @@ -41,6 +42,7 @@ using Marshal = Aaru.Helpers.Marshal; namespace Aaru.Filesystems { // Information from Practical Filesystem Design, ISBN 1-55860-497-9 + [SuppressMessage("ReSharper", "UnusedMember.Local")] public class BeFS : IFilesystem { // Little endian constants (that is, as read by .NET :p) diff --git a/Aaru.Filesystems/CPM/CPM.cs b/Aaru.Filesystems/CPM/CPM.cs index ab0903bfa..bff8c2712 100644 --- a/Aaru.Filesystems/CPM/CPM.cs +++ b/Aaru.Filesystems/CPM/CPM.cs @@ -33,7 +33,6 @@ using System; using System.Collections.Generic; using System.Text; -using Aaru.CommonTypes; using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Structs; using Schemas; @@ -66,8 +65,7 @@ namespace Aaru.Filesystems.CPM byte[] labelCreationDate; /// Timestamp in volume label for update byte[] labelUpdateDate; - bool mounted; - Partition partition; + bool mounted; /// Cached file passwords Dictionary passwordCache; /// Sector deinterleaving mask diff --git a/Aaru.Filesystems/CPM/Structs.cs b/Aaru.Filesystems/CPM/Structs.cs index ba64612fd..99600d787 100644 --- a/Aaru.Filesystems/CPM/Structs.cs +++ b/Aaru.Filesystems/CPM/Structs.cs @@ -32,6 +32,8 @@ using System.Runtime.InteropServices; +// ReSharper disable NotAccessedField.Local + namespace Aaru.Filesystems.CPM { internal partial class CPM diff --git a/Aaru.Filesystems/CPM/Super.cs b/Aaru.Filesystems/CPM/Super.cs index 7b063b828..b7f165bb1 100644 --- a/Aaru.Filesystems/CPM/Super.cs +++ b/Aaru.Filesystems/CPM/Super.cs @@ -53,9 +53,8 @@ namespace Aaru.Filesystems.CPM public Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, Dictionary options, string @namespace) { - device = imagePlugin; - this.partition = partition; - Encoding = encoding ?? Encoding.GetEncoding("IBM437"); + device = imagePlugin; + Encoding = encoding ?? Encoding.GetEncoding("IBM437"); // As the identification is so complex, just call Identify() and relay on its findings if(!Identify(device, partition) || diff --git a/Aaru.Filesystems/Cram.cs b/Aaru.Filesystems/Cram.cs index abcd7e71f..6f2d497b5 100644 --- a/Aaru.Filesystems/Cram.cs +++ b/Aaru.Filesystems/Cram.cs @@ -31,6 +31,7 @@ // ****************************************************************************/ using System; +using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; using System.Text; using Aaru.CommonTypes; @@ -38,8 +39,11 @@ using Aaru.CommonTypes.Interfaces; using Schemas; using Marshal = Aaru.Helpers.Marshal; +// ReSharper disable UnusedMember.Local + namespace Aaru.Filesystems { + [SuppressMessage("ReSharper", "UnusedType.Local")] public class Cram : IFilesystem { /// Identifier for Cram diff --git a/Aaru.Filesystems/F2FS.cs b/Aaru.Filesystems/F2FS.cs index 71a1876ae..5c42aaac7 100644 --- a/Aaru.Filesystems/F2FS.cs +++ b/Aaru.Filesystems/F2FS.cs @@ -41,6 +41,7 @@ using Marshal = Aaru.Helpers.Marshal; namespace Aaru.Filesystems { + [SuppressMessage("ReSharper", "UnusedMember.Local")] public class F2FS : IFilesystem { const uint F2FS_MAGIC = 0xF2F52010; diff --git a/Aaru.Filesystems/FAT/Consts.cs b/Aaru.Filesystems/FAT/Consts.cs index 1ddd5e30d..08f35653f 100644 --- a/Aaru.Filesystems/FAT/Consts.cs +++ b/Aaru.Filesystems/FAT/Consts.cs @@ -32,6 +32,8 @@ using System; +// ReSharper disable UnusedMember.Local + namespace Aaru.Filesystems.FAT { public partial class FAT diff --git a/Aaru.Filesystems/FAT/Info.cs b/Aaru.Filesystems/FAT/Info.cs index 61f7a652a..70f98a700 100644 --- a/Aaru.Filesystems/FAT/Info.cs +++ b/Aaru.Filesystems/FAT/Info.cs @@ -142,8 +142,7 @@ namespace Aaru.Filesystems.FAT bool dosOemCorrect = dosOem[0] >= 0x20 && dosOem[1] >= 0x20 && dosOem[2] >= 0x20 && dosOem[3] >= 0x20 && dosOem[4] >= 0x20 && dosOem[5] >= 0x20 && dosOem[6] >= 0x20 && dosOem[7] >= 0x20; - string atariString = Encoding.ASCII.GetString(atariOem); - string oemString = Encoding.ASCII.GetString(dosOem); + string oemString = Encoding.ASCII.GetString(dosOem); AaruConsole.DebugWriteLine("FAT plugin", "atari_oem_correct = {0}", atariOemCorrect); AaruConsole.DebugWriteLine("FAT plugin", "dos_oem_correct = {0}", dosOemCorrect); diff --git a/Aaru.Filesystems/FAT/Structs.cs b/Aaru.Filesystems/FAT/Structs.cs index d535d7775..2c4890caa 100644 --- a/Aaru.Filesystems/FAT/Structs.cs +++ b/Aaru.Filesystems/FAT/Structs.cs @@ -30,10 +30,14 @@ // Copyright © 2011-2020 Natalia Portillo // ****************************************************************************/ +using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; +// ReSharper disable NotAccessedField.Local + namespace Aaru.Filesystems.FAT { + [SuppressMessage("ReSharper", "UnusedMember.Local")] public partial class FAT { const int UMSDOS_MAXNAME = 220; diff --git a/Aaru.Filesystems/FAT/Xattr.cs b/Aaru.Filesystems/FAT/Xattr.cs index ac164e650..fcf04baf3 100644 --- a/Aaru.Filesystems/FAT/Xattr.cs +++ b/Aaru.Filesystems/FAT/Xattr.cs @@ -197,7 +197,7 @@ namespace Aaru.Filesystems.FAT while(pos < eaData.Length) { - byte fEA = eaData[pos++]; + pos++; // Skip fEA byte cbName = eaData[pos++]; ushort cbValue = BitConverter.ToUInt16(eaData, pos); pos += 2; diff --git a/Aaru.Filesystems/FATX/Consts.cs b/Aaru.Filesystems/FATX/Consts.cs index 77b3310e3..7191ee63a 100644 --- a/Aaru.Filesystems/FATX/Consts.cs +++ b/Aaru.Filesystems/FATX/Consts.cs @@ -32,6 +32,8 @@ using System; +// ReSharper disable UnusedMember.Local + namespace Aaru.Filesystems.FATX { public partial class XboxFatPlugin diff --git a/Aaru.Filesystems/HPOFS/Structs.cs b/Aaru.Filesystems/HPOFS/Structs.cs index 0886d2313..f5fdbbc13 100644 --- a/Aaru.Filesystems/HPOFS/Structs.cs +++ b/Aaru.Filesystems/HPOFS/Structs.cs @@ -30,10 +30,12 @@ // Copyright © 2011-2020 Natalia Portillo // ****************************************************************************/ +using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; namespace Aaru.Filesystems { + [SuppressMessage("ReSharper", "UnusedType.Local")] public partial class HPOFS { /// BIOS Parameter Block, at sector 0, little-endian diff --git a/Aaru.Filesystems/ISO9660/Consts/AAIP.cs b/Aaru.Filesystems/ISO9660/Consts/AAIP.cs index 6e4cc40f6..9ee19786e 100644 --- a/Aaru.Filesystems/ISO9660/Consts/AAIP.cs +++ b/Aaru.Filesystems/ISO9660/Consts/AAIP.cs @@ -32,9 +32,13 @@ // ****************************************************************************/ using System; +using System.Diagnostics.CodeAnalysis; + +// ReSharper disable UnusedMember.Local namespace Aaru.Filesystems.ISO9660 { + [SuppressMessage("ReSharper", "UnusedType.Local")] public partial class ISO9660 { const ushort AAIP_MAGIC = 0x414C; // "AL" diff --git a/Aaru.Filesystems/ISO9660/Consts/Amiga.cs b/Aaru.Filesystems/ISO9660/Consts/Amiga.cs index 21a145937..d65c546eb 100644 --- a/Aaru.Filesystems/ISO9660/Consts/Amiga.cs +++ b/Aaru.Filesystems/ISO9660/Consts/Amiga.cs @@ -33,6 +33,8 @@ using System; +// ReSharper disable UnusedMember.Local + namespace Aaru.Filesystems.ISO9660 { public partial class ISO9660 diff --git a/Aaru.Filesystems/ISO9660/Consts/CDi.cs b/Aaru.Filesystems/ISO9660/Consts/CDi.cs index 2c2e43ed8..448265056 100644 --- a/Aaru.Filesystems/ISO9660/Consts/CDi.cs +++ b/Aaru.Filesystems/ISO9660/Consts/CDi.cs @@ -34,6 +34,8 @@ using System; using Aaru.Helpers; +// ReSharper disable UnusedMember.Local + namespace Aaru.Filesystems.ISO9660 { public partial class ISO9660 diff --git a/Aaru.Filesystems/ISO9660/Consts/ElTorito.cs b/Aaru.Filesystems/ISO9660/Consts/ElTorito.cs index 3f98ec604..5b3462c88 100644 --- a/Aaru.Filesystems/ISO9660/Consts/ElTorito.cs +++ b/Aaru.Filesystems/ISO9660/Consts/ElTorito.cs @@ -33,6 +33,8 @@ using System; +// ReSharper disable UnusedMember.Local + namespace Aaru.Filesystems.ISO9660 { public partial class ISO9660 diff --git a/Aaru.Filesystems/ISO9660/Consts/ISO.cs b/Aaru.Filesystems/ISO9660/Consts/ISO.cs index 13220192a..2f2cda55e 100644 --- a/Aaru.Filesystems/ISO9660/Consts/ISO.cs +++ b/Aaru.Filesystems/ISO9660/Consts/ISO.cs @@ -33,6 +33,8 @@ using System; +// ReSharper disable UnusedMember.Local + namespace Aaru.Filesystems.ISO9660 { public partial class ISO9660 diff --git a/Aaru.Filesystems/ISO9660/Consts/Internal.cs b/Aaru.Filesystems/ISO9660/Consts/Internal.cs index 49b0a48cf..eb018e34c 100644 --- a/Aaru.Filesystems/ISO9660/Consts/Internal.cs +++ b/Aaru.Filesystems/ISO9660/Consts/Internal.cs @@ -31,10 +31,12 @@ // In the loving memory of Facunda "Tata" Suárez Domínguez, R.I.P. 2019/07/24 // ****************************************************************************/ +using System.Diagnostics.CodeAnalysis; using Aaru.Helpers; namespace Aaru.Filesystems.ISO9660 { + [SuppressMessage("ReSharper", "UnusedMember.Local")] public partial class ISO9660 { const byte MODE2_FORM2 = 0x20; diff --git a/Aaru.Filesystems/ISO9660/Consts/RRIP.cs b/Aaru.Filesystems/ISO9660/Consts/RRIP.cs index 91f102e60..b86ee8054 100644 --- a/Aaru.Filesystems/ISO9660/Consts/RRIP.cs +++ b/Aaru.Filesystems/ISO9660/Consts/RRIP.cs @@ -33,6 +33,8 @@ using System; +// ReSharper disable UnusedMember.Local + namespace Aaru.Filesystems.ISO9660 { public partial class ISO9660 diff --git a/Aaru.Filesystems/ISO9660/Consts/SUSP.cs b/Aaru.Filesystems/ISO9660/Consts/SUSP.cs index 770aefba5..558882dfc 100644 --- a/Aaru.Filesystems/ISO9660/Consts/SUSP.cs +++ b/Aaru.Filesystems/ISO9660/Consts/SUSP.cs @@ -31,8 +31,13 @@ // In the loving memory of Facunda "Tata" Suárez Domínguez, R.I.P. 2019/07/24 // ****************************************************************************/ +// ReSharper disable IdentifierTypo + +using System.Diagnostics.CodeAnalysis; + namespace Aaru.Filesystems.ISO9660 { + [SuppressMessage("ReSharper", "UnusedMember.Local")] public partial class ISO9660 { const ushort SUSP_CONTINUATION = 0x4345; // "CE" diff --git a/Aaru.Filesystems/ISO9660/Consts/XA.cs b/Aaru.Filesystems/ISO9660/Consts/XA.cs index 37e91b661..782048635 100644 --- a/Aaru.Filesystems/ISO9660/Consts/XA.cs +++ b/Aaru.Filesystems/ISO9660/Consts/XA.cs @@ -33,6 +33,8 @@ using System; +// ReSharper disable UnusedMember.Local + namespace Aaru.Filesystems.ISO9660 { public partial class ISO9660 diff --git a/Aaru.Filesystems/ISO9660/Consts/Ziso.cs b/Aaru.Filesystems/ISO9660/Consts/Ziso.cs index ffc9bc845..e142bfab9 100644 --- a/Aaru.Filesystems/ISO9660/Consts/Ziso.cs +++ b/Aaru.Filesystems/ISO9660/Consts/Ziso.cs @@ -31,8 +31,11 @@ // In the loving memory of Facunda "Tata" Suárez Domínguez, R.I.P. 2019/07/24 // ****************************************************************************/ +using System.Diagnostics.CodeAnalysis; + namespace Aaru.Filesystems.ISO9660 { + [SuppressMessage("ReSharper", "UnusedMember.Local")] public partial class ISO9660 { const ulong ZISO_HEADER_MAGIC = 0x37E45396C9DBD607; diff --git a/Aaru.Filesystems/ISO9660/File.cs b/Aaru.Filesystems/ISO9660/File.cs index 8f40cc12d..8bd76c927 100644 --- a/Aaru.Filesystems/ISO9660/File.cs +++ b/Aaru.Filesystems/ISO9660/File.cs @@ -338,7 +338,7 @@ namespace Aaru.Filesystems.ISO9660 } if(entry.PosixDeviceNumber != null) - stat.DeviceNo = (entry.PosixDeviceNumber.Value.dev_t_high << 32) + + stat.DeviceNo = ((ulong)entry.PosixDeviceNumber.Value.dev_t_high << 32) + entry.PosixDeviceNumber.Value.dev_t_low; if(entry.RripModify != null) diff --git a/Aaru.Filesystems/ISO9660/ISO9660.cs b/Aaru.Filesystems/ISO9660/ISO9660.cs index 43c02282b..c91a78f09 100644 --- a/Aaru.Filesystems/ISO9660/ISO9660.cs +++ b/Aaru.Filesystems/ISO9660/ISO9660.cs @@ -33,6 +33,7 @@ using System; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Text; using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Structs; @@ -41,6 +42,7 @@ using Schemas; namespace Aaru.Filesystems.ISO9660 { // This is coded following ECMA-119. + [SuppressMessage("ReSharper", "UnusedType.Local")] public partial class ISO9660 : IReadOnlyFilesystem { bool cdi; diff --git a/Aaru.Filesystems/ISO9660/Info.cs b/Aaru.Filesystems/ISO9660/Info.cs index 6f9cbcadc..07293195c 100644 --- a/Aaru.Filesystems/ISO9660/Info.cs +++ b/Aaru.Filesystems/ISO9660/Info.cs @@ -680,7 +680,7 @@ namespace Aaru.Filesystems.ISO9660 if(valentry.signature != EL_TORITO_MAGIC) goto exit_torito; - toritoOff += EL_TORITO_ENTRY_SIZE; + toritoOff = EL_TORITO_ENTRY_SIZE; ElToritoInitialEntry initialEntry = Marshal.ByteArrayToStructureLittleEndian(vdSector, toritoOff, diff --git a/Aaru.Filesystems/ISO9660/Structs/ISO.cs b/Aaru.Filesystems/ISO9660/Structs/ISO.cs index c040dafd8..06482560c 100644 --- a/Aaru.Filesystems/ISO9660/Structs/ISO.cs +++ b/Aaru.Filesystems/ISO9660/Structs/ISO.cs @@ -34,6 +34,8 @@ using System; using System.Runtime.InteropServices; +// ReSharper disable UnusedType.Local + namespace Aaru.Filesystems.ISO9660 { public partial class ISO9660 diff --git a/Aaru.Filesystems/ISO9660/Structs/RRIP.cs b/Aaru.Filesystems/ISO9660/Structs/RRIP.cs index 63e7b557e..6f8c5478b 100644 --- a/Aaru.Filesystems/ISO9660/Structs/RRIP.cs +++ b/Aaru.Filesystems/ISO9660/Structs/RRIP.cs @@ -31,10 +31,12 @@ // In the loving memory of Facunda "Tata" Suárez Domínguez, R.I.P. 2019/07/24 // ****************************************************************************/ +using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; namespace Aaru.Filesystems.ISO9660 { + [SuppressMessage("ReSharper", "UnusedType.Local")] public partial class ISO9660 { // RRIP 1.10 diff --git a/Aaru.Filesystems/ISO9660/Structs/SUSP.cs b/Aaru.Filesystems/ISO9660/Structs/SUSP.cs index d558eae0b..01df60344 100644 --- a/Aaru.Filesystems/ISO9660/Structs/SUSP.cs +++ b/Aaru.Filesystems/ISO9660/Structs/SUSP.cs @@ -33,6 +33,8 @@ using System.Runtime.InteropServices; +// ReSharper disable UnusedType.Local + namespace Aaru.Filesystems.ISO9660 { public partial class ISO9660 diff --git a/Aaru.Filesystems/ISO9660/Structs/Ziso.cs b/Aaru.Filesystems/ISO9660/Structs/Ziso.cs index c4df9b874..10beb2068 100644 --- a/Aaru.Filesystems/ISO9660/Structs/Ziso.cs +++ b/Aaru.Filesystems/ISO9660/Structs/Ziso.cs @@ -31,10 +31,12 @@ // In the loving memory of Facunda "Tata" Suárez Domínguez, R.I.P. 2019/07/24 // ****************************************************************************/ +using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; namespace Aaru.Filesystems.ISO9660 { + [SuppressMessage("ReSharper", "UnusedType.Local")] public partial class ISO9660 { [StructLayout(LayoutKind.Sequential, Pack = 1)] diff --git a/Aaru.Filesystems/ISO9660/Super.cs b/Aaru.Filesystems/ISO9660/Super.cs index 39c4a338d..2beb98905 100644 --- a/Aaru.Filesystems/ISO9660/Super.cs +++ b/Aaru.Filesystems/ISO9660/Super.cs @@ -450,7 +450,7 @@ namespace Aaru.Filesystems.ISO9660 try { - byte[] rootDir = ReadSingleExtent(0, rootSize, rootLocation); + _ = ReadSingleExtent(0, rootSize, rootLocation); } catch { diff --git a/Aaru.Filesystems/JFS.cs b/Aaru.Filesystems/JFS.cs index 38923e386..fc126bf22 100644 --- a/Aaru.Filesystems/JFS.cs +++ b/Aaru.Filesystems/JFS.cs @@ -38,6 +38,8 @@ using Aaru.CommonTypes.Interfaces; using Schemas; using Marshal = Aaru.Helpers.Marshal; +// ReSharper disable UnusedMember.Local + namespace Aaru.Filesystems { public class JFS : IFilesystem diff --git a/Aaru.Filesystems/LisaFS/Consts.cs b/Aaru.Filesystems/LisaFS/Consts.cs index 935b68e4b..934457fcc 100644 --- a/Aaru.Filesystems/LisaFS/Consts.cs +++ b/Aaru.Filesystems/LisaFS/Consts.cs @@ -30,8 +30,11 @@ // Copyright © 2011-2020 Natalia Portillo // ****************************************************************************/ +using System.Diagnostics.CodeAnalysis; + namespace Aaru.Filesystems.LisaFS { + [SuppressMessage("ReSharper", "UnusedMember.Local")] public partial class LisaFS { /// Lisa FS v1, from Lisa OS 1.0 (Workshop or Office) Never seen on Sony floppies. diff --git a/Aaru.Filesystems/LisaFS/Structs.cs b/Aaru.Filesystems/LisaFS/Structs.cs index 085d44bd1..a4144530e 100644 --- a/Aaru.Filesystems/LisaFS/Structs.cs +++ b/Aaru.Filesystems/LisaFS/Structs.cs @@ -32,6 +32,8 @@ using System; +// ReSharper disable NotAccessedField.Local + namespace Aaru.Filesystems.LisaFS { public partial class LisaFS diff --git a/Aaru.Filesystems/Locus.cs b/Aaru.Filesystems/Locus.cs index b99be30ae..11e4924f0 100644 --- a/Aaru.Filesystems/Locus.cs +++ b/Aaru.Filesystems/Locus.cs @@ -61,6 +61,9 @@ using pckno_t = System.Int16; // Timestamp using time_t = System.Int32; +// ReSharper disable UnusedMember.Local +// ReSharper disable UnusedType.Local + namespace Aaru.Filesystems { public class Locus : IFilesystem diff --git a/Aaru.Filesystems/MicroDOS.cs b/Aaru.Filesystems/MicroDOS.cs index e74b314ad..0734a7636 100644 --- a/Aaru.Filesystems/MicroDOS.cs +++ b/Aaru.Filesystems/MicroDOS.cs @@ -38,6 +38,9 @@ using Aaru.CommonTypes.Interfaces; using Schemas; using Marshal = Aaru.Helpers.Marshal; +// ReSharper disable UnusedType.Local +// ReSharper disable UnusedMember.Local + namespace Aaru.Filesystems { // Information from http://www.owg.ru/mkt/BK/MKDOS.TXT diff --git a/Aaru.Filesystems/NILFS2.cs b/Aaru.Filesystems/NILFS2.cs index e19f28666..2f5195f0a 100644 --- a/Aaru.Filesystems/NILFS2.cs +++ b/Aaru.Filesystems/NILFS2.cs @@ -38,6 +38,8 @@ using Aaru.CommonTypes.Interfaces; using Schemas; using Marshal = Aaru.Helpers.Marshal; +// ReSharper disable UnusedMember.Local + namespace Aaru.Filesystems { public class NILFS2 : IFilesystem diff --git a/Aaru.Filesystems/Opera/Consts.cs b/Aaru.Filesystems/Opera/Consts.cs index a9dc4c0dd..f06fe07cb 100644 --- a/Aaru.Filesystems/Opera/Consts.cs +++ b/Aaru.Filesystems/Opera/Consts.cs @@ -30,10 +30,12 @@ // Copyright © 2011-2020 Natalia Portillo // ****************************************************************************/ +using System.Diagnostics.CodeAnalysis; using Aaru.Helpers; namespace Aaru.Filesystems { + [SuppressMessage("ReSharper", "UnusedMember.Local")] public partial class OperaFS { const string SYNC = "ZZZZZ"; diff --git a/Aaru.Filesystems/PFS.cs b/Aaru.Filesystems/PFS.cs index ccb34d669..347f361fd 100644 --- a/Aaru.Filesystems/PFS.cs +++ b/Aaru.Filesystems/PFS.cs @@ -38,6 +38,8 @@ using Aaru.CommonTypes.Interfaces; using Schemas; using Marshal = Aaru.Helpers.Marshal; +// ReSharper disable UnusedType.Local + namespace Aaru.Filesystems { public class PFS : IFilesystem diff --git a/Aaru.Filesystems/ProDOS.cs b/Aaru.Filesystems/ProDOS.cs index 8a63cc9f3..abd13317d 100644 --- a/Aaru.Filesystems/ProDOS.cs +++ b/Aaru.Filesystems/ProDOS.cs @@ -31,6 +31,7 @@ // ****************************************************************************/ using System; +using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Text; using Aaru.CommonTypes; @@ -40,9 +41,12 @@ using Claunia.Encoding; using Schemas; using Encoding = System.Text.Encoding; +// ReSharper disable NotAccessedField.Local + namespace Aaru.Filesystems { // Information from Apple ProDOS 8 Technical Reference + [SuppressMessage("ReSharper", "UnusedMember.Local"), SuppressMessage("ReSharper", "UnusedType.Local")] public class ProDOSPlugin : IFilesystem { const byte EMPTY_STORAGE_TYPE = 0x00; diff --git a/Aaru.Filesystems/QNX4.cs b/Aaru.Filesystems/QNX4.cs index 771372b87..f2733231b 100644 --- a/Aaru.Filesystems/QNX4.cs +++ b/Aaru.Filesystems/QNX4.cs @@ -31,6 +31,7 @@ // ****************************************************************************/ using System; +using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Runtime.InteropServices; using System.Text; @@ -41,6 +42,7 @@ using Marshal = Aaru.Helpers.Marshal; namespace Aaru.Filesystems { + [SuppressMessage("ReSharper", "UnusedType.Local")] public class QNX4 : IFilesystem { readonly byte[] qnx4_rootDir_fname = diff --git a/Aaru.Filesystems/SysV.cs b/Aaru.Filesystems/SysV.cs index a2f5bf1af..18aab3e22 100644 --- a/Aaru.Filesystems/SysV.cs +++ b/Aaru.Filesystems/SysV.cs @@ -38,10 +38,13 @@ using Aaru.CommonTypes; using Aaru.CommonTypes.Interfaces; using Schemas; +// ReSharper disable NotAccessedField.Local + namespace Aaru.Filesystems { // Information from the Linux kernel - [SuppressMessage("ReSharper", "InconsistentNaming")] + [SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "UnusedMember.Local"), + SuppressMessage("ReSharper", "UnusedType.Local")] public class SysVfs : IFilesystem { const uint XENIX_MAGIC = 0x002B5544; diff --git a/Aaru.Filesystems/UCSDPascal/Consts.cs b/Aaru.Filesystems/UCSDPascal/Consts.cs index d572b22db..e8e9db649 100644 --- a/Aaru.Filesystems/UCSDPascal/Consts.cs +++ b/Aaru.Filesystems/UCSDPascal/Consts.cs @@ -30,9 +30,12 @@ // Copyright © 2011-2020 Natalia Portillo // ****************************************************************************/ +using System.Diagnostics.CodeAnalysis; + namespace Aaru.Filesystems.UCSDPascal { // Information from Call-A.P.P.L.E. Pascal Disk Directory Structure + [SuppressMessage("ReSharper", "UnusedMember.Local")] public partial class PascalPlugin { enum PascalFileKind : short diff --git a/Aaru.Filesystems/UCSDPascal/Structs.cs b/Aaru.Filesystems/UCSDPascal/Structs.cs index 0e73d1138..77b30f939 100644 --- a/Aaru.Filesystems/UCSDPascal/Structs.cs +++ b/Aaru.Filesystems/UCSDPascal/Structs.cs @@ -30,9 +30,12 @@ // Copyright © 2011-2020 Natalia Portillo // ****************************************************************************/ +using System.Diagnostics.CodeAnalysis; + namespace Aaru.Filesystems.UCSDPascal { // Information from Call-A.P.P.L.E. Pascal Disk Directory Structure + [SuppressMessage("ReSharper", "NotAccessedField.Local")] public partial class PascalPlugin { struct PascalVolumeEntry diff --git a/Aaru.Filesystems/UDF.cs b/Aaru.Filesystems/UDF.cs index 1b78a69ec..7eb5cdf3f 100644 --- a/Aaru.Filesystems/UDF.cs +++ b/Aaru.Filesystems/UDF.cs @@ -31,6 +31,7 @@ // ****************************************************************************/ using System; +using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Runtime.InteropServices; using System.Text; @@ -43,6 +44,7 @@ using Marshal = Aaru.Helpers.Marshal; namespace Aaru.Filesystems { // TODO: Detect bootable + [SuppressMessage("ReSharper", "UnusedMember.Local")] public class UDF : IFilesystem { readonly byte[] UDF_Magic = diff --git a/Aaru.Filesystems/VMfs.cs b/Aaru.Filesystems/VMfs.cs index 91a877b03..b341bbef7 100644 --- a/Aaru.Filesystems/VMfs.cs +++ b/Aaru.Filesystems/VMfs.cs @@ -31,6 +31,7 @@ // ****************************************************************************/ using System; +using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; using System.Text; using Aaru.CommonTypes; @@ -40,6 +41,8 @@ using Marshal = Aaru.Helpers.Marshal; namespace Aaru.Filesystems { + [SuppressMessage("ReSharper", "UnusedType.Local"), SuppressMessage("ReSharper", "IdentifierTypo"), + SuppressMessage("ReSharper", "UnusedMember.Local")] public class VMfs : IFilesystem { /// Identifier for VMfs diff --git a/Aaru.Filesystems/Xia.cs b/Aaru.Filesystems/Xia.cs index 6cf1bbb6d..49a9f6d7b 100644 --- a/Aaru.Filesystems/Xia.cs +++ b/Aaru.Filesystems/Xia.cs @@ -31,6 +31,7 @@ // ****************************************************************************/ using System; +using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; using System.Text; using Aaru.CommonTypes; @@ -41,6 +42,7 @@ using Marshal = Aaru.Helpers.Marshal; namespace Aaru.Filesystems { // Information from the Linux kernel + [SuppressMessage("ReSharper", "UnusedMember.Local"), SuppressMessage("ReSharper", "UnusedType.Local")] public class Xia : IFilesystem { const uint XIAFS_SUPER_MAGIC = 0x012FD16D; diff --git a/Aaru.Filesystems/ZFS.cs b/Aaru.Filesystems/ZFS.cs index b7aac14b0..054ccbb37 100644 --- a/Aaru.Filesystems/ZFS.cs +++ b/Aaru.Filesystems/ZFS.cs @@ -60,7 +60,8 @@ namespace Aaru.Filesystems * It can also be encoded little or big endian. * Because of this variations, ZFS stored a header indicating the used encoding and endianess before the encoded nvlist. */ - [SuppressMessage("ReSharper", "InconsistentNaming")] + [SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "UnusedType.Local"), + SuppressMessage("ReSharper", "UnusedMember.Local"), SuppressMessage("ReSharper", "NotAccessedField.Local")] public class ZFS : IFilesystem { const ulong ZEC_MAGIC = 0x0210DA7AB10C7A11; diff --git a/Aaru.Filesystems/dump.cs b/Aaru.Filesystems/dump.cs index c7808d188..b68548617 100644 --- a/Aaru.Filesystems/dump.cs +++ b/Aaru.Filesystems/dump.cs @@ -43,7 +43,7 @@ using ufs_daddr_t = System.Int32; namespace Aaru.Filesystems { - [SuppressMessage("ReSharper", "InconsistentNaming")] + [SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "UnusedMember.Local")] public class dump : IFilesystem { /// Magic number for old dump diff --git a/Aaru.Filesystems/exFAT.cs b/Aaru.Filesystems/exFAT.cs index 49c1dde1d..13c4a4c7a 100644 --- a/Aaru.Filesystems/exFAT.cs +++ b/Aaru.Filesystems/exFAT.cs @@ -31,6 +31,7 @@ // ****************************************************************************/ using System; +using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Runtime.InteropServices; using System.Text; @@ -42,6 +43,7 @@ using Marshal = Aaru.Helpers.Marshal; namespace Aaru.Filesystems { // Information from https://www.sans.org/reading-room/whitepapers/forensics/reverse-engineering-microsoft-exfat-file-system-33274 + [SuppressMessage("ReSharper", "UnusedMember.Local")] public class exFAT : IFilesystem { readonly Guid OEM_FLASH_PARAMETER_GUID = new Guid("0A0C7E46-3399-4021-90C8-FA6D389C4BA2"); diff --git a/Aaru.Filesystems/ext2FS.cs b/Aaru.Filesystems/ext2FS.cs index a01422de3..1e2887559 100644 --- a/Aaru.Filesystems/ext2FS.cs +++ b/Aaru.Filesystems/ext2FS.cs @@ -42,6 +42,7 @@ using Marshal = Aaru.Helpers.Marshal; namespace Aaru.Filesystems { // Information from the Linux kernel + [SuppressMessage("ReSharper", "UnusedMember.Local")] public class ext2FS : IFilesystem { const int SB_POS = 0x400; diff --git a/Aaru.Filters/AppleDouble.cs b/Aaru.Filters/AppleDouble.cs index 54822fdba..ee33474e8 100644 --- a/Aaru.Filters/AppleDouble.cs +++ b/Aaru.Filters/AppleDouble.cs @@ -31,6 +31,7 @@ // ****************************************************************************/ using System; +using System.Diagnostics.CodeAnalysis; using System.IO; using System.Linq; using System.Runtime.InteropServices; @@ -40,6 +41,7 @@ using Marshal = Aaru.Helpers.Marshal; namespace Aaru.Filters { /// Decodes AppleDouble files + [SuppressMessage("ReSharper", "UnusedMember.Local")] public class AppleDouble : IFilter { const uint AppleDoubleMagic = 0x00051607; diff --git a/Aaru.Filters/AppleSingle.cs b/Aaru.Filters/AppleSingle.cs index e7c8f187b..186b3e29f 100644 --- a/Aaru.Filters/AppleSingle.cs +++ b/Aaru.Filters/AppleSingle.cs @@ -31,6 +31,7 @@ // ****************************************************************************/ using System; +using System.Diagnostics.CodeAnalysis; using System.IO; using System.Linq; using System.Runtime.InteropServices; @@ -40,6 +41,7 @@ using Marshal = Aaru.Helpers.Marshal; namespace Aaru.Filters { /// Decodes AppleSingle files + [SuppressMessage("ReSharper", "UnusedMember.Local")] public class AppleSingle : IFilter { const uint AppleSingleMagic = 0x00051600; diff --git a/Aaru.Filters/PCExchange.cs b/Aaru.Filters/PCExchange.cs index 72c567df2..7d2fc053d 100644 --- a/Aaru.Filters/PCExchange.cs +++ b/Aaru.Filters/PCExchange.cs @@ -32,6 +32,7 @@ // ****************************************************************************/ using System; +using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.IO; using System.Runtime.InteropServices; @@ -41,6 +42,7 @@ using Aaru.CommonTypes.Interfaces; namespace Aaru.Filters { /// Decodes PCExchange files + [SuppressMessage("ReSharper", "UnusedMember.Local")] public class PCExchange : IFilter { const string FILE_ID = "FILEID.DAT"; diff --git a/Aaru.Gui/App.xaml.cs b/Aaru.Gui/App.xaml.cs index 9fcc522f7..b3832dd4d 100644 --- a/Aaru.Gui/App.xaml.cs +++ b/Aaru.Gui/App.xaml.cs @@ -38,6 +38,9 @@ using Avalonia.Controls; using Avalonia.Controls.ApplicationLifetimes; using Avalonia.Markup.Xaml; +// ReSharper disable UnusedMember.Local +// ReSharper disable UnusedParameter.Local + namespace Aaru.Gui { public class App : Application diff --git a/Aaru.Gui/ViewModels/Panels/MediaInfoViewModel.cs b/Aaru.Gui/ViewModels/Panels/MediaInfoViewModel.cs index 93fa01ce5..0b4699d7d 100644 --- a/Aaru.Gui/ViewModels/Panels/MediaInfoViewModel.cs +++ b/Aaru.Gui/ViewModels/Panels/MediaInfoViewModel.cs @@ -444,8 +444,7 @@ namespace Aaru.Gui.ViewModels.Panels var mediaScanWindow = new MediaScan(); - mediaScanWindow.DataContext = - new MediaScanViewModel(_devicePath, _scsiInfo.DeviceInfo, mediaScanWindow, _scsiInfo); + mediaScanWindow.DataContext = new MediaScanViewModel(_devicePath, mediaScanWindow); mediaScanWindow.Show(); } diff --git a/Aaru.Gui/ViewModels/Tabs/AtaInfoViewModel.cs b/Aaru.Gui/ViewModels/Tabs/AtaInfoViewModel.cs index c44bfc018..0dbf9c3fd 100644 --- a/Aaru.Gui/ViewModels/Tabs/AtaInfoViewModel.cs +++ b/Aaru.Gui/ViewModels/Tabs/AtaInfoViewModel.cs @@ -43,7 +43,7 @@ namespace Aaru.Gui.ViewModels.Tabs { readonly byte[] ata; readonly byte[] atapi; - Window _view; + readonly Window _view; public AtaInfoViewModel(byte[] ataIdentify, byte[] atapiIdentify, AtaErrorRegistersChs? ataMcptError, Window view) @@ -53,6 +53,7 @@ namespace Aaru.Gui.ViewModels.Tabs ata = ataIdentify; atapi = atapiIdentify; + _view = view; if(ataIdentify == null && atapiIdentify == null) diff --git a/Aaru.Gui/ViewModels/Tabs/ScsiInfoViewModel.cs b/Aaru.Gui/ViewModels/Tabs/ScsiInfoViewModel.cs index fead2253d..b93ce2362 100644 --- a/Aaru.Gui/ViewModels/Tabs/ScsiInfoViewModel.cs +++ b/Aaru.Gui/ViewModels/Tabs/ScsiInfoViewModel.cs @@ -57,7 +57,7 @@ namespace Aaru.Gui.ViewModels.Tabs object _selectedEvpdPage; object _selectedMmcFeature; object _selectedModeSensePage; - Window _view; + readonly Window _view; public ScsiInfoViewModel(byte[] scsiInquiryData, Inquiry? scsiInquiry, Dictionary scsiEvpdPages, Modes.DecodedMode? scsiMode, PeripheralDeviceTypes scsiType, byte[] scsiModeSense6, @@ -67,6 +67,7 @@ namespace Aaru.Gui.ViewModels.Tabs _scsiModeSense6 = scsiModeSense6; _scsiModeSense10 = scsiModeSense10; _configuration = mmcConfiguration; + _view = view; ModeSensePages = new ObservableCollection(); EvpdPages = new ObservableCollection(); MmcFeatures = new ObservableCollection(); @@ -425,8 +426,8 @@ namespace Aaru.Gui.ViewModels.Tabs { foreach(KeyValuePair page in scsiEvpdPages.OrderBy(t => t.Key)) { - string evpdPageTitle = ""; - string evpdDecodedPage = ""; + string evpdPageTitle = ""; + string evpdDecodedPage; if(page.Key >= 0x01 && page.Key <= 0x7F) diff --git a/Aaru.Gui/ViewModels/Tabs/XboxInfoViewModel.cs b/Aaru.Gui/ViewModels/Tabs/XboxInfoViewModel.cs index d104326dc..973b2b600 100644 --- a/Aaru.Gui/ViewModels/Tabs/XboxInfoViewModel.cs +++ b/Aaru.Gui/ViewModels/Tabs/XboxInfoViewModel.cs @@ -43,12 +43,13 @@ namespace Aaru.Gui.ViewModels.Tabs public class XboxInfoViewModel { readonly byte[] xboxSecuritySector; - Window _view; + readonly Window _view; public XboxInfoViewModel(XgdInfo xgdInfo, byte[] dmi, byte[] securitySector, SS.SecuritySector? decodedSecuritySector, Window view) { xboxSecuritySector = securitySector; + _view = view; SaveXboxSsCommand = ReactiveCommand.Create(ExecuteSaveXboxSsCommand); if(xgdInfo != null) diff --git a/Aaru.Gui/ViewModels/Windows/ImageConvertViewModel.cs b/Aaru.Gui/ViewModels/Windows/ImageConvertViewModel.cs index 475bea7a0..c7d1135b2 100644 --- a/Aaru.Gui/ViewModels/Windows/ImageConvertViewModel.cs +++ b/Aaru.Gui/ViewModels/Windows/ImageConvertViewModel.cs @@ -1475,7 +1475,7 @@ namespace Aaru.Gui.ViewModels.Windows Progress2Visible = false; }); - bool ret = false; + bool ret; if(dumpHardware != null && !cancel) diff --git a/Aaru.Gui/ViewModels/Windows/ImageEntropyViewModel.cs b/Aaru.Gui/ViewModels/Windows/ImageEntropyViewModel.cs index 10733af0e..5b2544159 100644 --- a/Aaru.Gui/ViewModels/Windows/ImageEntropyViewModel.cs +++ b/Aaru.Gui/ViewModels/Windows/ImageEntropyViewModel.cs @@ -284,7 +284,7 @@ namespace Aaru.Gui.ViewModels.Windows void ExecuteStartCommand() { - var entropyCalculator = new Entropy(false, false, _inputFormat); + var entropyCalculator = new Entropy(false, _inputFormat); entropyCalculator.InitProgressEvent += InitProgress; entropyCalculator.InitProgress2Event += InitProgress2; entropyCalculator.UpdateProgressEvent += UpdateProgress; diff --git a/Aaru.Gui/ViewModels/Windows/MediaScanViewModel.cs b/Aaru.Gui/ViewModels/Windows/MediaScanViewModel.cs index 802c3aa04..8f01e5dd0 100644 --- a/Aaru.Gui/ViewModels/Windows/MediaScanViewModel.cs +++ b/Aaru.Gui/ViewModels/Windows/MediaScanViewModel.cs @@ -35,7 +35,6 @@ using System.Reactive; using System.Threading; using Aaru.Core; using Aaru.Core.Devices.Scanning; -using Aaru.Core.Media.Info; using Aaru.Devices; using Avalonia.Controls; using Avalonia.Media; @@ -44,7 +43,6 @@ using MessageBox.Avalonia; using MessageBox.Avalonia.Enums; using OxyPlot; using ReactiveUI; -using DeviceInfo = Aaru.Core.Devices.Info.DeviceInfo; namespace Aaru.Gui.ViewModels.Windows { @@ -92,7 +90,7 @@ namespace Aaru.Gui.ViewModels.Windows string _totalTime; string _unreadableSectors; - public MediaScanViewModel(string devicePath, DeviceInfo deviceInfo, Window view, ScsiInfo scsiInfo = null) + public MediaScanViewModel(string devicePath, Window view) { _devicePath = devicePath; _view = view; diff --git a/Aaru.Helpers b/Aaru.Helpers index 9f8ef78cf..6c2685afb 160000 --- a/Aaru.Helpers +++ b/Aaru.Helpers @@ -1 +1 @@ -Subproject commit 9f8ef78cf492932cfb42b96add69890ff9ae4170 +Subproject commit 6c2685afbfa36b206954809b14e1c238a975a505 diff --git a/Aaru.Images/AaruFormat/AaruFormat.cs b/Aaru.Images/AaruFormat/AaruFormat.cs index ef1ff28dd..8d04f7ebc 100644 --- a/Aaru.Images/AaruFormat/AaruFormat.cs +++ b/Aaru.Images/AaruFormat/AaruFormat.cs @@ -107,9 +107,9 @@ namespace Aaru.DiscImages bool deduplicate; /// On-memory deduplication table indexed by checksum. Dictionary deduplicationTable; - /// writer. + /// writer. AudioEncoder flakeWriter; - /// settings. + /// settings. EncoderSettings flakeWriterSettings; /// Block with logical geometry. GeometryBlock geometryBlock; diff --git a/Aaru.Images/AaruFormat/Constants.cs b/Aaru.Images/AaruFormat/Constants.cs index c02c0a54c..3bce618c8 100644 --- a/Aaru.Images/AaruFormat/Constants.cs +++ b/Aaru.Images/AaruFormat/Constants.cs @@ -56,7 +56,7 @@ namespace Aaru.DiscImages /// Maximum number of samples for a FLAC block. Bigger than 4608 gives no benefit. const int MAX_FLAKE_BLOCK = 4608; /// - /// Minimum number of samples for a FLAC block. does not support it to be + /// Minimum number of samples for a FLAC block. does not support it to be /// smaller than 256. /// const int MIN_FLAKE_BLOCK = 256; diff --git a/Aaru.Images/AaruFormat/Enums.cs b/Aaru.Images/AaruFormat/Enums.cs index 737edafa9..cba666418 100644 --- a/Aaru.Images/AaruFormat/Enums.cs +++ b/Aaru.Images/AaruFormat/Enums.cs @@ -30,6 +30,8 @@ // Copyright © 2011-2020 Natalia Portillo // ****************************************************************************/ +// ReSharper disable UnusedMember.Local + namespace Aaru.DiscImages { public partial class AaruFormat diff --git a/Aaru.Images/AaruFormat/Write.cs b/Aaru.Images/AaruFormat/Write.cs index e0bdecd93..3f813cb6d 100644 --- a/Aaru.Images/AaruFormat/Write.cs +++ b/Aaru.Images/AaruFormat/Write.cs @@ -1490,7 +1490,7 @@ namespace Aaru.DiscImages if(form2) { - bool correctEdc = false; + bool correctEdc; uint computedEdc = ComputeEdc(0, data, 0x91C, 0x10); uint edc = BitConverter.ToUInt32(data, 0x92C); correctEdc = computedEdc == edc; @@ -1526,7 +1526,7 @@ namespace Aaru.DiscImages else { bool correctEcc = SuffixIsCorrectMode2(data); - bool correctEdc = false; + bool correctEdc; uint computedEdc = ComputeEdc(0, data, 0x808, 0x10); uint edc = BitConverter.ToUInt32(data, 0x818); @@ -1918,7 +1918,7 @@ namespace Aaru.DiscImages blockStream = new NonClosableStream(); byte[] lzmaProperties = - CompressDataToStreamWithLZMA(mediaTag.Value, lzmaEncoderProperties, blockStream, false); + CompressDataToStreamWithLZMA(mediaTag.Value, lzmaEncoderProperties, blockStream); byte[] tagData; @@ -2391,8 +2391,7 @@ namespace Aaru.DiscImages userDataDdtStream.Write(ddtEntries, 0, ddtEntries.Length); byte[] lzmaProperties = - CompressDataToStreamWithLZMA(userDataDdtStream.ToArray(), lzmaEncoderProperties, blockStream, - false); + CompressDataToStreamWithLZMA(userDataDdtStream.ToArray(), lzmaEncoderProperties, blockStream); userDataDdtStream.Close(); ddtHeader.cmpLength = (uint)blockStream.Length + LZMA_PROPERTIES_LENGTH; @@ -2462,7 +2461,7 @@ namespace Aaru.DiscImages blockStream = new NonClosableStream(); lzmaProperties = - CompressDataToStreamWithLZMA(sectorPrefix, lzmaEncoderProperties, blockStream, false); + CompressDataToStreamWithLZMA(sectorPrefix, lzmaEncoderProperties, blockStream); var cmpCrc = new Crc64Context(); cmpCrc.Update(lzmaProperties); @@ -2528,7 +2527,7 @@ namespace Aaru.DiscImages blockStream = new NonClosableStream(); lzmaProperties = - CompressDataToStreamWithLZMA(sectorSuffix, lzmaEncoderProperties, blockStream, false); + CompressDataToStreamWithLZMA(sectorSuffix, lzmaEncoderProperties, blockStream); var cmpCrc = new Crc64Context(); cmpCrc.Update(lzmaProperties); @@ -2646,7 +2645,7 @@ namespace Aaru.DiscImages byte[] lzmaProperties = CompressDataToStreamWithLZMA(sectorPrefixDdtStream.ToArray(), lzmaEncoderProperties, - blockStream, false); + blockStream); sectorPrefixDdtStream.Close(); ddtHeader.cmpLength = (uint)blockStream.Length + LZMA_PROPERTIES_LENGTH; @@ -2698,7 +2697,7 @@ namespace Aaru.DiscImages lzmaProperties = CompressDataToStreamWithLZMA(sectorSuffixDdtStream.ToArray(), lzmaEncoderProperties, - blockStream, false); + blockStream); ddtHeader.cmpLength = (uint)blockStream.Length + LZMA_PROPERTIES_LENGTH; cmpCrc64Context = new Crc64Context(); @@ -2758,7 +2757,7 @@ namespace Aaru.DiscImages lzmaProperties = CompressDataToStreamWithLZMA(sectorPrefixMs.ToArray(), lzmaEncoderProperties, - blockStream, false); + blockStream); var cmpCrc = new Crc64Context(); cmpCrc.Update(lzmaProperties); @@ -2828,7 +2827,7 @@ namespace Aaru.DiscImages lzmaProperties = CompressDataToStreamWithLZMA(sectorSuffixMs.ToArray(), lzmaEncoderProperties, - blockStream, false); + blockStream); var cmpCrc = new Crc64Context(); cmpCrc.Update(lzmaProperties); @@ -2900,8 +2899,7 @@ namespace Aaru.DiscImages blockStream = new NonClosableStream(); lzmaProperties = - CompressDataToStreamWithLZMA(mode2Subheaders, lzmaEncoderProperties, blockStream, - false); + CompressDataToStreamWithLZMA(mode2Subheaders, lzmaEncoderProperties, blockStream); var cmpCrc = new Crc64Context(); cmpCrc.Update(lzmaProperties); @@ -2974,8 +2972,7 @@ namespace Aaru.DiscImages blockStream = new NonClosableStream(); lzmaProperties = - CompressDataToStreamWithLZMA(transformedSubchannel, lzmaEncoderProperties, blockStream, - false); + CompressDataToStreamWithLZMA(transformedSubchannel, lzmaEncoderProperties, blockStream); var cmpCrc = new Crc64Context(); cmpCrc.Update(lzmaProperties); @@ -3234,8 +3231,7 @@ namespace Aaru.DiscImages blockStream = new NonClosableStream(); lzmaProperties = - CompressDataToStreamWithLZMA(sectorSubchannel, lzmaEncoderProperties, blockStream, - false); + CompressDataToStreamWithLZMA(sectorSubchannel, lzmaEncoderProperties, blockStream); var cmpCrc = new Crc64Context(); cmpCrc.Update(lzmaProperties); @@ -3611,7 +3607,7 @@ namespace Aaru.DiscImages return false; } - var track = new Track(); + Track track; switch(tag) { @@ -3773,8 +3769,7 @@ namespace Aaru.DiscImages /// LZMA properties /// Stream where to write the compressed data to /// The properties as a byte array - static byte[] CompressDataToStreamWithLZMA(byte[] data, LzmaEncoderProperties properties, Stream stream, - bool foo) + static byte[] CompressDataToStreamWithLZMA(byte[] data, LzmaEncoderProperties properties, Stream stream) { byte[] propertiesArray; diff --git a/Aaru.Images/Apple2MG/Constants.cs b/Aaru.Images/Apple2MG/Constants.cs index 709aa571d..919e93dd1 100644 --- a/Aaru.Images/Apple2MG/Constants.cs +++ b/Aaru.Images/Apple2MG/Constants.cs @@ -30,8 +30,11 @@ // Copyright © 2011-2020 Natalia Portillo // ****************************************************************************/ +using System.Diagnostics.CodeAnalysis; + namespace Aaru.DiscImages { + [SuppressMessage("ReSharper", "UnusedMember.Local")] public partial class Apple2Mg { /// Magic number, "2IMG" diff --git a/Aaru.Images/AppleNIB/Constants.cs b/Aaru.Images/AppleNIB/Constants.cs index 8d06b2fb2..bbe18d7e5 100644 --- a/Aaru.Images/AppleNIB/Constants.cs +++ b/Aaru.Images/AppleNIB/Constants.cs @@ -30,8 +30,11 @@ // Copyright © 2011-2020 Natalia Portillo // ****************************************************************************/ +using System.Diagnostics.CodeAnalysis; + namespace Aaru.DiscImages { + [SuppressMessage("ReSharper", "UnusedMember.Local")] public partial class AppleNib { readonly byte[] apple3_sign = diff --git a/Aaru.Images/BLU/Write.cs b/Aaru.Images/BLU/Write.cs index 683609ba9..e87ea3d5a 100644 --- a/Aaru.Images/BLU/Write.cs +++ b/Aaru.Images/BLU/Write.cs @@ -230,7 +230,7 @@ namespace Aaru.DiscImages break; // Priam tag, copy to Priam - case 12 when longSectorSize == 536: + case 24 when longSectorSize == 536: newTag = new byte[24]; Array.Copy(data, 512, newTag, 0, 24); @@ -335,7 +335,7 @@ namespace Aaru.DiscImages break; // Priam tag, copy to Priam - case 12 when longSectorSize == 536: + case 24 when longSectorSize == 536: newTag = new byte[24]; Array.Copy(data, (givenSectorSize * i) + 512, newTag, 0, 24); diff --git a/Aaru.Images/BlindWrite5/Enums.cs b/Aaru.Images/BlindWrite5/Enums.cs index a4a102e26..a2a18091c 100644 --- a/Aaru.Images/BlindWrite5/Enums.cs +++ b/Aaru.Images/BlindWrite5/Enums.cs @@ -30,8 +30,11 @@ // Copyright © 2011-2020 Natalia Portillo // ****************************************************************************/ +using System.Diagnostics.CodeAnalysis; + namespace Aaru.DiscImages { + [SuppressMessage("ReSharper", "UnusedMember.Local")] public partial class BlindWrite5 { enum Bw5TrackType : byte diff --git a/Aaru.Images/CDRWin/Structs.cs b/Aaru.Images/CDRWin/Structs.cs index 402a24564..acc9c6397 100644 --- a/Aaru.Images/CDRWin/Structs.cs +++ b/Aaru.Images/CDRWin/Structs.cs @@ -35,6 +35,8 @@ using Aaru.CommonTypes; using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Structs; +// ReSharper disable NotAccessedField.Local + namespace Aaru.DiscImages { public partial class CdrWin diff --git a/Aaru.Images/CHD/CHD.cs b/Aaru.Images/CHD/CHD.cs index c4c689d72..15a100697 100644 --- a/Aaru.Images/CHD/CHD.cs +++ b/Aaru.Images/CHD/CHD.cs @@ -31,6 +31,7 @@ // ****************************************************************************/ using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.IO; using Aaru.CommonTypes; using Aaru.CommonTypes.Enums; @@ -41,6 +42,7 @@ using Aaru.Decoders.CD; namespace Aaru.DiscImages { // TODO: Implement PCMCIA support + [SuppressMessage("ReSharper", "NotAccessedField.Local")] public partial class Chd : IOpticalMediaImage, IVerifiableImage { /// "MComprHD" diff --git a/Aaru.Images/CHD/Constants.cs b/Aaru.Images/CHD/Constants.cs index 4e6b24955..d3e0be26b 100644 --- a/Aaru.Images/CHD/Constants.cs +++ b/Aaru.Images/CHD/Constants.cs @@ -30,8 +30,11 @@ // Copyright © 2011-2020 Natalia Portillo // ****************************************************************************/ +using System.Diagnostics.CodeAnalysis; + namespace Aaru.DiscImages { + [SuppressMessage("ReSharper", "UnusedMember.Local")] public partial class Chd { /// "GDDD" diff --git a/Aaru.Images/CHD/Enums.cs b/Aaru.Images/CHD/Enums.cs index e7d669768..547c35093 100644 --- a/Aaru.Images/CHD/Enums.cs +++ b/Aaru.Images/CHD/Enums.cs @@ -30,8 +30,11 @@ // Copyright © 2011-2020 Natalia Portillo // ****************************************************************************/ +using System.Diagnostics.CodeAnalysis; + namespace Aaru.DiscImages { + [SuppressMessage("ReSharper", "UnusedMember.Local")] public partial class Chd { enum ChdCompression : uint diff --git a/Aaru.Images/CHD/Read.cs b/Aaru.Images/CHD/Read.cs index 51cd9d38e..504acde14 100644 --- a/Aaru.Images/CHD/Read.cs +++ b/Aaru.Images/CHD/Read.cs @@ -32,6 +32,7 @@ using System; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.IO; using System.Linq; using System.Text; @@ -51,6 +52,7 @@ namespace Aaru.DiscImages { public partial class Chd { + [SuppressMessage("ReSharper", "UnusedVariable")] public bool Open(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); diff --git a/Aaru.Images/CHD/Structs.cs b/Aaru.Images/CHD/Structs.cs index bd9e6c9c7..5ffea45b6 100644 --- a/Aaru.Images/CHD/Structs.cs +++ b/Aaru.Images/CHD/Structs.cs @@ -30,10 +30,12 @@ // Copyright © 2011-2020 Natalia Portillo // ****************************************************************************/ +using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; namespace Aaru.DiscImages { + [SuppressMessage("ReSharper", "UnusedType.Local")] public partial class Chd { // Hunks are represented in a 64 bit integer with 44 bit as offset, 20 bits as length diff --git a/Aaru.Images/CopyQM/Constants.cs b/Aaru.Images/CopyQM/Constants.cs index 5980c6c27..774278e07 100644 --- a/Aaru.Images/CopyQM/Constants.cs +++ b/Aaru.Images/CopyQM/Constants.cs @@ -30,8 +30,11 @@ // Copyright © 2011-2020 Natalia Portillo // ****************************************************************************/ +using System.Diagnostics.CodeAnalysis; + namespace Aaru.DiscImages { + [SuppressMessage("ReSharper", "UnusedMember.Local")] public partial class CopyQm { const ushort COPYQM_MAGIC = 0x5143; diff --git a/Aaru.Images/D88/Constants.cs b/Aaru.Images/D88/Constants.cs index 4278d86a1..077073b26 100644 --- a/Aaru.Images/D88/Constants.cs +++ b/Aaru.Images/D88/Constants.cs @@ -30,8 +30,11 @@ // Copyright © 2011-2020 Natalia Portillo // ****************************************************************************/ +using System.Diagnostics.CodeAnalysis; + namespace Aaru.DiscImages { + [SuppressMessage("ReSharper", "UnusedMember.Local")] public partial class D88 { const byte READ_ONLY = 0x10; diff --git a/Aaru.Images/D88/Enums.cs b/Aaru.Images/D88/Enums.cs index 1244e70b4..6f07a6e0e 100644 --- a/Aaru.Images/D88/Enums.cs +++ b/Aaru.Images/D88/Enums.cs @@ -30,8 +30,11 @@ // Copyright © 2011-2020 Natalia Portillo // ****************************************************************************/ +using System.Diagnostics.CodeAnalysis; + namespace Aaru.DiscImages { + [SuppressMessage("ReSharper", "UnusedMember.Local"), SuppressMessage("ReSharper", "UnusedType.Local")] public partial class D88 { enum DiskType : byte diff --git a/Aaru.Images/DART/Constants.cs b/Aaru.Images/DART/Constants.cs index e1a99061b..536cb7784 100644 --- a/Aaru.Images/DART/Constants.cs +++ b/Aaru.Images/DART/Constants.cs @@ -30,8 +30,11 @@ // Copyright © 2011-2020 Natalia Portillo // ****************************************************************************/ +using System.Diagnostics.CodeAnalysis; + namespace Aaru.DiscImages { + [SuppressMessage("ReSharper", "UnusedMember.Local")] public partial class Dart { // Disk types diff --git a/Aaru.Images/DriDiskCopy/Enums.cs b/Aaru.Images/DriDiskCopy/Enums.cs index f0e10879f..db4fcbf8f 100644 --- a/Aaru.Images/DriDiskCopy/Enums.cs +++ b/Aaru.Images/DriDiskCopy/Enums.cs @@ -34,6 +34,7 @@ using System.Diagnostics.CodeAnalysis; namespace Aaru.DiscImages { + [SuppressMessage("ReSharper", "UnusedMember.Local")] public partial class DriDiskCopy { /// Drive codes change according to CMOS stored valued diff --git a/Aaru.Images/HDCopy/HDCopy.cs b/Aaru.Images/HDCopy/HDCopy.cs index 1c762989d..b862b913e 100644 --- a/Aaru.Images/HDCopy/HDCopy.cs +++ b/Aaru.Images/HDCopy/HDCopy.cs @@ -68,6 +68,8 @@ using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Structs; +// ReSharper disable NotAccessedField.Local + namespace Aaru.DiscImages { public partial class HdCopy : IMediaImage diff --git a/Aaru.Images/HDCopy/Structs.cs b/Aaru.Images/HDCopy/Structs.cs index ceb7d1289..36829738f 100644 --- a/Aaru.Images/HDCopy/Structs.cs +++ b/Aaru.Images/HDCopy/Structs.cs @@ -31,10 +31,12 @@ // Copyright © 2011-2020 Natalia Portillo // ****************************************************************************/ +using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; namespace Aaru.DiscImages { + [SuppressMessage("ReSharper", "UnusedType.Local")] public partial class HdCopy { /// The global header of a HDCP image file diff --git a/Aaru.Images/IMD/Constants.cs b/Aaru.Images/IMD/Constants.cs index db6ee3129..5f638f5a6 100644 --- a/Aaru.Images/IMD/Constants.cs +++ b/Aaru.Images/IMD/Constants.cs @@ -30,8 +30,11 @@ // Copyright © 2011-2020 Natalia Portillo // ****************************************************************************/ +using System.Diagnostics.CodeAnalysis; + namespace Aaru.DiscImages { + [SuppressMessage("ReSharper", "UnusedMember.Local")] public partial class Imd { const byte SECTOR_CYLINDER_MAP_MASK = 0x80; diff --git a/Aaru.Images/KryoFlux/Constants.cs b/Aaru.Images/KryoFlux/Constants.cs index 5aa7bacc6..8e0111672 100644 --- a/Aaru.Images/KryoFlux/Constants.cs +++ b/Aaru.Images/KryoFlux/Constants.cs @@ -30,8 +30,11 @@ // Copyright © 2011-2020 Natalia Portillo // ****************************************************************************/ +using System.Diagnostics.CodeAnalysis; + namespace Aaru.DiscImages { + [SuppressMessage("ReSharper", "UnusedMember.Local")] public partial class KryoFlux { const string hostDate = "host_date"; diff --git a/Aaru.Images/KryoFlux/Enums.cs b/Aaru.Images/KryoFlux/Enums.cs index fb2070cb3..6ca0a7d8b 100644 --- a/Aaru.Images/KryoFlux/Enums.cs +++ b/Aaru.Images/KryoFlux/Enums.cs @@ -30,8 +30,11 @@ // Copyright © 2011-2020 Natalia Portillo // ****************************************************************************/ +using System.Diagnostics.CodeAnalysis; + namespace Aaru.DiscImages { + [SuppressMessage("ReSharper", "UnusedMember.Local")] public partial class KryoFlux { enum BlockIds : byte diff --git a/Aaru.Images/MaxiDisk/Enums.cs b/Aaru.Images/MaxiDisk/Enums.cs index e7730de9d..08dca214d 100644 --- a/Aaru.Images/MaxiDisk/Enums.cs +++ b/Aaru.Images/MaxiDisk/Enums.cs @@ -30,8 +30,11 @@ // Copyright © 2011-2020 Natalia Portillo // ****************************************************************************/ +using System.Diagnostics.CodeAnalysis; + namespace Aaru.DiscImages { + [SuppressMessage("ReSharper", "UnusedMember.Local")] public partial class MaxiDisk { enum HdkDiskTypes : byte diff --git a/Aaru.Images/NDIF/Constants.cs b/Aaru.Images/NDIF/Constants.cs index 943ad9a73..064e51ef8 100644 --- a/Aaru.Images/NDIF/Constants.cs +++ b/Aaru.Images/NDIF/Constants.cs @@ -30,8 +30,11 @@ // Copyright © 2011-2020 Natalia Portillo // ****************************************************************************/ +using System.Diagnostics.CodeAnalysis; + namespace Aaru.DiscImages { + [SuppressMessage("ReSharper", "UnusedMember.Local")] public partial class Ndif { /// Resource OSType for NDIF is "bcem" diff --git a/Aaru.Images/NDIF/Structs.cs b/Aaru.Images/NDIF/Structs.cs index 0c748dd8c..684ba1854 100644 --- a/Aaru.Images/NDIF/Structs.cs +++ b/Aaru.Images/NDIF/Structs.cs @@ -31,10 +31,12 @@ // ****************************************************************************/ using System; +using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; namespace Aaru.DiscImages { + [SuppressMessage("ReSharper", "UnusedType.Local")] public partial class Ndif { [StructLayout(LayoutKind.Sequential, Pack = 1)] diff --git a/Aaru.Images/Nero/Enums.cs b/Aaru.Images/Nero/Enums.cs index 7b719f438..47f6e2023 100644 --- a/Aaru.Images/Nero/Enums.cs +++ b/Aaru.Images/Nero/Enums.cs @@ -35,6 +35,7 @@ using System.Diagnostics.CodeAnalysis; namespace Aaru.DiscImages { + [SuppressMessage("ReSharper", "UnusedMember.Local")] public partial class Nero { enum DaoMode : ushort diff --git a/Aaru.Images/Nero/Structs.cs b/Aaru.Images/Nero/Structs.cs index fdf553c5b..f2284db99 100644 --- a/Aaru.Images/Nero/Structs.cs +++ b/Aaru.Images/Nero/Structs.cs @@ -31,9 +31,13 @@ // ****************************************************************************/ using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; + +// ReSharper disable NotAccessedField.Local namespace Aaru.DiscImages { + [SuppressMessage("ReSharper", "UnusedType.Local")] public partial class Nero { struct NeroV1Footer diff --git a/Aaru.Images/Parallels/Constants.cs b/Aaru.Images/Parallels/Constants.cs index 90935b01a..f9c6334a7 100644 --- a/Aaru.Images/Parallels/Constants.cs +++ b/Aaru.Images/Parallels/Constants.cs @@ -30,8 +30,11 @@ // Copyright © 2011-2020 Natalia Portillo // ****************************************************************************/ +using System.Diagnostics.CodeAnalysis; + namespace Aaru.DiscImages { + [SuppressMessage("ReSharper", "UnusedMember.Local")] public partial class Parallels { const uint PARALLELS_VERSION = 2; diff --git a/Aaru.Images/Parallels/Parallels.cs b/Aaru.Images/Parallels/Parallels.cs index 3b8cf7695..9606ef47f 100644 --- a/Aaru.Images/Parallels/Parallels.cs +++ b/Aaru.Images/Parallels/Parallels.cs @@ -36,6 +36,8 @@ using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Structs; +// ReSharper disable NotAccessedField.Local + namespace Aaru.DiscImages { public partial class Parallels : IWritableImage diff --git a/Aaru.Images/Partimage/Constants.cs b/Aaru.Images/Partimage/Constants.cs index 29a5c8ab0..051f9f334 100644 --- a/Aaru.Images/Partimage/Constants.cs +++ b/Aaru.Images/Partimage/Constants.cs @@ -30,8 +30,11 @@ // Copyright © 2011-2020 Natalia Portillo // ****************************************************************************/ +using System.Diagnostics.CodeAnalysis; + namespace Aaru.DiscImages { + [SuppressMessage("ReSharper", "UnusedMember.Local")] public partial class Partimage { const int MAX_DESCRIPTION = 4096; diff --git a/Aaru.Images/Partimage/Enums.cs b/Aaru.Images/Partimage/Enums.cs index f4a28ed3c..d4e4f811e 100644 --- a/Aaru.Images/Partimage/Enums.cs +++ b/Aaru.Images/Partimage/Enums.cs @@ -30,8 +30,11 @@ // Copyright © 2011-2020 Natalia Portillo // ****************************************************************************/ +using System.Diagnostics.CodeAnalysis; + namespace Aaru.DiscImages { + [SuppressMessage("ReSharper", "UnusedMember.Local")] public partial class Partimage { enum PCompression : uint diff --git a/Aaru.Images/Partimage/Structs.cs b/Aaru.Images/Partimage/Structs.cs index 629df5976..83ca237ec 100644 --- a/Aaru.Images/Partimage/Structs.cs +++ b/Aaru.Images/Partimage/Structs.cs @@ -30,10 +30,12 @@ // Copyright © 2011-2020 Natalia Portillo // ****************************************************************************/ +using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; namespace Aaru.DiscImages { + [SuppressMessage("ReSharper", "UnusedType.Local")] public partial class Partimage { /// Partimage disk image header, little-endian diff --git a/Aaru.Images/QCOW2/Constants.cs b/Aaru.Images/QCOW2/Constants.cs index 9f83779c4..848c0763c 100644 --- a/Aaru.Images/QCOW2/Constants.cs +++ b/Aaru.Images/QCOW2/Constants.cs @@ -30,8 +30,11 @@ // Copyright © 2011-2020 Natalia Portillo // ****************************************************************************/ +using System.Diagnostics.CodeAnalysis; + namespace Aaru.DiscImages { + [SuppressMessage("ReSharper", "UnusedMember.Local")] public partial class Qcow2 { /// Magic number: 'Q', 'F', 'I', 0xFB diff --git a/Aaru.Images/QED/Constants.cs b/Aaru.Images/QED/Constants.cs index 38c17d804..fb86d7ca7 100644 --- a/Aaru.Images/QED/Constants.cs +++ b/Aaru.Images/QED/Constants.cs @@ -30,8 +30,11 @@ // Copyright © 2011-2020 Natalia Portillo // ****************************************************************************/ +using System.Diagnostics.CodeAnalysis; + namespace Aaru.DiscImages { + [SuppressMessage("ReSharper", "UnusedMember.Local")] public partial class Qed { /// Magic number: 'Q', 'E', 'D', 0x00 diff --git a/Aaru.Images/RayDIM/Enums.cs b/Aaru.Images/RayDIM/Enums.cs index d8dc2f332..4b439de1d 100644 --- a/Aaru.Images/RayDIM/Enums.cs +++ b/Aaru.Images/RayDIM/Enums.cs @@ -34,6 +34,7 @@ using System.Diagnostics.CodeAnalysis; namespace Aaru.DiscImages { + [SuppressMessage("ReSharper", "UnusedMember.Local")] public partial class RayDim { [SuppressMessage("ReSharper", "InconsistentNaming")] diff --git a/Aaru.Images/TeleDisk/Constants.cs b/Aaru.Images/TeleDisk/Constants.cs index 40ef4ea5c..6f6bcb2ce 100644 --- a/Aaru.Images/TeleDisk/Constants.cs +++ b/Aaru.Images/TeleDisk/Constants.cs @@ -30,8 +30,11 @@ // Copyright © 2011-2020 Natalia Portillo // ****************************************************************************/ +using System.Diagnostics.CodeAnalysis; + namespace Aaru.DiscImages { + [SuppressMessage("ReSharper", "UnusedMember.Local")] public partial class TeleDisk { // "TD" as little endian uint. diff --git a/Aaru.Images/UDIF/Constants.cs b/Aaru.Images/UDIF/Constants.cs index 12686af55..bda15d94b 100644 --- a/Aaru.Images/UDIF/Constants.cs +++ b/Aaru.Images/UDIF/Constants.cs @@ -30,8 +30,11 @@ // Copyright © 2011-2020 Natalia Portillo // ****************************************************************************/ +using System.Diagnostics.CodeAnalysis; + namespace Aaru.DiscImages { + [SuppressMessage("ReSharper", "UnusedMember.Local")] public partial class Udif { const uint UDIF_SIGNATURE = 0x6B6F6C79; diff --git a/Aaru.Images/UkvFdi/Enums.cs b/Aaru.Images/UkvFdi/Enums.cs index 13d98058c..4961c8a0b 100644 --- a/Aaru.Images/UkvFdi/Enums.cs +++ b/Aaru.Images/UkvFdi/Enums.cs @@ -31,9 +31,11 @@ // ****************************************************************************/ using System; +using System.Diagnostics.CodeAnalysis; namespace Aaru.DiscImages { + [SuppressMessage("ReSharper", "UnusedMember.Local")] public partial class UkvFdi { [Flags] diff --git a/Aaru.Images/VDI/Enums.cs b/Aaru.Images/VDI/Enums.cs index b03094936..78a35067e 100644 --- a/Aaru.Images/VDI/Enums.cs +++ b/Aaru.Images/VDI/Enums.cs @@ -30,8 +30,11 @@ // Copyright © 2011-2020 Natalia Portillo // ****************************************************************************/ +using System.Diagnostics.CodeAnalysis; + namespace Aaru.DiscImages { + [SuppressMessage("ReSharper", "UnusedMember.Local")] public partial class Vdi { enum VdiImageType : uint diff --git a/Aaru.Images/VHD/Constants.cs b/Aaru.Images/VHD/Constants.cs index 61c8c9281..40fb0c75b 100644 --- a/Aaru.Images/VHD/Constants.cs +++ b/Aaru.Images/VHD/Constants.cs @@ -30,8 +30,11 @@ // Copyright © 2011-2020 Natalia Portillo // ****************************************************************************/ +using System.Diagnostics.CodeAnalysis; + namespace Aaru.DiscImages { + [SuppressMessage("ReSharper", "UnusedMember.Local")] public partial class Vhd { /// File magic number, "conectix" diff --git a/Aaru.Images/VHDX/Constants.cs b/Aaru.Images/VHDX/Constants.cs index 907f90678..445729b51 100644 --- a/Aaru.Images/VHDX/Constants.cs +++ b/Aaru.Images/VHDX/Constants.cs @@ -31,9 +31,11 @@ // ****************************************************************************/ using System; +using System.Diagnostics.CodeAnalysis; namespace Aaru.DiscImages { + [SuppressMessage("ReSharper", "UnusedMember.Local")] public partial class Vhdx { const ulong VHDX_SIGNATURE = 0x656C696678646876; diff --git a/Aaru.Images/VHDX/VHDX.cs b/Aaru.Images/VHDX/VHDX.cs index 8cd04ebbf..053ffb0c8 100644 --- a/Aaru.Images/VHDX/VHDX.cs +++ b/Aaru.Images/VHDX/VHDX.cs @@ -37,6 +37,8 @@ using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Structs; +// ReSharper disable NotAccessedField.Local + namespace Aaru.DiscImages { public partial class Vhdx : IMediaImage diff --git a/Aaru.Images/VMware/Constants.cs b/Aaru.Images/VMware/Constants.cs index d67602ca9..ca1b4290b 100644 --- a/Aaru.Images/VMware/Constants.cs +++ b/Aaru.Images/VMware/Constants.cs @@ -30,8 +30,11 @@ // Copyright © 2011-2020 Natalia Portillo // ****************************************************************************/ +using System.Diagnostics.CodeAnalysis; + namespace Aaru.DiscImages { + [SuppressMessage("ReSharper", "UnusedMember.Local")] public partial class VMware { const uint VMWARE_EXTENT_MAGIC = 0x564D444B; diff --git a/Aaru.Images/WCDiskImage/WCDiskImage.cs b/Aaru.Images/WCDiskImage/WCDiskImage.cs index 949507468..9dc05a33d 100644 --- a/Aaru.Images/WCDiskImage/WCDiskImage.cs +++ b/Aaru.Images/WCDiskImage/WCDiskImage.cs @@ -32,12 +32,14 @@ // ****************************************************************************/ using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Structs; namespace Aaru.DiscImages { + [SuppressMessage("ReSharper", "NotAccessedField.Local")] public partial class WCDiskImage : IMediaImage { public Dictionary<(int cylinder, int head, int sector), bool> badSectors = diff --git a/Aaru.Partitions/AppleMap.cs b/Aaru.Partitions/AppleMap.cs index 16cdd65e6..56aa57ef1 100644 --- a/Aaru.Partitions/AppleMap.cs +++ b/Aaru.Partitions/AppleMap.cs @@ -32,6 +32,7 @@ using System; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; using System.Text; using Aaru.CommonTypes; @@ -43,6 +44,7 @@ namespace Aaru.Partitions { // Information about structures learnt from Inside Macintosh // Constants from image testing + [SuppressMessage("ReSharper", "UnusedMember.Local")] public class AppleMap : IPartition { /// "ER", driver descriptor magic diff --git a/Aaru.Partitions/BSD.cs b/Aaru.Partitions/BSD.cs index 14b96a25b..bf2b10088 100644 --- a/Aaru.Partitions/BSD.cs +++ b/Aaru.Partitions/BSD.cs @@ -32,6 +32,7 @@ using System; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Runtime.InteropServices; using Aaru.CommonTypes; @@ -41,6 +42,7 @@ using Marshal = Aaru.Helpers.Marshal; namespace Aaru.Partitions { + [SuppressMessage("ReSharper", "UnusedMember.Local")] public class BSD : IPartition { const uint DISKMAGIC = 0x82564557; diff --git a/Aaru.Partitions/DragonFlyBSD.cs b/Aaru.Partitions/DragonFlyBSD.cs index 669588623..51e3b40b0 100644 --- a/Aaru.Partitions/DragonFlyBSD.cs +++ b/Aaru.Partitions/DragonFlyBSD.cs @@ -32,6 +32,7 @@ using System; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; using Aaru.CommonTypes; using Aaru.CommonTypes.Interfaces; @@ -39,6 +40,7 @@ using Marshal = Aaru.Helpers.Marshal; namespace Aaru.Partitions { + [SuppressMessage("ReSharper", "UnusedMember.Local")] public class DragonFlyBSD : IPartition { const uint DISK_MAGIC64 = 0xC4464C59; diff --git a/Aaru.Partitions/GPT.cs b/Aaru.Partitions/GPT.cs index de4ce1bbb..1be7aba9a 100644 --- a/Aaru.Partitions/GPT.cs +++ b/Aaru.Partitions/GPT.cs @@ -32,6 +32,7 @@ using System; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Runtime.InteropServices; using Aaru.CommonTypes; @@ -42,6 +43,7 @@ using Marshal = Aaru.Helpers.Marshal; namespace Aaru.Partitions { + [SuppressMessage("ReSharper", "UnusedMember.Local")] public class GuidPartitionTable : IPartition { const ulong GPT_MAGIC = 0x5452415020494645; diff --git a/Aaru.Partitions/MBR.cs b/Aaru.Partitions/MBR.cs index 4f5d8aa60..cd851c0b5 100644 --- a/Aaru.Partitions/MBR.cs +++ b/Aaru.Partitions/MBR.cs @@ -32,6 +32,7 @@ using System; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; using Aaru.CommonTypes; using Aaru.CommonTypes.Enums; @@ -253,6 +254,7 @@ namespace Aaru.Partitions public Guid Id => new Guid("5E8A34E8-4F1A-59E6-4BF7-7EA647063A76"); public string Author => "Natalia Portillo"; + [SuppressMessage("ReSharper", "UnusedVariable")] public bool GetInformation(IMediaImage imagePlugin, out List partitions, ulong sectorOffset) { ulong counter = 0; diff --git a/Aaru.Partitions/NeXT.cs b/Aaru.Partitions/NeXT.cs index fa59a5031..d561683fd 100644 --- a/Aaru.Partitions/NeXT.cs +++ b/Aaru.Partitions/NeXT.cs @@ -32,6 +32,7 @@ using System; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Runtime.InteropServices; using System.Text; @@ -43,6 +44,7 @@ using Marshal = Aaru.Helpers.Marshal; // Information learnt from XNU source and testing against real disks namespace Aaru.Partitions { + [SuppressMessage("ReSharper", "UnusedMember.Local"), SuppressMessage("ReSharper", "UnusedType.Local")] public class NeXTDisklabel : IPartition { /// "NeXT" diff --git a/Aaru.Partitions/RDB.cs b/Aaru.Partitions/RDB.cs index 3e35d905f..ee51a5637 100644 --- a/Aaru.Partitions/RDB.cs +++ b/Aaru.Partitions/RDB.cs @@ -32,6 +32,7 @@ using System; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Text; using Aaru.Checksums; @@ -39,8 +40,11 @@ using Aaru.CommonTypes; using Aaru.CommonTypes.Interfaces; using Aaru.Console; +// ReSharper disable NotAccessedField.Local + namespace Aaru.Partitions { + [SuppressMessage("ReSharper", "UnusedMember.Local")] public class AmigaRigidDiskBlock : IPartition { /// RDB magic number "RDSK" diff --git a/Aaru.Partitions/VTOC.cs b/Aaru.Partitions/VTOC.cs index a3c43d940..e5c705292 100644 --- a/Aaru.Partitions/VTOC.cs +++ b/Aaru.Partitions/VTOC.cs @@ -32,6 +32,7 @@ using System; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Runtime.InteropServices; using Aaru.CommonTypes; @@ -41,6 +42,7 @@ using Marshal = Aaru.Helpers.Marshal; namespace Aaru.Partitions { + [SuppressMessage("ReSharper", "UnusedMember.Local")] public class VTOC : IPartition { const uint PD_MAGIC = 0xCA5E600D; diff --git a/Aaru.Partitions/Xbox.cs b/Aaru.Partitions/Xbox.cs index 4ce315d3b..9213dfc8b 100644 --- a/Aaru.Partitions/Xbox.cs +++ b/Aaru.Partitions/Xbox.cs @@ -32,6 +32,7 @@ using System; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; using Aaru.CommonTypes; using Aaru.CommonTypes.Interfaces; @@ -39,6 +40,7 @@ using Marshal = Aaru.Helpers.Marshal; namespace Aaru.Partitions { + [SuppressMessage("ReSharper", "UnusedMember.Local")] public class Xbox : IPartition { const uint XboxCigam = 0x46415458; diff --git a/Aaru.Settings/Settings.cs b/Aaru.Settings/Settings.cs index e62bc38b2..9cd6a5b6f 100644 --- a/Aaru.Settings/Settings.cs +++ b/Aaru.Settings/Settings.cs @@ -99,7 +99,6 @@ namespace Aaru.Settings { const string XDG_DATA_HOME = "XDG_DATA_HOME"; const string XDG_CONFIG_HOME = "XDG_CONFIG_HOME"; - const string OLD_DATA_HOME = ".claunia.com"; const string XDG_DATA_HOME_RESOLVED = ".local/share"; const string XDG_CONFIG_HOME_RESOLVED = ".config"; /// Current statistcs diff --git a/Aaru.Tests/Filesystems/LFS.cs b/Aaru.Tests/Filesystems/LFS.cs index 0bf40cbcf..fc9bd2211 100644 --- a/Aaru.Tests/Filesystems/LFS.cs +++ b/Aaru.Tests/Filesystems/LFS.cs @@ -29,6 +29,8 @@ using System; using NUnit.Framework; +// ReSharper disable UnusedMember.Local + namespace Aaru.Tests.Filesystems { [TestFixture] diff --git a/Aaru.Tests/Filesystems/NWFS386.cs b/Aaru.Tests/Filesystems/NWFS386.cs index 3bf434716..a186d9c9e 100644 --- a/Aaru.Tests/Filesystems/NWFS386.cs +++ b/Aaru.Tests/Filesystems/NWFS386.cs @@ -27,11 +27,12 @@ // ****************************************************************************/ using System; +using System.Diagnostics.CodeAnalysis; using NUnit.Framework; namespace Aaru.Tests.Filesystems { - [TestFixture] + [TestFixture, SuppressMessage("ReSharper", "UnusedMember.Local")] public class Nwfs386 { readonly string[] testfiles = diff --git a/Aaru.Tests/Filesystems/OCFS2.cs b/Aaru.Tests/Filesystems/OCFS2.cs index e336c8ea5..ba1680dcc 100644 --- a/Aaru.Tests/Filesystems/OCFS2.cs +++ b/Aaru.Tests/Filesystems/OCFS2.cs @@ -29,6 +29,8 @@ using System; using NUnit.Framework; +// ReSharper disable UnusedMember.Local + namespace Aaru.Tests.Filesystems { [TestFixture] diff --git a/Aaru.Tests/Filters/AppleDoubleOsX.cs b/Aaru.Tests/Filters/AppleDoubleOsX.cs index 7d2be0965..0e335b28e 100644 --- a/Aaru.Tests/Filters/AppleDoubleOsX.cs +++ b/Aaru.Tests/Filters/AppleDoubleOsX.cs @@ -61,7 +61,6 @@ namespace Aaru.Tests.Filters str.Close(); str.Dispose(); filter.Close(); - var ctx = new Md5Context(); string result = Md5Context.Data(data, out _); Assert.AreEqual(EXPECTED_CONTENTS, result); } @@ -69,11 +68,9 @@ namespace Aaru.Tests.Filters [Test] public void CheckCorrectFile() { - var ctx = new Md5Context(); string result = Md5Context.File(location, out _); Assert.AreEqual(EXPECTED_FILE, result); - ctx = new Md5Context(); result = Md5Context.File(sidecar, out _); Assert.AreEqual(EXPECTED_SIDECAR, result); } @@ -96,7 +93,6 @@ namespace Aaru.Tests.Filters str.Close(); str.Dispose(); filter.Close(); - var ctx = new Md5Context(); string result = Md5Context.Data(data, out _); Assert.AreEqual(EXPECTED_RESOURCE, result); } diff --git a/Aaru/Commands/Device/Info.cs b/Aaru/Commands/Device/Info.cs index f7f2056fb..7019a5847 100644 --- a/Aaru/Commands/Device/Info.cs +++ b/Aaru/Commands/Device/Info.cs @@ -120,7 +120,7 @@ namespace Aaru.Commands.Device } catch(DeviceException e) { - AaruConsole.ErrorWriteLine(e.Message ?? Error.Print(e.LastError)); + AaruConsole.ErrorWriteLine(e.Message); return (int)ErrorNumber.CannotOpenDevice; } diff --git a/Aaru/Commands/Image/Compare.cs b/Aaru/Commands/Image/Compare.cs index 530c48d8a..8d1ecd9ff 100644 --- a/Aaru/Commands/Image/Compare.cs +++ b/Aaru/Commands/Image/Compare.cs @@ -39,7 +39,6 @@ using System.Text; using Aaru.CommonTypes; using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; -using Aaru.CommonTypes.Structs; using Aaru.Console; using Aaru.Core; using ImageInfo = Aaru.CommonTypes.Structs.ImageInfo; @@ -168,8 +167,6 @@ namespace Aaru.Commands.Image ImageInfo image1Info = input1Format.Info; ImageInfo image2Info = input2Format.Info; - List image1Sessions = new List(); - List image2Sessions = new List(); Dictionary image1DiskTags = new Dictionary(); Dictionary image2DiskTags = new Dictionary(); diff --git a/Aaru/Commands/Image/Entropy.cs b/Aaru/Commands/Image/Entropy.cs index c8ea01780..4cebb8051 100644 --- a/Aaru/Commands/Image/Entropy.cs +++ b/Aaru/Commands/Image/Entropy.cs @@ -125,7 +125,7 @@ namespace Aaru.Commands.Image Statistics.AddMedia(inputFormat.Info.MediaType, false); Statistics.AddFilter(inputFilter.Name); - var entropyCalculator = new Entropy(debug, verbose, inputFormat); + var entropyCalculator = new Entropy(debug, inputFormat); entropyCalculator.InitProgressEvent += Progress.InitProgress; entropyCalculator.InitProgress2Event += Progress.InitProgress2; entropyCalculator.UpdateProgressEvent += Progress.UpdateProgress; diff --git a/Aaru/Commands/Media/Info.cs b/Aaru/Commands/Media/Info.cs index 86190ea48..77708c548 100644 --- a/Aaru/Commands/Media/Info.cs +++ b/Aaru/Commands/Media/Info.cs @@ -126,7 +126,7 @@ namespace Aaru.Commands.Media } catch(DeviceException e) { - AaruConsole.ErrorWriteLine(e.Message ?? Error.Print(e.LastError)); + AaruConsole.ErrorWriteLine(e.Message); return (int)ErrorNumber.CannotOpenDevice; } @@ -150,7 +150,7 @@ namespace Aaru.Commands.Media break; case DeviceType.ATAPI: case DeviceType.SCSI: - DoScsiMediaInfo(debug, verbose, outputPrefix, dev); + DoScsiMediaInfo(debug, outputPrefix, dev); break; default: throw new NotSupportedException("Unknown device type."); @@ -166,7 +166,7 @@ namespace Aaru.Commands.Media static void DoSdMediaInfo() => AaruConsole.ErrorWriteLine("Please use device-info command for MMC/SD devices."); - static void DoScsiMediaInfo(bool debug, bool verbose, string outputPrefix, Devices.Device dev) + static void DoScsiMediaInfo(bool debug, string outputPrefix, Devices.Device dev) { var scsiInfo = new ScsiInfo(dev);