diff options
author | pgp <[email protected]> | 2020-02-21 15:09:08 +0100 |
---|---|---|
committer | pgp <[email protected]> | 2020-02-21 15:09:08 +0100 |
commit | e9dab959c71ca4402544d578971fdd567301cda4 (patch) | |
tree | df314daf090c2412702d64b3704e53fcd5947154 /src/lib/x509/certstor_system_windows | |
parent | 5042455a35b533392e907c642ba97a03c48b2544 (diff) |
Avoid mingw warning in case of NULL as unused argument to win32 API that accept non-pointer types
Diffstat (limited to 'src/lib/x509/certstor_system_windows')
-rw-r--r-- | src/lib/x509/certstor_system_windows/certstor_windows.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/x509/certstor_system_windows/certstor_windows.cpp b/src/lib/x509/certstor_system_windows/certstor_windows.cpp index 3a58f680c..3056b7eed 100644 --- a/src/lib/x509/certstor_system_windows/certstor_windows.cpp +++ b/src/lib/x509/certstor_system_windows/certstor_windows.cpp @@ -17,6 +17,8 @@ #include <windows.h> #include <wincrypt.h> +#define WINCRYPT_UNUSED_PARAM 0 // for avoiding warnings when passing NULL to unused params in win32 api that accept integer types + namespace Botan { namespace { @@ -105,7 +107,7 @@ class Handle_Guard HCERTSTORE open_cert_store(const char* cert_store_name) { - auto store = CertOpenSystemStoreA(NULL, cert_store_name); + auto store = CertOpenSystemStoreA(WINCRYPT_UNUSED_PARAM, cert_store_name); if(!store) { throw Botan::Internal_Error( |