cleaned up compiler warnings

This commit is contained in:
Chris Forbes
2010-02-18 20:32:34 +13:00
parent c4329aec29
commit 3237485055
26 changed files with 31 additions and 83 deletions

View File

@@ -89,11 +89,11 @@ namespace OpenRa.FileFormats
public static byte[] LoadSound(Stream s)
{
var br = new BinaryReader(s);
var sampleRate = br.ReadUInt16();
/*var sampleRate =*/ br.ReadUInt16();
var dataSize = br.ReadInt32();
var outputSize = br.ReadInt32();
var flags = (SoundFlags)br.ReadByte();
var format = (SoundFormat)br.ReadByte();
/*var flags = (SoundFlags)*/ br.ReadByte();
/*var format = (SoundFormat)*/ br.ReadByte();
var output = new byte[outputSize];
var offset = 0;

View File

@@ -104,7 +104,7 @@ namespace OpenRa.FileFormats
byte[] dest = new byte[8192];
byte[] src = reader.ReadBytes((int)length);
int actualLength = Format80.DecodeInto(src, dest);
/*int actualLength =*/ Format80.DecodeInto(src, dest);
chunks.Add(dest);
}

View File

@@ -33,7 +33,6 @@ namespace OpenRa.FileFormats
public class Package : IFolder
{
readonly string filename;
readonly Dictionary<uint, PackageEntry> index;
readonly bool isRmix, isEncrypted;
readonly long dataStart;
@@ -41,7 +40,6 @@ namespace OpenRa.FileFormats
public Package(string filename)
{
this.filename = filename;
s = FileSystem.Open(filename);
BinaryReader reader = new BinaryReader(s);
@@ -127,7 +125,7 @@ namespace OpenRa.FileFormats
BinaryReader reader = new BinaryReader(s);
ushort numFiles = reader.ReadUInt16();
uint dataSize = reader.ReadUInt32();
/*uint dataSize = */reader.ReadUInt32();
for (int i = 0; i < numFiles; i++)
items.Add(new PackageEntry(reader));

View File

@@ -109,12 +109,5 @@ namespace OpenRa.FileFormats
items[intoLevel][intoIndex] = At(downLevel, downIndex);
BubbleInto(downLevel, downIndex, val);
}
int RowLength(int i)
{
if (i == level)
return index;
return (1 << i);
}
}
}

View File

@@ -29,7 +29,7 @@ namespace OpenRa.FileFormats
public Terrain( Stream stream )
{
int Width, Height, XDim, YDim, NumTiles;
int Width, Height;
BinaryReader reader = new BinaryReader( stream );
Width = reader.ReadUInt16();
@@ -38,11 +38,11 @@ namespace OpenRa.FileFormats
if( Width != 24 || Height != 24 )
throw new InvalidDataException( string.Format( "{0}x{1}", Width, Height ) );
NumTiles = reader.ReadUInt16();
/*NumTiles = */reader.ReadUInt16();
reader.ReadUInt16();
XDim = reader.ReadUInt16();
YDim = reader.ReadUInt16();
uint FileSize = reader.ReadUInt32();
/*XDim = */reader.ReadUInt16();
/*YDim = */reader.ReadUInt16();
/*uint FileSize = */reader.ReadUInt32();
uint ImgStart = reader.ReadUInt32();
reader.ReadUInt32();
reader.ReadUInt32();