remove unused local (#41226)
authorSeonyoung Park <48307770+seonyounggg@users.noreply.github.com>
Mon, 24 Aug 2020 05:22:43 +0000 (14:22 +0900)
committerGitHub <noreply@github.com>
Mon, 24 Aug 2020 05:22:43 +0000 (22:22 -0700)
* remove unused local

issue dotnet#30457
remove unused local variable fullPath at line 415

* Update src/libraries/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/X509Certificate2.cs

Co-authored-by: Kevin Gosse <krix33@gmail.com>
Co-authored-by: Kevin Gosse <krix33@gmail.com>
src/libraries/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/X509Certificate2.cs

index 7caf838..fae8afb 100644 (file)
@@ -412,7 +412,7 @@ namespace System.Security.Cryptography.X509Certificates
 
             // .NET Framework compat: The .NET Framework expands the filename to a full path for the purpose of performing a CAS permission check. While CAS is not present here,
             // we still need to call GetFullPath() so we get the same exception behavior if the fileName is bad.
-            string fullPath = Path.GetFullPath(fileName);
+            _ = Path.GetFullPath(fileName);
 
             return X509Pal.Instance.GetCertContentType(fileName);
         }