From 3364838e1e1a02ab1e19ff79f07799db5578ddab Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Wed, 31 Jul 2019 08:04:33 -0400 Subject: [PATCH] Re-enable CA1823 (unused private fields) (dotnet/corefx#39899) Commit migrated from https://github.com/dotnet/corefx/commit/e5d38a54cf21f6427ae4fe99c3841c8067139e75 --- src/libraries/CodeAnalysis.ruleset | 1 - .../Common/src/Interop/FreeBSD/Interop.Process.cs | 1 + .../Common/src/Interop/OSX/Interop.libproc.cs | 1 + .../Interop.SecKeyRef.Export.cs | 8 -- .../Interop.Ssl.cs | 2 +- .../Interop.X509.cs | 3 + .../System.Native/Interop.IPPacketInformation.cs | 4 +- .../Unix/System.Native/Interop.MulticastOption.cs | 4 +- .../src/Interop/Windows/HttpApi/Interop.HttpApi.cs | 1 - .../Interop/Windows/SspiCli/SecuritySafeHandles.cs | 2 - .../Data/Common/DbConnectionOptions.Common.cs | 14 +- .../System/Data/ProviderBase/DbMetaDataFactory.cs | 2 - .../System/Globalization/FormatProvider.Number.cs | 2 - .../System/Net/Logging/NetEventSource.Common.cs | 2 + .../src/System/Net/WebSockets/ManagedWebSocket.cs | 2 + .../Common/src/System/Resources/ResourceWriter.cs | 1 - .../src/Microsoft.VisualBasic.Core.vbproj | 1 + .../CompilerServices/Utils.LateBinder.vb | 2 - .../src/Microsoft/VisualBasic/Conversion.vb | 20 --- .../src/Microsoft/VisualBasic/FileSystem.vb | 13 -- .../src/Microsoft.Win32.Registry.csproj | 1 + .../src/Microsoft/CSharp/CSharpCodeGenerator.cs | 103 -------------- .../src/System/Collections/Queue.cs | 7 +- .../src/System/Collections/SortedList.cs | 2 - .../src/System/Collections/BitArray.cs | 1 - .../src/System/Collections/Generic/LinkedList.cs | 5 - .../src/System/Collections/Generic/SortedSet.cs | 15 -- .../Composition/CompositionException.cs | 1 - .../ExportfactoryCreator.LifetimeContext.cs | 2 - .../Composition/ReflectionModel/ImportType.cs | 1 - .../Design/DesigntimeLicenseContext.cs | 1 - .../Composition/Convention/ConventionBuilder.cs | 2 - .../src/System/Configuration/AppSettingsReader.cs | 1 - .../Configuration/ConfigurationErrorsException.cs | 3 +- .../DpapiProtectedConfigurationProvider.cs | 2 - .../src/System/Configuration/SettingElement.cs | 1 - .../src/System/Data/DataTable.cs | 1 - .../System/Data/Common/DBConnectionString.cs | 6 +- .../System.Data.OleDb/src/DbConnectionOptions.cs | 14 +- .../Data/ProviderBase/DbConnectionPoolIdentity.cs | 4 - .../System/Data/ProviderBase/DbMetaDataFactory.cs | 1 - .../src/System/Data/SqlClient/SNI/SNINpHandle.cs | 1 - .../src/System/Data/SqlClient/SNI/SNIProxy.cs | 1 - .../System/Data/SqlClient/SqlConnectionFactory.cs | 3 - .../src/System/Data/SqlClient/SqlDependency.cs | 5 +- .../System/Data/SqlClient/SqlMetadataFactory.cs | 3 - .../src/System/Data/SqlClient/TdsParser.Windows.cs | 1 + .../src/System/Data/SqlClient/TdsParser.cs | 3 - .../TdsParserStateObjectFactory.Windows.cs | 5 +- .../System/Diagnostics/Activity.DateTime.netfx.cs | 4 +- .../src/System/Diagnostics/EventLog.cs | 2 - .../src/System/Diagnostics/EventLogEntry.cs | 1 - .../src/System/Diagnostics/EventLogInternal.cs | 2 - .../System/Diagnostics/PerformanceCounterLib.cs | 1 - .../src/System/Diagnostics/Process.Windows.cs | 5 +- .../src/System/Diagnostics/Process.cs | 2 - .../ActiveDirectory/DirectoryServer.cs | 1 - .../DirectoryServices/ActiveDirectory/Forest.cs | 2 - .../Drawing/BufferedGraphicsContext.Windows.cs | 1 + .../src/System/Drawing/BufferedGraphicsContext.cs | 1 - .../src/System/Drawing/Imaging/ImageFormat.cs | 22 ++- .../System.Drawing.Common/src/misc/DpiHelper.cs | 1 - .../src/System/IO/Compression/ZipArchiveEntry.cs | 2 - .../src/System/IO/FileSystemWatcher.cs | 3 - .../IO/Packaging/PackUriHelper.PackUriScheme.cs | 6 + .../src/System/IO/Packaging/PackUriHelper.cs | 12 -- .../src/System/IO/Packaging/ZipPackage.cs | 1 - .../src/System/IO/Ports/SerialPort.cs | 2 - .../System/Management/InteropClasses/WMIInterop.cs | 2 - .../src/System/Management/ManagementBaseObject.cs | 8 +- .../src/System/Management/WMIGenerator.cs | 152 ++++++++++----------- .../src/System/Net/Http/CurlHandler/CurlHandler.cs | 10 -- .../HttpEnvironmentProxy.Unix.cs | 5 + .../SocketsHttpHandler/HttpEnvironmentProxy.cs | 4 - .../src/uap/System/Net/HttpClientHandler.cs | 1 - .../Net/Windows/HttpListenerRequest.Windows.cs | 1 - .../Net/Windows/HttpResponseStreamAsyncResult.cs | 1 - .../Windows/WebSockets/HttpWebSocket.Windows.cs | 2 - .../src/System/Net/Mail/SmtpConnection.Auth.cs | 1 - .../src/System.Net.NetworkInformation.csproj | 1 + .../System/Net/NetworkInformation/Ping.Windows.cs | 2 + .../src/System/Net/NetworkInformation/Ping.cs | 1 - .../src/System/Net/CommandStream.cs | 3 - .../src/System/Net/HttpWebRequest.cs | 2 - .../src/System/Net/NTAuthentication.cs | 5 - .../ExtendedProtection/ExtendedProtectionPolicy.cs | 5 - .../System/Net/Sockets/NetEventSource.Sockets.cs | 1 - .../src/System/Net/WebSockets/WinRTWebSocket.cs | 1 - .../System.Private.Uri/src/System/UriHelper.cs | 1 - .../src/System/Xml/BinaryXml/SqlUtils.cs | 2 - .../src/System/Xml/Core/XmlTextReaderImpl.cs | 3 - .../src/System/Xml/Core/XmlUtf8RawTextWriter.cs | 1 - .../src/System/Xml/Core/XsdValidatingReader.cs | 3 - .../src/System/Xml/Schema/AutoValidator.cs | 2 - .../src/System/Xml/Schema/FacetChecker.cs | 1 - .../src/System/Xml/Schema/SchemaSetCompiler.cs | 1 - .../src/System/Xml/Serialization/Compilation.cs | 31 ++--- .../src/System/Xml/Serialization/Compiler.cs | 1 - .../Xml/Serialization/XmlSerializationReader.cs | 3 - .../Serialization/XmlSerializationReaderILGen.cs | 1 - .../Xml/Serialization/XmlSerializationWriter.cs | 1 - .../Serialization/XmlSerializationWriterILGen.cs | 1 - .../src/System/Xml/Xsl/IlGen/XmlILModule.cs | 2 - .../src/System/Xml/Xsl/QIL/QilValidationVisitor.cs | 3 +- .../src/System/Xml/Xsl/Runtime/NumberFormatter.cs | 60 -------- .../System/Xml/Xsl/Runtime/WhitespaceRuleReader.cs | 6 - .../src/System/Xml/Xsl/Runtime/XmlQuerySequence.cs | 2 - .../src/System/Xml/Xsl/XmlQueryTypeFactory.cs | 1 - .../src/System/Xml/Xsl/Xslt/Scripts.cs | 2 - .../src/System/Xml/Xsl/Xslt/XslAstAnalyzer.cs | 2 - .../src/System/Xml/Xsl/XsltOld/Compiler.cs | 11 -- .../System/Xml/Xsl/XsltOld/CopyNamespacesAction.cs | 9 +- .../src/System/Xml/Xsl/XsltOld/NumberAction.cs | 23 ++-- .../Xml/Xsl/XsltOld/ProcessingInstructionAction.cs | 1 - .../src/System/Xml/Xsl/XsltOld/SequentialOutput.cs | 1 - .../src/System/Xml/Xslt/XslCompiledTransform.cs | 2 + .../Reflection/Metadata/IL/MethodBodyBlock.cs | 2 - .../System/Reflection/Metadata/MetadataReader.cs | 2 - .../TypeLoading/Modules/GetTypeCoreCache.cs | 1 - .../TypeLoading/Modules/RoModule.Unifier.cs | 1 - .../src/System/Runtime/Caching/CacheExpires.cs | 1 - .../src/System/Runtime/Caching/CacheUsage.cs | 2 - .../src/System/Runtime/Caching/Dbg.cs | 5 + .../RuntimeInformation/RuntimeInformation.Unix.cs | 1 - .../src/System/Numerics/BigInteger.cs | 1 - .../WindowsRuntime/MarshalingHelpers.cs | 3 - .../src/System/Security/Claims/ClaimsIdentity.cs | 7 - .../SymmetricImportExportExtensions.cs | 1 - .../src/System/Text/ISCIIEncoding.cs | 12 -- .../Text/Json/Writer/JsonWriterHelper.Escaping.cs | 3 +- .../Text/RegularExpressions/RegexCharClass.cs | 2 +- .../Text/RegularExpressions/RegexCompiler.cs | 1 - .../src/System/Threading/CDSsyncETWBCLProvider.cs | 2 - .../src/System/Transactions/TransactionTable.cs | 1 - 134 files changed, 184 insertions(+), 602 deletions(-) diff --git a/src/libraries/CodeAnalysis.ruleset b/src/libraries/CodeAnalysis.ruleset index e0fdf5a..da3caf1 100644 --- a/src/libraries/CodeAnalysis.ruleset +++ b/src/libraries/CodeAnalysis.ruleset @@ -50,7 +50,6 @@ - diff --git a/src/libraries/Common/src/Interop/FreeBSD/Interop.Process.cs b/src/libraries/Common/src/Interop/FreeBSD/Interop.Process.cs index 2359c33..8978e49 100644 --- a/src/libraries/Common/src/Interop/FreeBSD/Interop.Process.cs +++ b/src/libraries/Common/src/Interop/FreeBSD/Interop.Process.cs @@ -8,6 +8,7 @@ using System.ComponentModel; using System.Diagnostics; using System.Runtime.InteropServices; +#pragma warning disable CA1823 // analyzer incorrectly flags fixed buffer length const (https://github.com/dotnet/roslyn-analyzers/issues/2724) internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/OSX/Interop.libproc.cs b/src/libraries/Common/src/Interop/OSX/Interop.libproc.cs index fd51460..381e57b 100644 --- a/src/libraries/Common/src/Interop/OSX/Interop.libproc.cs +++ b/src/libraries/Common/src/Interop/OSX/Interop.libproc.cs @@ -8,6 +8,7 @@ using System.ComponentModel; using System.Diagnostics; using System.Runtime.InteropServices; +#pragma warning disable CA1823 // analyzer incorrectly flags fixed buffer length const (https://github.com/dotnet/roslyn-analyzers/issues/2724) internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.SecKeyRef.Export.cs b/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.SecKeyRef.Export.cs index 374ca9c..3c3345b 100644 --- a/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.SecKeyRef.Export.cs +++ b/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.SecKeyRef.Export.cs @@ -13,16 +13,8 @@ internal static partial class Interop { internal static partial class AppleCrypto { - private const string OidPbes2 = "1.2.840.113549.1.5.13"; - private const string OidPbkdf2 = "1.2.840.113549.1.5.12"; - private const string OidSha1 = "1.3.14.3.2.26"; - private const string OidTripleDesCbc = "1.2.840.113549.3.7"; - private static readonly SafeCreateHandle s_nullExportString = new SafeCreateHandle(); - private static readonly SafeCreateHandle s_emptyExportString = - CoreFoundation.CFStringCreateWithCString(""); - [DllImport(Libraries.AppleCryptoNative)] private static extern int AppleCryptoNative_SecKeyExport( SafeSecKeyRefHandle key, diff --git a/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.Ssl.cs b/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.Ssl.cs index d8e591c..648a1a2 100644 --- a/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.Ssl.cs +++ b/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.Ssl.cs @@ -305,7 +305,7 @@ internal static partial class Interop { if (protocols.Count == 1 && protocols[0] == SslApplicationProtocol.Http2) { - cfProtocolsRefs = s_cfAlpnHttp211Protocols; + cfProtocolsRefs = s_cfAlpnHttp2Protocols; } else if (protocols.Count == 1 && protocols[0] == SslApplicationProtocol.Http11) { diff --git a/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.X509.cs b/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.X509.cs index 88dffd9..85b3d29 100644 --- a/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.X509.cs +++ b/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.X509.cs @@ -15,6 +15,9 @@ internal static partial class Interop { internal static partial class AppleCrypto { + private static readonly SafeCreateHandle s_emptyExportString = + CoreFoundation.CFStringCreateWithCString(""); + [DllImport(Libraries.AppleCryptoNative)] private static extern int AppleCryptoNative_X509ImportCertificate( byte[] pbKeyBlob, diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.IPPacketInformation.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.IPPacketInformation.cs index b676eaa..307e704 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.IPPacketInformation.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.IPPacketInformation.cs @@ -4,6 +4,8 @@ using System.Runtime.InteropServices; +#pragma warning disable CA1823 // unused private padding fields in MulticastOption structs + internal static partial class Interop { internal static partial class Sys @@ -12,7 +14,7 @@ internal static partial class Interop { public IPAddress Address; // Destination IP Address public int InterfaceIndex; // Interface index - private int Padding; // Pad out to 8-byte alignment + private int _padding; // Pad out to 8-byte alignment } [DllImport(Libraries.SystemNative, EntryPoint = "SystemNative_GetControlMessageBufferSize")] diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.MulticastOption.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.MulticastOption.cs index 8a12048..d208acd 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.MulticastOption.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.MulticastOption.cs @@ -2,10 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Diagnostics; using System.Runtime.InteropServices; +#pragma warning disable CA1823 // unused private padding fields in MulticastOption structs + internal static partial class Interop { internal static partial class Sys diff --git a/src/libraries/Common/src/Interop/Windows/HttpApi/Interop.HttpApi.cs b/src/libraries/Common/src/Interop/Windows/HttpApi/Interop.HttpApi.cs index 19c5741..1684b5c 100644 --- a/src/libraries/Common/src/Interop/Windows/HttpApi/Interop.HttpApi.cs +++ b/src/libraries/Common/src/Interop/Windows/HttpApi/Interop.HttpApi.cs @@ -363,7 +363,6 @@ internal static partial class Interop } private const int HttpHeaderRequestMaximum = (int)HttpRequestHeader.UserAgent + 1; - private const int HttpHeaderResponseMaximum = (int)HttpResponseHeader.WwwAuthenticate + 1; internal static class HTTP_REQUEST_HEADER_ID { diff --git a/src/libraries/Common/src/Interop/Windows/SspiCli/SecuritySafeHandles.cs b/src/libraries/Common/src/Interop/Windows/SspiCli/SecuritySafeHandles.cs index ae8a526..f2a14ec 100644 --- a/src/libraries/Common/src/Interop/Windows/SspiCli/SecuritySafeHandles.cs +++ b/src/libraries/Common/src/Interop/Windows/SspiCli/SecuritySafeHandles.cs @@ -156,8 +156,6 @@ namespace System.Net.Security this.handle = value; } - private const uint CRYPT_ACQUIRE_SILENT_FLAG = 0x00000040; - protected override bool ReleaseHandle() { Interop.Crypt32.CertFreeCertificateContext(handle); diff --git a/src/libraries/Common/src/System/Data/Common/DbConnectionOptions.Common.cs b/src/libraries/Common/src/System/Data/Common/DbConnectionOptions.Common.cs index 66f90e2..9cca4cc 100644 --- a/src/libraries/Common/src/System/Data/Common/DbConnectionOptions.Common.cs +++ b/src/libraries/Common/src/System/Data/Common/DbConnectionOptions.Common.cs @@ -65,17 +65,15 @@ namespace System.Data.Common private static readonly Regex s_connectionStringRegex = new Regex(ConnectionStringPattern, RegexOptions.ExplicitCapture | RegexOptions.Compiled); private static readonly Regex s_connectionStringRegexOdbc = new Regex(ConnectionStringPatternOdbc, RegexOptions.ExplicitCapture | RegexOptions.Compiled); #endif - private const string ConnectionStringValidKeyPattern = "^(?![;\\s])[^\\p{Cc}]+(?= 0x09 && (ch) <= 0x0D)); diff --git a/src/libraries/Common/src/System/Net/Logging/NetEventSource.Common.cs b/src/libraries/Common/src/System/Net/Logging/NetEventSource.Common.cs index 6d3b94e..7c79913 100644 --- a/src/libraries/Common/src/System/Net/Logging/NetEventSource.Common.cs +++ b/src/libraries/Common/src/System/Net/Logging/NetEventSource.Common.cs @@ -17,6 +17,8 @@ using System.Runtime.InteropServices; using System.Security; #endif +#pragma warning disable CA1823 // not all IDs are used by all partial providers + namespace System.Net { // Implementation: diff --git a/src/libraries/Common/src/System/Net/WebSockets/ManagedWebSocket.cs b/src/libraries/Common/src/System/Net/WebSockets/ManagedWebSocket.cs index 1337614..24911ad 100644 --- a/src/libraries/Common/src/System/Net/WebSockets/ManagedWebSocket.cs +++ b/src/libraries/Common/src/System/Net/WebSockets/ManagedWebSocket.cs @@ -52,8 +52,10 @@ namespace System.Net.WebSockets /// Valid states to be in when calling CloseAsync. private static readonly WebSocketState[] s_validCloseStates = { WebSocketState.Open, WebSocketState.CloseReceived, WebSocketState.CloseSent }; +#pragma warning disable CA1823 // not used by System.Net.WebSockets.WebSocketProtocol.dll /// Successfully completed task representing a close message. private static readonly Task s_cachedCloseTask = Task.FromResult(new WebSocketReceiveResult(0, WebSocketMessageType.Close, true)); +#pragma warning restore CA1823 /// The maximum size in bytes of a message frame header that includes mask bytes. internal const int MaxMessageHeaderLength = 14; diff --git a/src/libraries/Common/src/System/Resources/ResourceWriter.cs b/src/libraries/Common/src/System/Resources/ResourceWriter.cs index 96c27e3..2eea8c6 100644 --- a/src/libraries/Common/src/System/Resources/ResourceWriter.cs +++ b/src/libraries/Common/src/System/Resources/ResourceWriter.cs @@ -45,7 +45,6 @@ namespace System.Resources { // An initial size for our internal sorted list, to avoid extra resizes. private const int AverageNameSize = 20 * 2; // chars in little endian Unicode - private const int AverageValueSize = 40; internal const string ResourceReaderFullyQualifiedName = "System.Resources.ResourceReader, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"; private const string ResSetTypeName = "System.Resources.RuntimeResourceSet"; private const int ResSetVersion = 2; diff --git a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft.VisualBasic.Core.vbproj b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft.VisualBasic.Core.vbproj index 6ec2c72..0a0410e 100644 --- a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft.VisualBasic.Core.vbproj +++ b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft.VisualBasic.Core.vbproj @@ -11,6 +11,7 @@ 42025 $(DefineConstants),LATEBINDING=True $(DefineConstants),PLATFORM_WINDOWS=True + $(NoWarn);CA1823 Microsoft.VisualBasic.Core true false diff --git a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/Utils.LateBinder.vb b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/Utils.LateBinder.vb index 54b99ab..ccd16fc 100644 --- a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/Utils.LateBinder.vb +++ b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/Utils.LateBinder.vb @@ -44,8 +44,6 @@ Namespace Microsoft.VisualBasic.CompilerServices Friend Const OptionCompareTextFlags As CompareOptions = (CompareOptions.IgnoreCase Or CompareOptions.IgnoreWidth Or CompareOptions.IgnoreKanaType) - Private Shared ReadOnly s_resourceManagerSyncObj As Object = New Object - Friend Shared m_achIntlSpace() As Char = {chSpace, chIntlSpace} Private Shared ReadOnly s_voidType As Type = System.Type.GetType("System.Void") Private Shared s_VBRuntimeAssembly As System.Reflection.Assembly diff --git a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Conversion.vb b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Conversion.vb index f3f00fe..790f413 100644 --- a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Conversion.vb +++ b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Conversion.vb @@ -13,35 +13,18 @@ Namespace Microsoft.VisualBasic Public Module Conversion - Private Const NUMPRS_LEADING_WHITE As Integer = &H1I - Private Const NUMPRS_TRAILING_WHITE As Integer = &H2I Private Const NUMPRS_LEADING_PLUS As Integer = &H4I - Private Const NUMPRS_TRAILING_PLUS As Integer = &H8I Private Const NUMPRS_LEADING_MINUS As Integer = &H10I - Private Const NUMPRS_TRAILING_MINUS As Integer = &H20I Private Const NUMPRS_HEX_OCT As Integer = &H40I - Private Const NUMPRS_PARENS As Integer = &H80I Private Const NUMPRS_DECIMAL As Integer = &H100I - Private Const NUMPRS_THOUSANDS As Integer = &H200I - Private Const NUMPRS_CURRENCY As Integer = &H400I Private Const NUMPRS_EXPONENT As Integer = &H800I - Private Const NUMPRS_USE_ALL As Integer = &H1000I - Private Const NUMPRS_STD As Integer = &H1FFFI - - ' flags used by dwOutFlags only: - ' - Private Const NUMPRS_NEG As Integer = &H10000I - Private Const NUMPRS_INEXACT As Integer = &H20000I ' flags used by VarNumFromParseNum to indicate acceptable result types: ' - Private Const VTBIT_EMPTY As Integer = &H0 - Private Const VTBIT_NULL As Integer = &H2 Private Const VTBIT_I2 As Integer = &H4 Private Const VTBIT_I4 As Integer = &H8 Private Const VTBIT_R4 As Integer = &H10 Private Const VTBIT_R8 As Integer = &H20 - Private Const VTBIT_CY As Integer = &H40 Private Const VTBIT_DATE As Integer = &H80 Private Const VTBIT_BSTR As Integer = &H100 Private Const VTBIT_OBJECT As Integer = &H200 @@ -59,7 +42,6 @@ Namespace Microsoft.VisualBasic Private Const LCID_US_ENGLISH As Integer = &H409I Private Const PRSFLAGS As Integer _ = (NUMPRS_LEADING_PLUS Or NUMPRS_LEADING_MINUS Or NUMPRS_HEX_OCT Or NUMPRS_DECIMAL Or NUMPRS_EXPONENT) - 'Private Const VTBITS As Integer = (VTBIT_I2 Or VTBIT_I4 Or VTBIT_R8 Or VTBIT_CY Or VTBIT_DECIMAL) Private Const VTBITS As Integer = (VTBIT_I2 Or VTBIT_I4 Or VTBIT_R8 Or VTBIT_DECIMAL) Private Const TYPE_INDICATOR_INT16 As Char = "%"c @@ -1079,9 +1061,7 @@ NextOctCharacter: Private Function ShiftVTBits(ByVal vt As Integer) As Integer Select Case vt 'Case VariantType.Empty - 'Fall through VTBIT_EMPTY 'Case VariantType.Null - 'Fall through VTBIT_NULL Case VariantType.Short Return VTBIT_I2 Case VariantType.Integer diff --git a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/FileSystem.vb b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/FileSystem.vb index 9d61915..f83474f 100644 --- a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/FileSystem.vb +++ b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/FileSystem.vb @@ -18,11 +18,7 @@ Namespace Microsoft.VisualBasic Public Module FileSystem - Private Const ERROR_ACCESS_DENIED As Integer = 5 Private Const ERROR_FILE_NOT_FOUND As Integer = 2 - Private Const ERROR_BAD_NETPATH As Integer = 53 - Private Const ERROR_INVALID_PARAMETER As Integer = 87 - Private Const ERROR_WRITE_PROTECT As Integer = 19 Private Const ERROR_FILE_EXISTS As Integer = 80 Private Const ERROR_ALREADY_EXISTS As Integer = 183 Private Const ERROR_INVALID_ACCESS As Integer = 12 @@ -37,15 +33,6 @@ Namespace Microsoft.VisualBasic Friend Const FIRST_LOCAL_CHANNEL As Integer = 1 Friend Const LAST_LOCAL_CHANNEL As Integer = 255 - Private Const A_NORMAL As Integer = &H0I - Private Const A_RDONLY As Integer = &H1I - Private Const A_HIDDEN As Integer = &H2I - Private Const A_SYSTEM As Integer = &H4I - Private Const A_VOLID As Integer = &H8I - Private Const A_SUBDIR As Integer = &H10I - Private Const A_ARCH As Integer = &H20I - Private Const A_ALLBITS As Integer = (A_NORMAL Or A_RDONLY Or A_HIDDEN Or A_SYSTEM Or A_VOLID Or A_SUBDIR Or A_ARCH) - Friend Const sTimeFormat As String = "T" Friend Const sDateFormat As String = "d" Friend Const sDateTimeFormat As String = "F" diff --git a/src/libraries/Microsoft.Win32.Registry/src/Microsoft.Win32.Registry.csproj b/src/libraries/Microsoft.Win32.Registry/src/Microsoft.Win32.Registry.csproj index 4a21a06..8a0d1b8 100644 --- a/src/libraries/Microsoft.Win32.Registry/src/Microsoft.Win32.Registry.csproj +++ b/src/libraries/Microsoft.Win32.Registry/src/Microsoft.Win32.Registry.csproj @@ -8,6 +8,7 @@ $(DefineConstants);REGISTRY_ASSEMBLY true SR.PlatformNotSupported_Registry + $(NoWarn);CA1823