diff --git a/CRC16Context.cs b/CRC16Context.cs index 6c45454..1c38e2f 100644 --- a/CRC16Context.cs +++ b/CRC16Context.cs @@ -216,12 +216,11 @@ public class Crc16Context : IChecksum // http://www.intel.com/technology/comms/perfnet/download/CRC_generators.pdf // http://sourceforge.net/projects/slicing-by-8/ - ushort crc; var currentPos = 0; const int unroll = 4; const int bytesAtOnce = 8 * unroll; - crc = previousCrc; + ushort crc = previousCrc; while(len >= bytesAtOnce) { @@ -255,12 +254,11 @@ public class Crc16Context : IChecksum // http://www.intel.com/technology/comms/perfnet/download/CRC_generators.pdf // http://sourceforge.net/projects/slicing-by-8/ - ushort crc; var currentPos = 0; const int unroll = 4; const int bytesAtOnce = 8 * unroll; - crc = previousCrc; + ushort crc = previousCrc; while(len >= bytesAtOnce) { diff --git a/SpamSumContext.cs b/SpamSumContext.cs index a5bb707..3fc0dc8 100644 --- a/SpamSumContext.cs +++ b/SpamSumContext.cs @@ -281,8 +281,6 @@ public sealed class SpamSumContext : IChecksum if(!(bi == 0 || (ulong)SSDEEP_BS(bi) / 2 * SPAMSUM_LENGTH < _self.TotalSize)) throw new Exception("Assertion failed"); - int resultOff; - /* Initial blocksize guess. */ while((ulong)SSDEEP_BS(bi) * SPAMSUM_LENGTH < _self.TotalSize) { @@ -318,7 +316,7 @@ public sealed class SpamSumContext : IChecksum Array.Copy(Encoding.ASCII.GetBytes(sb.ToString()), 0, result, 0, i); - resultOff = i; + int resultOff = i; i = (int)_self.Bh[bi].Dlen;