diff options
author | Mikayla Hutchinson <m.j.hutchinson@gmail.com> | 2018-06-05 23:24:34 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-05 23:24:34 +0300 |
commit | dd094e78b49d90873a5f62acb48a4843e7845fe7 (patch) | |
tree | 93b3327f2df2f4339b2b14d42b135d069f6ce57f | |
parent | 1306b0d420bd69efcd8f1951c5c68dc7065ce9eb (diff) | |
parent | b3afede7d0fe7770a44a51bc4463c32a8212e7cb (diff) |
Merge pull request #14 from mono/fix-warnings
Fix build warnings
-rw-r--r-- | src/framework/GuiUnit_NET_4_5.csproj | 2 | ||||
-rwxr-xr-x | src/framework/Internal/AssemblyHelper.cs | 4 | ||||
-rwxr-xr-x | src/framework/Internal/AsyncInvocationRegion.cs | 12 | ||||
-rwxr-xr-x | src/framework/Internal/ThreadUtility.cs | 2 |
4 files changed, 8 insertions, 12 deletions
diff --git a/src/framework/GuiUnit_NET_4_5.csproj b/src/framework/GuiUnit_NET_4_5.csproj index e5c8e47..6d61f80 100644 --- a/src/framework/GuiUnit_NET_4_5.csproj +++ b/src/framework/GuiUnit_NET_4_5.csproj @@ -46,6 +46,7 @@ <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<DocumentationFile>..\..\bin\Debug\net-4.5\nunitlite.xml</DocumentationFile>
<Prefer32Bit>false</Prefer32Bit>
+ <NoWarn>1574;1591</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@@ -57,6 +58,7 @@ <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<DocumentationFile>..\..\bin\Release\net-4.5\nunitlite.xml</DocumentationFile>
<Prefer32Bit>false</Prefer32Bit>
+ <NoWarn>1574;1591</NoWarn>
</PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile>guiunit.snk</AssemblyOriginatorKeyFile>
diff --git a/src/framework/Internal/AssemblyHelper.cs b/src/framework/Internal/AssemblyHelper.cs index c9b8593..3cfe352 100755 --- a/src/framework/Internal/AssemblyHelper.cs +++ b/src/framework/Internal/AssemblyHelper.cs @@ -38,7 +38,7 @@ namespace NUnit.Framework.Internal /// <summary> /// Gets the path from which the assembly defining a Type was loaded. /// </summary> - /// <param name="assembly">The Type.</param> + /// <param name="type">The Type.</param> /// <returns>The path.</returns> public static string GetAssemblyPath(Type type) { @@ -102,7 +102,7 @@ namespace NUnit.Framework.Internal #if !NETCF private static bool IsFileUri(string uri) { - return uri.ToLower().StartsWith(Uri.UriSchemeFile); + return uri.StartsWith(Uri.UriSchemeFile, StringComparison.OrdinalIgnoreCase); } // Public for testing purposes diff --git a/src/framework/Internal/AsyncInvocationRegion.cs b/src/framework/Internal/AsyncInvocationRegion.cs index 8c04006..fd15f9d 100755 --- a/src/framework/Internal/AsyncInvocationRegion.cs +++ b/src/framework/Internal/AsyncInvocationRegion.cs @@ -78,16 +78,8 @@ at wrapping a non-async method invocation in an async region was done"); public override object WaitForPendingOperationsToComplete(object invocationResult) { - try - { - _currentContext.WaitForPendingOperationsToComplete(); - return invocationResult; - } - catch (Exception e) - { - //PreserveStackTrace(e); - throw; - } + _currentContext.WaitForPendingOperationsToComplete(); + return invocationResult; } } diff --git a/src/framework/Internal/ThreadUtility.cs b/src/framework/Internal/ThreadUtility.cs index f526247..f6b5d6b 100755 --- a/src/framework/Internal/ThreadUtility.cs +++ b/src/framework/Internal/ThreadUtility.cs @@ -61,7 +61,9 @@ namespace NUnit.Framework.Internal // Although obsolete, this use of Resume() takes care of // the odd case where a ThreadStateException is received // so we continue to use it. + #pragma warning disable CS0618 // obsolete thread.Resume(); + #pragma warning restore CS0618 } if ( (thread.ThreadState & ThreadState.WaitSleepJoin) != 0 ) |