[Ironruby-core] [patch] building Microsoft.Scripting.Metadata on Mono

Jb Evain jb at nurv.fr
Wed Jul 21 05:02:21 EDT 2010


Microsoft.Scripting.Metadata is being built with warnaserror, but it
contains a couple of issues that are not detected by csc, but that are
by dmcs, crashing the build. Here's a fix:

diff --git a/Runtime/Microsoft.Scripting.Metadata/MemoryMapping.V2.cs
index ddb9387..7ed9bd5 100644
--- a/Runtime/Microsoft.Scripting.Metadata/MemoryMapping.V2.cs
+++ b/Runtime/Microsoft.Scripting.Metadata/MemoryMapping.V2.cs
@@ -108,7 +108,6 @@ namespace Microsoft.Scripting.Metadata {
             int size;
             int fileDescriptor = 0;
             MemoryMapping mapping = null;
-            IntPtr ptr = IntPtr.Zero;

             // make sure we don't get interrupted before we save the
handle and the pointer:
diff --git a/Runtime/Microsoft.Scripting.Metadata/MetadataImport.cs
index 22655c5..17c375a 100644
--- a/Runtime/Microsoft.Scripting.Metadata/MetadataImport.cs
+++ b/Runtime/Microsoft.Scripting.Metadata/MetadataImport.cs
@@ -1100,7 +1100,6 @@ namespace Microsoft.Scripting.Metadata {
         #region Dump
 #if DEBUG
         public unsafe void Dump(TextWriter output) {
-            IntPtr imageStart = (IntPtr)_image.Pointer;
             output.WriteLine("  {0}", _image.Length);

Those variables aren't used, triggering warnings, that are turned into errors.

And geez, looking at the code, you guys should have used cecil/light ;)

Jb Evain  <jb at nurv.fr>

More information about the Ironruby-core mailing list