mirror of
https://github.com/claunia/plist-cil.git
synced 2025-12-16 19:14:26 +00:00
Remove unused variables and disable warnings that we know are
innocuous.
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
2015-02-20 Natalia Portillo <claunia@claunia.com>
|
||||
|
||||
* IssueTest.cs:
|
||||
Remove unused variables and disable warnings that we know
|
||||
are innocuous.
|
||||
|
||||
2015-02-20 Natalia Portillo <claunia@claunia.com>
|
||||
|
||||
* plist-cil.test.csproj:
|
||||
|
||||
@@ -99,13 +99,17 @@ namespace plistcil.test
|
||||
[Test]
|
||||
public static void TestIssue30()
|
||||
{
|
||||
#pragma warning disable 219
|
||||
NSArray arr = (NSArray)PropertyListParser.Parse(new FileInfo("test-files/issue30.plist"));
|
||||
#pragma warning restore 219
|
||||
}
|
||||
|
||||
[Test]
|
||||
public static void TestIssue33()
|
||||
{
|
||||
#pragma warning disable 219
|
||||
NSDictionary dict = (NSDictionary)PropertyListParser.Parse(new FileInfo("test-files/issue33.pbxproj"));
|
||||
#pragma warning restore 219
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
||||
@@ -343,7 +343,7 @@ namespace Claunia.PropertyList
|
||||
{
|
||||
return ParseObject();
|
||||
}
|
||||
catch (IndexOutOfRangeException ex)
|
||||
catch (IndexOutOfRangeException)
|
||||
{
|
||||
throw new FormatException(String.Format("Reached end of input unexpectedly at {0}.", index));
|
||||
}
|
||||
@@ -381,7 +381,7 @@ namespace Claunia.PropertyList
|
||||
{
|
||||
return new NSDate(quotedString);
|
||||
}
|
||||
catch (Exception ex)
|
||||
catch (Exception)
|
||||
{
|
||||
//not a date? --> return string
|
||||
return new NSString(quotedString);
|
||||
@@ -552,7 +552,7 @@ namespace Claunia.PropertyList
|
||||
{
|
||||
return new NSDate(numericalString);
|
||||
}
|
||||
catch (Exception ex)
|
||||
catch (Exception)
|
||||
{
|
||||
//An exception occurs if the string is not a date but just a string
|
||||
}
|
||||
@@ -598,7 +598,7 @@ namespace Claunia.PropertyList
|
||||
{
|
||||
unescapedString = ParseQuotedString(quotedString);
|
||||
}
|
||||
catch (Exception ex)
|
||||
catch (Exception)
|
||||
{
|
||||
throw new FormatException(String.Format("The quoted string could not be parsed at {0}.", index));
|
||||
}
|
||||
@@ -607,11 +607,6 @@ namespace Claunia.PropertyList
|
||||
return unescapedString;
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to encode the parsed strings
|
||||
*/
|
||||
static Encoding asciiEncoder;
|
||||
|
||||
/// <summary>
|
||||
/// Parses a string according to the format specified for ASCII property lists.
|
||||
/// Such strings can contain escape sequences which are unescaped in this method.
|
||||
|
||||
@@ -445,7 +445,9 @@ namespace Claunia.PropertyList
|
||||
foreach (byte b in bytes)
|
||||
{
|
||||
l <<= 8;
|
||||
#pragma warning disable 675
|
||||
l |= b & 0xFF;
|
||||
#pragma warning restore 675
|
||||
}
|
||||
l &= 0xFFFFFFFFL;
|
||||
return l;
|
||||
@@ -464,7 +466,9 @@ namespace Claunia.PropertyList
|
||||
for (int i = startIndex; i < endIndex; i++)
|
||||
{
|
||||
l <<= 8;
|
||||
#pragma warning disable 675
|
||||
l |= bytes[i] & 0xFF;
|
||||
#pragma warning restore 675
|
||||
}
|
||||
l &= 0xFFFFFFFFL;
|
||||
return l;
|
||||
@@ -481,7 +485,9 @@ namespace Claunia.PropertyList
|
||||
foreach (byte b in bytes)
|
||||
{
|
||||
l <<= 8;
|
||||
#pragma warning disable 675
|
||||
l |= b & 0xFF;
|
||||
#pragma warning restore 675
|
||||
}
|
||||
return l;
|
||||
}
|
||||
@@ -499,7 +505,9 @@ namespace Claunia.PropertyList
|
||||
for (int i = startIndex; i < endIndex; i++)
|
||||
{
|
||||
l <<= 8;
|
||||
#pragma warning disable 675
|
||||
l |= bytes[i] & 0xFF;
|
||||
#pragma warning restore 675
|
||||
}
|
||||
return l;
|
||||
}
|
||||
|
||||
@@ -1,3 +1,13 @@
|
||||
2015-02-20 Natalia Portillo <claunia@claunia.com>
|
||||
|
||||
* NSDate.cs:
|
||||
* NSObject.cs:
|
||||
* NSNumber.cs:
|
||||
* ASCIIPropertyListParser.cs:
|
||||
* BinaryPropertyListParser.cs:
|
||||
Remove unused variables and disable warnings that we know
|
||||
are innocuous.
|
||||
|
||||
2015-02-20 Natalia Portillo <claunia@claunia.com>
|
||||
|
||||
* plist-cil.csproj:
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace Claunia.PropertyList
|
||||
{
|
||||
return DateTime.ParseExact(textRepresentation, sdfDefault, provider);
|
||||
}
|
||||
catch (FormatException ex)
|
||||
catch (FormatException)
|
||||
{
|
||||
return DateTime.ParseExact(textRepresentation, sdfGnuStep, provider);
|
||||
}
|
||||
@@ -111,8 +111,6 @@ namespace Claunia.PropertyList
|
||||
/// <param name="d">The date</param>
|
||||
public NSDate(DateTime d)
|
||||
{
|
||||
if (d == null)
|
||||
throw new ArgumentException("Date cannot be null", "d");
|
||||
date = d;
|
||||
}
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@ namespace Claunia.PropertyList
|
||||
doubleValue = longValue = l;
|
||||
type = INTEGER;
|
||||
}
|
||||
catch (Exception ex)
|
||||
catch (Exception)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -117,7 +117,7 @@ namespace Claunia.PropertyList
|
||||
longValue = (long)Math.Round(doubleValue);
|
||||
type = REAL;
|
||||
}
|
||||
catch (Exception ex2)
|
||||
catch (Exception)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -129,7 +129,7 @@ namespace Claunia.PropertyList
|
||||
type = BOOLEAN;
|
||||
doubleValue = longValue = boolValue ? 1 : 0;
|
||||
}
|
||||
catch (Exception ex3)
|
||||
catch (Exception)
|
||||
{
|
||||
throw new ArgumentException("The given string neither represents a double, an int nor a bool value.");
|
||||
}
|
||||
|
||||
@@ -366,7 +366,7 @@ namespace Claunia.PropertyList
|
||||
return new NSData(ms.ToArray());
|
||||
}
|
||||
}
|
||||
catch (IOException ex)
|
||||
catch (IOException)
|
||||
{
|
||||
throw new SystemException("The given object of class " + o.GetType() + " could not be serialized and stored in a NSData object.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user