[PATCH] winmm: Fix 1 MSVC warning C4090.

Zebediah Figura z.figura12 at gmail.com
Sun Jun 14 00:25:22 CDT 2020


On 6/13/20 11:56 PM, Serge Gautherie wrote:
> Signed-off-by: Serge Gautherie <winehq-git_serge_180711 at gautherie.fr>
> ---
> "...\mci.c(...): warning C4090: 'function': different 'const' qualifiers"
> ---
>   dlls/winmm/mci.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/dlls/winmm/mci.c b/dlls/winmm/mci.c
> index 870f5d1..b15da71 100644
> --- a/dlls/winmm/mci.c
> +++ b/dlls/winmm/mci.c
> @@ -1710,7 +1710,7 @@ BOOL WINAPI mciFreeCommandResource(UINT uTable)
>       FreeResource(S_MciCmdTable[uTable].hMem);
>       S_MciCmdTable[uTable].hMem = NULL;
>       S_MciCmdTable[uTable].lpTable = NULL;
> -    HeapFree(GetProcessHeap(), 0, S_MciCmdTable[uTable].aVerbs);
> +    HeapFree(GetProcessHeap(), 0, (LPVOID)S_MciCmdTable[uTable].aVerbs);
>       S_MciCmdTable[uTable].aVerbs = 0;
>       S_MciCmdTable[uTable].nVerbs = 0;
>       return TRUE;
> 

This warning is just broken. "aVerbs" isn't a const pointer, it's a 
(mutable) pointer to a const pointer.



More information about the wine-devel mailing list