[PATCH v2] windowscodecs: Fix an MSVC warning about pNumericRepresentation.
Signed-off-by: Serge Gautherie <winehq-git_serge_180711(a)gautherie.fr> --- "...\info.c(1461) : error C4133: 'function' : incompatible types - from 'WICPixelFormatNumericRepresentation *' to 'DWORD *'" ReactOS-Bug: https://jira.reactos.org/browse/CORE-7538 --- dlls/windowscodecs/info.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/dlls/windowscodecs/info.c b/dlls/windowscodecs/info.c index e131107..7dcfd22 100644 --- a/dlls/windowscodecs/info.c +++ b/dlls/windowscodecs/info.c @@ -1450,11 +1450,18 @@ static HRESULT WINAPI PixelFormatInfo_SupportsTransparency(IWICPixelFormatInfo2 static HRESULT WINAPI PixelFormatInfo_GetNumericRepresentation(IWICPixelFormatInfo2 *iface, WICPixelFormatNumericRepresentation *pNumericRepresentation) { + HRESULT hr; + DWORD numrep; + PixelFormatInfo *This = impl_from_IWICPixelFormatInfo2(iface); TRACE("(%p,%p)\n", iface, pNumericRepresentation); - return ComponentInfo_GetDWORDValue(This->classkey, numericrepresentation_valuename, pNumericRepresentation); + numrep = *pNumericRepresentation; + hr = ComponentInfo_GetDWORDValue(This->classkey, numericrepresentation_valuename, &numrep); + if (hr == S_OK) + *pNumericRepresentation = numrep; + return hr; } static const IWICPixelFormatInfo2Vtbl PixelFormatInfo_Vtbl = { -- 2.10.0.windows.1
This doesn't solve the problem with the previous patch. There's still no check for pNumericRepresentation being NULL.
participants (2)
-
Serge Gautherie -
Vincent Povirk