Like in 0028c5c24f84750b5a53131c69e5f69fb51d8a7c, this solves warnings like
mingw-w64-headers/include/wintrust.h:245:47: warning: 'struct _CRYPT_PROVIDER_DATA' declared inside parameter list will not be visible outside of this definition or declaration 245 | typedef WINBOOL (*PFN_CPD_ADD_STORE)(struct _CRYPT_PROVIDER_DATA *pProvData,HCERTSTORE hStore2Add);
| ^~~~~~~~~~~~~~~~~~~~
mingw-w64-headers/include/wintrust.h:246:124: warning: 'struct _CRYPT_PROVIDER_SGNR' declared inside
parameter list will not be visible outside of this definition or declaration
246 | typedef WINBOOL (*PFN_CPD_ADD_SGNR)(struct _CRYPT_PROVIDER_DATA *pProvData,WINBOOL
fCounterSigner,DWORD idxSigner,struct _CRYPT_PROVIDER_SGNR *pSgnr2Add);
|
^~~~~~~~~~~~~~~~~~~~
Without these forward declarations the typedefs declare new local types that are not the same type as those in file scope. Signed-off-by: LIU Hao <[email protected]> --- mingw-w64-headers/include/wintrust.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mingw-w64-headers/include/wintrust.h b/mingw-w64-headers/include/wintrust.h index 22e03f237..68221d0b4 100644 --- a/mingw-w64-headers/include/wintrust.h +++ b/mingw-w64-headers/include/wintrust.h @@ -240,6 +240,11 @@ extern "C" #define TRUSTERROR_MAX_STEPS 38 + struct _CRYPT_PROVIDER_DATA; + struct _CRYPT_PROVIDER_SGNR; + struct _CRYPT_PROVIDER_PRIVDATA; + struct _CRYPT_PROVIDER_DEFUSAGE; + typedef void *(*PFN_CPD_MEM_ALLOC)(DWORD cbSize); typedef void (*PFN_CPD_MEM_FREE)(void *pvMem2Free); typedef WINBOOL (*PFN_CPD_ADD_STORE)(struct _CRYPT_PROVIDER_DATA *pProvData,HCERTSTORE hStore2Add); -- 2.50.1
From 0b3b68a1ac0aeb0a8e83c6cfd8fe4ee896b5694f Mon Sep 17 00:00:00 2001 From: LIU Hao <[email protected]> Date: Sat, 19 Jul 2025 21:40:16 +0800 Subject: [PATCH] headers/wintrust: Add forward declarations for structs Like in 0028c5c24f84750b5a53131c69e5f69fb51d8a7c, this solves warnings like mingw-w64-headers/include/wintrust.h:245:47: warning: 'struct _CRYPT_PROVIDER_DATA' declared inside parameter list will not be visible outside of this definition or declaration 245 | typedef WINBOOL (*PFN_CPD_ADD_STORE)(struct _CRYPT_PROVIDER_DATA *pProvData,HCERTSTORE hStore2Add); | ^~~~~~~~~~~~~~~~~~~~ mingw-w64-headers/include/wintrust.h:246:124: warning: 'struct _CRYPT_PROVIDER_SGNR' declared inside parameter list will not be visible outside of this definition or declaration 246 | typedef WINBOOL (*PFN_CPD_ADD_SGNR)(struct _CRYPT_PROVIDER_DATA *pProvData,WINBOOL fCounterSigner,DWORD idxSigner,struct _CRYPT_PROVIDER_SGNR *pSgnr2Add); | ^~~~~~~~~~~~~~~~~~~~ Without these forward declarations the typedefs declare new local types that are not the same type as those in file scope. Signed-off-by: LIU Hao <[email protected]> --- mingw-w64-headers/include/wintrust.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mingw-w64-headers/include/wintrust.h b/mingw-w64-headers/include/wintrust.h index 22e03f237..68221d0b4 100644 --- a/mingw-w64-headers/include/wintrust.h +++ b/mingw-w64-headers/include/wintrust.h @@ -240,6 +240,11 @@ extern "C" #define TRUSTERROR_MAX_STEPS 38 + struct _CRYPT_PROVIDER_DATA; + struct _CRYPT_PROVIDER_SGNR; + struct _CRYPT_PROVIDER_PRIVDATA; + struct _CRYPT_PROVIDER_DEFUSAGE; + typedef void *(*PFN_CPD_MEM_ALLOC)(DWORD cbSize); typedef void (*PFN_CPD_MEM_FREE)(void *pvMem2Free); typedef WINBOOL (*PFN_CPD_ADD_STORE)(struct _CRYPT_PROVIDER_DATA *pProvData,HCERTSTORE hStore2Add); -- 2.50.1
OpenPGP_signature.asc
Description: OpenPGP digital signature
_______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
