Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Commit

Permalink
Fix build warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
mhutch committed Jun 5, 2018
1 parent 1306b0d commit b3afede
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 12 deletions.
2 changes: 2 additions & 0 deletions src/framework/GuiUnit_NET_4_5.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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>
Expand Down
4 changes: 2 additions & 2 deletions src/framework/Internal/AssemblyHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class AssemblyHelper
/// <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)
{
Expand Down Expand Up @@ -102,7 +102,7 @@ public static AssemblyName GetAssemblyName(Assembly assembly)
#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
Expand Down
12 changes: 2 additions & 10 deletions src/framework/Internal/AsyncInvocationRegion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,8 @@ public override void Dispose()

public override object WaitForPendingOperationsToComplete(object invocationResult)
{
try
{
_currentContext.WaitForPendingOperationsToComplete();
return invocationResult;
}
catch (Exception e)
{
//PreserveStackTrace(e);
throw;
}
_currentContext.WaitForPendingOperationsToComplete();
return invocationResult;
}
}

Expand Down
2 changes: 2 additions & 0 deletions src/framework/Internal/ThreadUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ public static void Kill(Thread thread, object stateInfo)
// 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 )
Expand Down

0 comments on commit b3afede

Please sign in to comment.