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

Commit dd094e7

Browse files
authored
Merge pull request #14 from mono/fix-warnings
Fix build warnings
2 parents 1306b0d + b3afede commit dd094e7

File tree

4 files changed

+8
-12
lines changed

4 files changed

+8
-12
lines changed

src/framework/GuiUnit_NET_4_5.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
4747
<DocumentationFile>..\..\bin\Debug\net-4.5\nunitlite.xml</DocumentationFile>
4848
<Prefer32Bit>false</Prefer32Bit>
49+
<NoWarn>1574;1591</NoWarn>
4950
</PropertyGroup>
5051
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
5152
<DebugType>pdbonly</DebugType>
@@ -57,6 +58,7 @@
5758
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
5859
<DocumentationFile>..\..\bin\Release\net-4.5\nunitlite.xml</DocumentationFile>
5960
<Prefer32Bit>false</Prefer32Bit>
61+
<NoWarn>1574;1591</NoWarn>
6062
</PropertyGroup>
6163
<PropertyGroup>
6264
<AssemblyOriginatorKeyFile>guiunit.snk</AssemblyOriginatorKeyFile>

src/framework/Internal/AssemblyHelper.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public class AssemblyHelper
3838
/// <summary>
3939
/// Gets the path from which the assembly defining a Type was loaded.
4040
/// </summary>
41-
/// <param name="assembly">The Type.</param>
41+
/// <param name="type">The Type.</param>
4242
/// <returns>The path.</returns>
4343
public static string GetAssemblyPath(Type type)
4444
{
@@ -102,7 +102,7 @@ public static AssemblyName GetAssemblyName(Assembly assembly)
102102
#if !NETCF
103103
private static bool IsFileUri(string uri)
104104
{
105-
return uri.ToLower().StartsWith(Uri.UriSchemeFile);
105+
return uri.StartsWith(Uri.UriSchemeFile, StringComparison.OrdinalIgnoreCase);
106106
}
107107

108108
// Public for testing purposes

src/framework/Internal/AsyncInvocationRegion.cs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -78,16 +78,8 @@ public override void Dispose()
7878

7979
public override object WaitForPendingOperationsToComplete(object invocationResult)
8080
{
81-
try
82-
{
83-
_currentContext.WaitForPendingOperationsToComplete();
84-
return invocationResult;
85-
}
86-
catch (Exception e)
87-
{
88-
//PreserveStackTrace(e);
89-
throw;
90-
}
81+
_currentContext.WaitForPendingOperationsToComplete();
82+
return invocationResult;
9183
}
9284
}
9385

src/framework/Internal/ThreadUtility.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ public static void Kill(Thread thread, object stateInfo)
6161
// Although obsolete, this use of Resume() takes care of
6262
// the odd case where a ThreadStateException is received
6363
// so we continue to use it.
64+
#pragma warning disable CS0618 // obsolete
6465
thread.Resume();
66+
#pragma warning restore CS0618
6567
}
6668

6769
if ( (thread.ThreadState & ThreadState.WaitSleepJoin) != 0 )

0 commit comments

Comments
 (0)