https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c19ebd0b0a2c4775b84ed625ed09a53f63ad870c

commit c19ebd0b0a2c4775b84ed625ed09a53f63ad870c
Author:     Hermès Bélusca-Maïto <[email protected]>
AuthorDate: Mon Dec 23 21:58:25 2024 +0100
Commit:     Hermès Bélusca-Maïto <[email protected]>
CommitDate: Mon Dec 23 22:44:23 2024 +0100

    [SHLWAPI] Explicitly cast to "int*" the 3rd parameter of StrToIntExW calls 
(fix build)
    
    Fixes build error:
    
    ../src/dll/win32/shlwapi/ordinal.c:5417:63: error: passing argument 3 of 
'StrToIntExW' from incompatible pointer type 
[-Werror=incompatible-pointer-types]
             if (!StrToIntExW(V_BSTR(&vargTemp), STIF_SUPPORT_HEX, 
&V_I4(&variTemp)))
    In file included from ../src/dll/win32/shlwapi/ordinal.c:45:
    ../src/sdk/include/psdk/shlwapi.h:1682:52: note: expected 'int *' but 
argument is of type 'LONG *' {aka 'long int *'}
     BOOL WINAPI StrToIntExW(_In_ LPCWSTR, DWORD, _Out_ int*);
                                                        ^~~~
---
 dll/win32/shlwapi/ordinal.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/dll/win32/shlwapi/ordinal.c b/dll/win32/shlwapi/ordinal.c
index f36cb6a6b66..3d506b0285e 100644
--- a/dll/win32/shlwapi/ordinal.c
+++ b/dll/win32/shlwapi/ordinal.c
@@ -5414,7 +5414,7 @@ HRESULT VariantChangeTypeForRead(_Inout_ VARIANTARG 
*pvarg, _In_ VARTYPE vt)
 
     if (vt == VT_I1 || vt == VT_I2 || vt == VT_I4)
     {
-        if (!StrToIntExW(V_BSTR(&vargTemp), STIF_SUPPORT_HEX, 
&V_I4(&variTemp)))
+        if (!StrToIntExW(V_BSTR(&vargTemp), STIF_SUPPORT_HEX, 
(int*)&V_I4(&variTemp)))
             goto DoDefault;
 
         V_VT(&variTemp) = VT_INT;
@@ -5429,7 +5429,7 @@ HRESULT VariantChangeTypeForRead(_Inout_ VARIANTARG 
*pvarg, _In_ VARTYPE vt)
 
     if (vt == VT_UI1 || vt == VT_UI2 || vt == VT_UI4)
     {
-        if (!StrToIntExW(V_BSTR(&vargTemp), STIF_SUPPORT_HEX, 
(LPINT)&V_UI4(&variTemp)))
+        if (!StrToIntExW(V_BSTR(&vargTemp), STIF_SUPPORT_HEX, 
(int*)&V_UI4(&variTemp)))
             goto DoDefault;
 
         V_VT(&variTemp) = VT_UINT;
@@ -5441,7 +5441,7 @@ HRESULT VariantChangeTypeForRead(_Inout_ VARIANTARG 
*pvarg, _In_ VARTYPE vt)
 
     if (vt == VT_INT || vt == VT_UINT)
     {
-        if (!StrToIntExW(V_BSTR(&vargTemp), STIF_SUPPORT_HEX, 
&V_INT(&variTemp)))
+        if (!StrToIntExW(V_BSTR(&vargTemp), STIF_SUPPORT_HEX, 
(int*)&V_INT(&variTemp)))
             goto DoDefault;
 
         V_VT(&variTemp) = VT_UINT;

Reply via email to