Fixes some warnings in PEAPI.dll
authorQuickJack <test051102@hotmail.com>
Thu, 29 Dec 2011 12:54:31 +0000 (13:54 +0100)
committerQuickJack <test051102@hotmail.com>
Thu, 29 Dec 2011 12:54:31 +0000 (13:54 +0100)
mcs/class/PEAPI/Code.cs
mcs/class/PEAPI/Metadata.cs
mcs/class/PEAPI/PEAPI.cs

index 60f09b4e92d2d185568506f47987d2632a797b1b..b681a4cf24deabaef67e19b0c29f70ee3f240bf4 100644 (file)
@@ -284,7 +284,6 @@ namespace PEAPI {
        internal class BranchInstr : Instr {
                CILLabel dest;
                private bool shortVer = true;
-               private static readonly byte longInstrOffset = 13;
                private int target = 0;
 
                internal BranchInstr(int inst, CILLabel dst) : base(inst) 
@@ -359,7 +358,6 @@ namespace PEAPI {
                private static readonly ushort MoreSects = 0x8;
                private static readonly ushort InitLocals = 0x10;
                private static readonly uint FatSize = 12;
-               private static readonly uint FatWords = FatSize/4;
                private static readonly byte FatExceptTable = 0x41;
                private static readonly byte SmlExceptTable = 0x01; 
 
index e67f2966d2b307cdb5e6b33f20a174cc3128705d..3d58343c79c938a326ed5d3d8908ba1dffed39b7 100644 (file)
@@ -428,7 +428,6 @@ namespace PEAPI {
 
        public class CustomAttribute : MetaDataElement {
 
-               private static readonly ushort prolog = 0x0001;
                MetaDataElement parent;
                Method type;
                uint valIx;
@@ -672,7 +671,6 @@ namespace PEAPI {
        {
                PEAPI.SecurityAction sec_action;
                ArrayList permissions;
-               PEAPI.PermissionSet ps;
 
                public PermissionSet (PEAPI.SecurityAction sec_action)
                {
@@ -1580,8 +1578,6 @@ namespace PEAPI {
        /// 
        public class ClassDef : Class {
 
-               private static readonly byte ElementType_Class = 0x12;
-
                Class superType;
                ArrayList fields = new ArrayList();
                ArrayList methods = new ArrayList();
@@ -1589,7 +1585,6 @@ namespace PEAPI {
                ArrayList properties;
                bool typeIndexChecked = true;
                uint fieldIx = 0, methodIx = 0;
-               byte[] securityActions;
                uint flags;
                ClassLayout layout;
                ClassDef parentClass;
@@ -1959,7 +1954,6 @@ namespace PEAPI {
        public class ClassRef : Class, IExternRef, IResolutionScope {
 
                protected IResolutionScope parent;
-               ExternClass externClass;
                protected MetaData metaData;
 
                internal ClassRef(string nsName, string name, MetaData md) : base(nsName, name, md) 
@@ -3825,7 +3819,6 @@ namespace PEAPI {
 
                MetaData metaData;
                CILInstructions code;
-               ArrayList securityActions = new ArrayList();
                Param[] parList;
                Local[] locals;
                bool initLocals;
@@ -4332,7 +4325,6 @@ namespace PEAPI {
 
        public class FixedArray : NativeType  {
 
-               NativeType elemType;
                uint numElem;
 
                //public FixedArray(NativeType elemType, int numElems) : base(0x1E) {
@@ -4723,7 +4715,7 @@ namespace PEAPI {
                private readonly string systemName = "System";
                private Class[] systemClasses = new Class[valueTypeIx+2];
                private PrimitiveType[] systemTypes = new PrimitiveType[valueTypeIx];
-               private TypeSpec[] specialTypeSpecs = new TypeSpec[valueTypeIx];
+
                private static int[] specialNames = {
                        PrimitiveType.Void.GetName().GetHashCode(),
                        PrimitiveType.Boolean.GetName().GetHashCode(),
@@ -4950,7 +4942,6 @@ namespace PEAPI {
                private static readonly uint TildeHeaderSize = 24;
                private static readonly uint StreamHeaderSize = 8;
                private static readonly uint numMetaDataTables = (int)MDTable.GenericParamConstraint + 1;
-               private static readonly uint tildeHeaderSize = 8 + (uint)tildeName.Length;
 
                MetaDataStream strings, us, guid, blob;
 
@@ -5343,7 +5334,6 @@ namespace PEAPI {
 
                internal void WriteTildeStream(FileImage output) 
                {
-                       long startTilde = output.Seek(0,SeekOrigin.Current);
                        output.Write((uint)0); // Reserved
 #if NET_2_0
                        output.Write((byte)2); // MajorVersion
@@ -5362,7 +5352,7 @@ namespace PEAPI {
                                        output.Write(count);
                                }
                        }
-                       long tabStart = output.Seek(0,SeekOrigin.Current);
+
                        // Console.WriteLine("Starting metaData tables at " + tabStart);
                        for (int i=0; i < numMetaDataTables; i++) {
                                if (metaDataTables[i] != null) {
index b389b3cb8bfe543a4ab9e9dbe316025d3487e888..0cb718cee345b6fb092e5893aa0084c41667cdfa 100644 (file)
@@ -590,8 +590,6 @@ namespace PEAPI {
                private static readonly string mscorlibName = "mscorlib";
                private Module thisMod;
                private ClassDef moduleClass;
-               private ArrayList classRefList = new ArrayList();
-               private ArrayList classDefList = new ArrayList();
                private ArrayList resources = new ArrayList ();
                private Assembly thisAssembly;
                private static bool isMSCorlib;