Incorrect parameter order found by PVS-Studio (dotnet/coreclr#10497)
authorIlya <DieselMachine84@users.noreply.github.com>
Mon, 10 Apr 2017 17:21:41 +0000 (20:21 +0300)
committerJan Kotas <jkotas@microsoft.com>
Mon, 10 Apr 2017 17:21:41 +0000 (10:21 -0700)
* Incorrect parameter order found by PVS-Studio
I used PVS-Studio static analyzer to check this project. I would like to suggest a variant of the way to fix the error, detected with the help of V3066 diagnostic https://www.viva64.com/en/w/V3066/

Commit migrated from https://github.com/dotnet/coreclr/commit/0ca41bc62319c16dfafab2767abe623bb4be4547

src/coreclr/src/mscorlib/src/System/Reflection/RuntimeModule.cs

index 4e77e8f..75809cb 100644 (file)
@@ -20,7 +20,7 @@ namespace System.Reflection
         #region FCalls
         [DllImport(JitHelpers.QCall, CharSet = CharSet.Unicode)]
         [SuppressUnmanagedCodeSecurity]
-        private extern static void GetType(RuntimeModule module, String className, bool ignoreCase, bool throwOnError, ObjectHandleOnStack type, ObjectHandleOnStack keepAlive);
+        private extern static void GetType(RuntimeModule module, String className, bool throwOnError, bool ignoreCase, ObjectHandleOnStack type, ObjectHandleOnStack keepAlive);
 
         [DllImport(JitHelpers.QCall)]
         [SuppressUnmanagedCodeSecurity]