Jb Evain
2010-Jul-21 09:02 UTC
[Ironruby-core] [patch] building Microsoft.Scripting.Metadata on Mono
Hey,
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
b/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:
RuntimeHelpers.PrepareConstrainedRegions();
diff --git a/Runtime/Microsoft.Scripting.Metadata/MetadataImport.cs
b/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("Image:");
output.WriteLine(" {0}", _image.Length);
output.WriteLine();
<<<<<<
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>
Tomas Matousek
2010-Jul-21 16:08 UTC
[Ironruby-core] [patch] building Microsoft.Scripting.Metadata on Mono
Thanks, I''ll fix it.
BTW: The code is based on CCI2 PE reader (http://ccimetadata.codeplex.com).
Tomas
-----Original Message-----
From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at
rubyforge.org] On Behalf Of Jb Evain
Sent: Wednesday, July 21, 2010 2:02 AM
To: ironruby-core at rubyforge.org
Subject: [Ironruby-core] [patch] building Microsoft.Scripting.Metadata on Mono
Hey,
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
b/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:
RuntimeHelpers.PrepareConstrainedRegions();
diff --git a/Runtime/Microsoft.Scripting.Metadata/MetadataImport.cs
b/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("Image:");
output.WriteLine(" {0}", _image.Length);
output.WriteLine();
<<<<<<
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>
_______________________________________________
Ironruby-core mailing list
Ironruby-core at rubyforge.org
http://rubyforge.org/mailman/listinfo/ironruby-core