Commit 8700637f authored by Nico Weber's avatar Nico Weber Committed by Commit Bot

net: Fix -Wmicrosoft-cast warning.

Standard C++ doesn't allow implicit conversion between function pointers
and void*. MSVC does allow that, so clang-cl also allows it but emits a
-Wmicrosoft-cast warning. We want to enable this warning to make the
compiler behave more similar on different platforms, so add an explicit
cast to void*.

Bug: 550065
Change-Id: Ib370ef07bf5f2df00814aa063833486e30ecde6f
Reviewed-on: https://chromium-review.googlesource.com/954202Reviewed-by: default avatarDavid Benjamin <davidben@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#541691}
parent d3750ec1
...@@ -623,7 +623,8 @@ class RevocationInjector { ...@@ -623,7 +623,8 @@ class RevocationInjector {
RevocationInjector() { RevocationInjector() {
const CRYPT_OID_FUNC_ENTRY kInterceptFunction[] = { const CRYPT_OID_FUNC_ENTRY kInterceptFunction[] = {
{CRYPT_DEFAULT_OID, &CertDllVerifyRevocationWithCRLSet}, {CRYPT_DEFAULT_OID,
reinterpret_cast<void*>(&CertDllVerifyRevocationWithCRLSet)},
}; };
BOOL ok = CryptInstallOIDFunctionAddress( BOOL ok = CryptInstallOIDFunctionAddress(
NULL, X509_ASN_ENCODING, CRYPT_OID_VERIFY_REVOCATION_FUNC, NULL, X509_ASN_ENCODING, CRYPT_OID_VERIFY_REVOCATION_FUNC,
......
...@@ -65,8 +65,9 @@ struct CryptoAPIInjector { ...@@ -65,8 +65,9 @@ struct CryptoAPIInjector {
// sz_CERT_STORE_PROV_SYSTEM_[A/W] and CERT_STORE_PROV_SYSTEM_A, based // sz_CERT_STORE_PROV_SYSTEM_[A/W] and CERT_STORE_PROV_SYSTEM_A, based
// on whether or not any third-party CryptoAPI modules have been // on whether or not any third-party CryptoAPI modules have been
// installed. // installed.
const CRYPT_OID_FUNC_ENTRY kFunctionToIntercept = const CRYPT_OID_FUNC_ENTRY kFunctionToIntercept = {
{ CERT_STORE_PROV_SYSTEM_W, &InterceptedOpenStoreW }; CERT_STORE_PROV_SYSTEM_W,
reinterpret_cast<void*>(&InterceptedOpenStoreW)};
// Inject kFunctionToIntercept at the front of the linked list that // Inject kFunctionToIntercept at the front of the linked list that
// crypt32 uses when CertOpenStore is called, replacing the existing // crypt32 uses when CertOpenStore is called, replacing the existing
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment