From 7b91b6e7c8528f2d76374cfc5cfb532a75ef5cf5 Mon Sep 17 00:00:00 2001 From: Kenneth Skovhede Date: Tue, 26 Jan 2016 09:48:00 +0100 Subject: [PATCH] Commented out various unused fields that cause warnings and makes the WarningsAsErrors directive abort the build --- SharpCompress/Archive/Rar/FileInfoRarFilePart.cs | 4 ++-- SharpCompress/Common/GZip/GZipVolume.cs | 4 ++-- SharpCompress/Common/SevenZip/ArchiveReader.cs | 8 ++++---- SharpCompress/Common/SevenZip/DataReader.cs | 4 ++-- SharpCompress/Compressor/LZMA/Bcj2DecoderStream.cs | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/SharpCompress/Archive/Rar/FileInfoRarFilePart.cs b/SharpCompress/Archive/Rar/FileInfoRarFilePart.cs index 558cd14a..b871aeec 100644 --- a/SharpCompress/Archive/Rar/FileInfoRarFilePart.cs +++ b/SharpCompress/Archive/Rar/FileInfoRarFilePart.cs @@ -6,12 +6,12 @@ namespace SharpCompress.Archive.Rar { internal class FileInfoRarFilePart : SeekableFilePart { - private readonly FileInfoRarArchiveVolume volume; + //private readonly FileInfoRarArchiveVolume volume; internal FileInfoRarFilePart(FileInfoRarArchiveVolume volume, MarkHeader mh, FileHeader fh, FileInfo fi) : base(mh, fh, volume.Stream, volume.Password) { - this.volume = volume; + //this.volume = volume; FileInfo = fi; } diff --git a/SharpCompress/Common/GZip/GZipVolume.cs b/SharpCompress/Common/GZip/GZipVolume.cs index 82c7fd7f..4d83b4bd 100644 --- a/SharpCompress/Common/GZip/GZipVolume.cs +++ b/SharpCompress/Common/GZip/GZipVolume.cs @@ -5,7 +5,7 @@ namespace SharpCompress.Common.GZip public class GZipVolume : Volume { #if !PORTABLE && !NETFX_CORE - private readonly FileInfo fileInfo; + //private readonly FileInfo fileInfo; #endif public GZipVolume(Stream stream, Options options) @@ -17,7 +17,7 @@ namespace SharpCompress.Common.GZip public GZipVolume(FileInfo fileInfo, Options options) : base(fileInfo.OpenRead(), options) { - this.fileInfo = fileInfo; + //this.fileInfo = fileInfo; } #endif diff --git a/SharpCompress/Common/SevenZip/ArchiveReader.cs b/SharpCompress/Common/SevenZip/ArchiveReader.cs index 31455ca3..ea478445 100644 --- a/SharpCompress/Common/SevenZip/ArchiveReader.cs +++ b/SharpCompress/Common/SevenZip/ArchiveReader.cs @@ -1198,14 +1198,14 @@ namespace SharpCompress.Common.SevenZip private class FolderUnpackStream : Stream { private ArchiveDatabase _db; - private int _otherIndex; + //private int _otherIndex; private int _startIndex; private List _extractStatuses; public FolderUnpackStream(ArchiveDatabase db, int p, int startIndex, List list) { this._db = db; - this._otherIndex = p; + //this._otherIndex = p; this._startIndex = startIndex; this._extractStatuses = list; } @@ -1275,9 +1275,9 @@ namespace SharpCompress.Common.SevenZip private void OpenFile() { - bool skip = !_extractStatuses[_currentIndex]; + //bool skip = !_extractStatuses[_currentIndex]; int index = _startIndex + _currentIndex; - int realIndex = _otherIndex + index; + //int realIndex = _otherIndex + index; //string filename = @"D:\_testdump\" + _db.Files[index].Name; //Directory.CreateDirectory(Path.GetDirectoryName(filename)); //_stream = new FileStream(filename, FileMode.Create, FileAccess.Write, FileShare.Delete); diff --git a/SharpCompress/Common/SevenZip/DataReader.cs b/SharpCompress/Common/SevenZip/DataReader.cs index 2b6f27cd..e99da390 100644 --- a/SharpCompress/Common/SevenZip/DataReader.cs +++ b/SharpCompress/Common/SevenZip/DataReader.cs @@ -34,7 +34,7 @@ namespace SharpCompress.Common.SevenZip #region Variables private byte[] _buffer; - private int _origin; + //private int _origin; private int _offset; private int _ending; @@ -45,7 +45,7 @@ namespace SharpCompress.Common.SevenZip public DataReader(byte[] buffer, int offset, int length) { _buffer = buffer; - _origin = offset; + //_origin = offset; _offset = offset; _ending = offset + length; } diff --git a/SharpCompress/Compressor/LZMA/Bcj2DecoderStream.cs b/SharpCompress/Compressor/LZMA/Bcj2DecoderStream.cs index c13f34b6..16e75235 100644 --- a/SharpCompress/Compressor/LZMA/Bcj2DecoderStream.cs +++ b/SharpCompress/Compressor/LZMA/Bcj2DecoderStream.cs @@ -99,7 +99,7 @@ namespace SharpCompress.Compressor.LZMA private RangeDecoder mRangeDecoder; private StatusDecoder[] mStatusDecoder; private long mWritten; - private long mLimit; + //private long mLimit; private IEnumerator mIter; private bool mFinished; private bool isDisposed; @@ -112,7 +112,7 @@ namespace SharpCompress.Compressor.LZMA if (streams.Length != 4) throw new NotSupportedException(); - mLimit = limit; + //mLimit = limit; mMainStream = streams[0]; mCallStream = streams[1]; mJumpStream = streams[2];