Fix compile warnings in Converter.

This commit is contained in:
Fraser Waters 2014-02-22 20:25:24 +00:00
parent 54f1e575d0
commit 366eb921a7
2 changed files with 2 additions and 8 deletions

View file

@ -70,7 +70,9 @@ namespace CHeaderToXML
else else
return t; return t;
} }
#pragma warning disable 0162 //CS0162: Unreachable code detected
/* gmcs bug 336258 */ return ""; /* gmcs bug 336258 */ return "";
#pragma warning restore 0162
}).ToArray(); }).ToArray();
Func<string[], string> get_name = tokens => Func<string[], string> get_name = tokens =>

View file

@ -43,7 +43,6 @@ namespace CHeaderToXML
ParserModes CurrentMode; ParserModes CurrentMode;
enum EntryModes { Core, Compatibility }; enum EntryModes { Core, Compatibility };
EntryModes CurrentEntryMode;
public override IEnumerable<XElement> Parse(string[] lines) public override IEnumerable<XElement> Parse(string[] lines)
{ {
@ -67,7 +66,6 @@ namespace CHeaderToXML
new XAttribute("name", words[0])); new XAttribute("name", words[0]));
CurrentMode = ParserModes.Enum; CurrentMode = ParserModes.Enum;
CurrentEntryMode = EntryModes.Core;
} }
else if (line.StartsWith(words[0] + "(")) else if (line.StartsWith(words[0] + "("))
{ {
@ -94,21 +92,15 @@ namespace CHeaderToXML
current.Add(new XElement("use", current.Add(new XElement("use",
new XAttribute("enum", words[1]), new XAttribute("enum", words[1]),
new XAttribute("token", words[2]))); new XAttribute("token", words[2])));
//new XAttribute("profile", CurrentEntryMode == EntryModes.Compatibility ?
// "compatibility" : "core")));
} }
else if (words[1] == "=") else if (words[1] == "=")
{ {
current.Add(new XElement("token", current.Add(new XElement("token",
new XAttribute("name", words[0]), new XAttribute("name", words[0]),
new XAttribute("value", words[2]))); new XAttribute("value", words[2])));
//new XAttribute("profile", CurrentEntryMode == EntryModes.Compatibility ?
// "compatibility" : "core")));
} }
else if (words[0] == "profile:") else if (words[0] == "profile:")
{ {
//CurrentEntryMode = words[1] == "compatibility" ?
// EntryModes.Compatibility : EntryModes.Core;
} }
else if (words[0].Contains("future_use")) else if (words[0].Contains("future_use"))
{ {