diff --git a/Aaru.Checksums b/Aaru.Checksums index e28d38c8a..c1f291814 160000 --- a/Aaru.Checksums +++ b/Aaru.Checksums @@ -1 +1 @@ -Subproject commit e28d38c8ae2c8d179851ec1989af76cbcd4fdeb3 +Subproject commit c1f291814cac4e8aa5b26ddb04205a321114539f diff --git a/Aaru.Core/Devices/Scanning/SCSI.cs b/Aaru.Core/Devices/Scanning/SCSI.cs index b5c9ac0a8..a7eee9b3d 100644 --- a/Aaru.Core/Devices/Scanning/SCSI.cs +++ b/Aaru.Core/Devices/Scanning/SCSI.cs @@ -52,7 +52,7 @@ namespace Aaru.Core.Devices.Scanning MhddLog mhddLog; IbgLog ibgLog; byte[] senseBuf; - bool sense = false; + bool sense; uint blockSize = 0; ushort currentProfile = 0x0001; bool foundReadCommand = false; diff --git a/Aaru.Decoders b/Aaru.Decoders index e9e427d50..cca4d5811 160000 --- a/Aaru.Decoders +++ b/Aaru.Decoders @@ -1 +1 @@ -Subproject commit e9e427d50bb7ec58ade0640702767bbb3f7ead02 +Subproject commit cca4d58115197476b1bbaf2318080ac82de48ee9 diff --git a/Aaru.Filesystems/EFS.cs b/Aaru.Filesystems/EFS.cs index 9e3d93c80..87969f6fb 100644 --- a/Aaru.Filesystems/EFS.cs +++ b/Aaru.Filesystems/EFS.cs @@ -131,7 +131,7 @@ namespace Aaru.Filesystems if(imagePlugin.Info.SectorSize < 512) return; - var efsSb = new Superblock(); + Superblock efsSb; // Misaligned if(imagePlugin.Info.XmlMediaType == XmlMediaType.OpticalDisc) diff --git a/Aaru.Filesystems/FAT/BPB.cs b/Aaru.Filesystems/FAT/BPB.cs index b33be5486..91e9ab343 100644 --- a/Aaru.Filesystems/FAT/BPB.cs +++ b/Aaru.Filesystems/FAT/BPB.cs @@ -422,7 +422,6 @@ namespace Aaru.Filesystems fat1Sector0[1] == 0xFF && validRootDir) { - useDecRainbowBpb = true; AaruConsole.DebugWriteLine("FAT plugin", "Using DEC Rainbow hardcoded BPB."); fakeBpb.bps = 512; fakeBpb.spc = 1; diff --git a/Aaru.Filesystems/FAT/Xattr.cs b/Aaru.Filesystems/FAT/Xattr.cs index 9ecfb31a2..81fa8bb0b 100644 --- a/Aaru.Filesystems/FAT/Xattr.cs +++ b/Aaru.Filesystems/FAT/Xattr.cs @@ -146,7 +146,6 @@ namespace Aaru.Filesystems byte[] eas = new byte[size]; Array.Copy(full, 0, eas, 0, size); - full = null; eaMs.Close(); return GetEas(eas); diff --git a/Aaru.Filesystems/UDF.cs b/Aaru.Filesystems/UDF.cs index 37457bbcc..0b683a325 100644 --- a/Aaru.Filesystems/UDF.cs +++ b/Aaru.Filesystems/UDF.cs @@ -279,10 +279,10 @@ namespace Aaru.Filesystems ulong count = 0; - var pvd = new PrimaryVolumeDescriptor(); - var lvd = new LogicalVolumeDescriptor(); - var lvid = new LogicalVolumeIntegrityDescriptor(); - var lvidiu = new LogicalVolumeIntegrityDescriptorImplementationUse(); + var pvd = new PrimaryVolumeDescriptor(); + var lvd = new LogicalVolumeDescriptor(); + LogicalVolumeIntegrityDescriptor lvid; + var lvidiu = new LogicalVolumeIntegrityDescriptorImplementationUse(); while(count < 256) { diff --git a/Aaru.Images/AaruFormat/Read.cs b/Aaru.Images/AaruFormat/Read.cs index f7ca5b3e3..b328a412d 100644 --- a/Aaru.Images/AaruFormat/Read.cs +++ b/Aaru.Images/AaruFormat/Read.cs @@ -466,7 +466,6 @@ namespace Aaru.DiscImages case DataType.CdSectorPrefixCorrected: case DataType.CdSectorSuffixCorrected: { - uint[] cdDdt = new uint[ddtHeader.entries]; byte[] decompressedDdt = new byte[ddtHeader.length]; AaruConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", @@ -509,7 +508,7 @@ namespace Aaru.DiscImages ImageNotSupportedException($"Found unsupported compression algorithm {(ushort)ddtHeader.compression}"); } - cdDdt = MemoryMarshal.Cast(decompressedDdt).ToArray(); + uint[] cdDdt = MemoryMarshal.Cast(decompressedDdt).ToArray(); switch(entry.dataType) { diff --git a/Aaru.Images/BlindWrite5/Read.cs b/Aaru.Images/BlindWrite5/Read.cs index f0b8aea3b..8a1a86977 100644 --- a/Aaru.Images/BlindWrite5/Read.cs +++ b/Aaru.Images/BlindWrite5/Read.cs @@ -787,7 +787,7 @@ namespace Aaru.DiscImages string? filename = Path.GetFileNameWithoutExtension(splitStartChars.FilePath); bool lowerCaseExtension = false; bool lowerCaseFileName = false; - string basePath = ""; + string basePath; bool version5 = string.Compare(Path.GetExtension(imageFilter.GetFilename()), ".B5T", StringComparison.OrdinalIgnoreCase) == 0; diff --git a/Aaru.Images/UDIF/Read.cs b/Aaru.Images/UDIF/Read.cs index fd0f6c3ce..35bcaa530 100644 --- a/Aaru.Images/UDIF/Read.cs +++ b/Aaru.Images/UDIF/Read.cs @@ -294,10 +294,9 @@ namespace Aaru.DiscImages foreach(byte[] blkxBytes in blkxList) { - var bHdr = new BlockHeader(); - byte[] bHdrB = new byte[Marshal.SizeOf()]; + byte[] bHdrB = new byte[Marshal.SizeOf()]; Array.Copy(blkxBytes, 0, bHdrB, 0, Marshal.SizeOf()); - bHdr = Marshal.ByteArrayToStructureBigEndian(bHdrB); + BlockHeader bHdr = Marshal.ByteArrayToStructureBigEndian(bHdrB); AaruConsole.DebugWriteLine("UDIF plugin", "bHdr.signature = 0x{0:X8}", bHdr.signature); AaruConsole.DebugWriteLine("UDIF plugin", "bHdr.version = {0}", bHdr.version); @@ -325,13 +324,12 @@ namespace Aaru.DiscImages for(int i = 0; i < bHdr.chunks; i++) { - var bChnk = new BlockChunk(); - byte[] bChnkB = new byte[Marshal.SizeOf()]; + byte[] bChnkB = new byte[Marshal.SizeOf()]; Array.Copy(blkxBytes, Marshal.SizeOf() + (Marshal.SizeOf() * i), bChnkB, 0, Marshal.SizeOf()); - bChnk = Marshal.ByteArrayToStructureBigEndian(bChnkB); + BlockChunk bChnk = Marshal.ByteArrayToStructureBigEndian(bChnkB); AaruConsole.DebugWriteLine("UDIF plugin", "bHdr.chunk[{0}].type = 0x{1:X8}", i, bChnk.type); AaruConsole.DebugWriteLine("UDIF plugin", "bHdr.chunk[{0}].comment = {1}", i, bChnk.comment); diff --git a/Aaru.Tests/Issues/OpticalImageReadIssueTest.cs b/Aaru.Tests/Issues/OpticalImageReadIssueTest.cs index 5dfb6f532..c1a9246fe 100644 --- a/Aaru.Tests/Issues/OpticalImageReadIssueTest.cs +++ b/Aaru.Tests/Issues/OpticalImageReadIssueTest.cs @@ -73,8 +73,6 @@ namespace Aaru.Tests.Issues ctx.Update(sector); } - - previousTrackEnd = currentTrack.TrackEndSector; } } } diff --git a/Aaru.Tests/WritableImages/WritableOpticalMediaImageTest.cs b/Aaru.Tests/WritableImages/WritableOpticalMediaImageTest.cs index f20851406..649991797 100644 --- a/Aaru.Tests/WritableImages/WritableOpticalMediaImageTest.cs +++ b/Aaru.Tests/WritableImages/WritableOpticalMediaImageTest.cs @@ -170,7 +170,7 @@ namespace Aaru.Tests.WritableImages Assert.IsTrue(outputFormat.SetTracks(inputFormat.Tracks), $"Error {outputFormat.ErrorMessage} sending tracks list to output image."); - ulong doneSectors = 0; + ulong doneSectors; foreach(Track track in inputFormat.Tracks) { diff --git a/Aaru/Commands/Device/Info.cs b/Aaru/Commands/Device/Info.cs index 0a78840fe..7aca36c60 100644 --- a/Aaru/Commands/Device/Info.cs +++ b/Aaru/Commands/Device/Info.cs @@ -286,25 +286,6 @@ namespace Aaru.Commands.Device { Identify.IdentifyDevice ATAID = decodedIdentify.Value; - uint blockSize; - - if((ATAID.PhysLogSectorSize & 0x8000) == 0x0000 && - (ATAID.PhysLogSectorSize & 0x4000) == 0x4000) - { - if((ATAID.PhysLogSectorSize & 0x1000) == 0x1000) - if(ATAID.LogicalSectorWords <= 255 || - ATAID.LogicalAlignment == 0xFFFF) - blockSize = 512; - else - blockSize = ATAID.LogicalSectorWords * 2; - else - blockSize = 512; - } - else - { - blockSize = 512; - } - ulong blocks; if(ATAID.CurrentCylinders > 0 &&