summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Kotas <jkotas@microsoft.com>2018-12-10 06:47:48 -0800
committerJan Kotas <jkotas@microsoft.com>2018-12-10 13:34:54 -0800
commit9084476de3173deaf3c2c39549411fa55f500f72 (patch)
tree04001db5ad44dcecbeb63c47ec12385aaf5807ae
parent64f76abbde7f3b7a91bbdbe66c9beebc63bb8f0c (diff)
downloadcoreclr-9084476de3173deaf3c2c39549411fa55f500f72.tar.gz
coreclr-9084476de3173deaf3c2c39549411fa55f500f72.tar.bz2
coreclr-9084476de3173deaf3c2c39549411fa55f500f72.zip
Fix warnings as errors
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
-rw-r--r--src/System.Private.CoreLib/shared/System/DateTime.cs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/System.Private.CoreLib/shared/System/DateTime.cs b/src/System.Private.CoreLib/shared/System/DateTime.cs
index 1a33479e36..c0210b0741 100644
--- a/src/System.Private.CoreLib/shared/System/DateTime.cs
+++ b/src/System.Private.CoreLib/shared/System/DateTime.cs
@@ -809,10 +809,12 @@ namespace System
throw new ArgumentOutOfRangeException(nameof(fileTime), SR.ArgumentOutOfRange_FileTimeInvalid);
}
+#pragma warning disable 162 // Unrechable code on Unix
if (s_systemSupportsLeapSeconds)
{
return FromFileTimeLeapSecondsAware(fileTime);
}
+#pragma warning restore 162
// This is the ticks in Universal time for this fileTime.
long universalTicks = fileTime + FileTimeOffset;
@@ -1316,10 +1318,12 @@ namespace System
// Treats the input as universal if it is not specified
long ticks = ((InternalKind & LocalMask) != 0) ? ToUniversalTime().InternalTicks : this.InternalTicks;
+#pragma warning disable 162 // Unrechable code on Unix
if (s_systemSupportsLeapSeconds)
{
return ToFileTimeLeapSecondsAware(ticks);
}
+#pragma warning restore 162
ticks -= FileTimeOffset;
if (ticks < 0)