From 9084476de3173deaf3c2c39549411fa55f500f72 Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Mon, 10 Dec 2018 06:47:48 -0800 Subject: Fix warnings as errors Signed-off-by: dotnet-bot --- src/System.Private.CoreLib/shared/System/DateTime.cs | 4 ++++ 1 file changed, 4 insertions(+) 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) -- cgit v1.2.3