http://bugs.winehq.org/show_bug.cgi?id=27367 Summary: widl: gcc warns about pointer mismatch when calling pfnFree Product: Wine Version: 1.3.21 Platform: x86-64 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: tools AssignedTo: wine-bugs(a)winehq.org ReportedBy: cerebro.alexiel(a)gmail.com Created an attachment (id=34992) --> (http://bugs.winehq.org/attachment.cgi?id=34992) Patch that fixes the warning by adding a cast to void * when calling pfnFree When compiling latest wine, I have the following warning : ../../tools/widl/widl -I../../../git-wine/dlls/actxprxy -I. -I../../../git-wine/include -I../../include -D__WINESRC__ -DWINE_REGISTER_DLL -DPROXY_DELEGATION -p -o actxprxy_shobjidl_p.c ../../../git-wine/dlls/actxprxy/actxprxy_shobjidl.idl ../../tools/widl/widl -I../../../git-wine/dlls/actxprxy -I. -I../../../git-wine/include -I../../include -D__WINESRC__ -DWINE_REGISTER_DLL -DPROXY_DELEGATION -h -o actxprxy_shobjidl.h ../../../git-wine/dlls/actxprxy/actxprxy_shobjidl.idl gcc -c -I../../../git-wine/dlls/actxprxy -I. -I../../../git-wine/include -I../../include -D__WINESRC__ -DWINE_REGISTER_DLL -DPROXY_DELEGATION -D_REENTRANT -fPIC -Wall -pipe -fno-strict-aliasing -Wdeclaration-after-statement -Wempty-body -Wstrict-prototypes -Wtype-limits -Wwrite-strings -Wpointer-arith -Wlogical-op -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 -o actxprxy_shobjidl_p.o actxprxy_shobjidl_p.c actxprxy_shobjidl_p.c: In function ‘__finally_IFileDialog_SetFileTypes_Stub’: actxprxy_shobjidl_p.c:94496:9: warning: passing argument 1 of ‘__frame->_StubMsg.pfnFree’ discards qualifiers from pointer target type actxprxy_shobjidl_p.c:94496:9: note: expected ‘void *’ but argument is of type ‘const struct COMDLG_FILTERSPEC *’ The actxprxy_shobjidl_p.c file is generated by widl from include/shobjidl.idl. I found 3 references for pfnFree in tools/widl/typegen.c so I added a (void *) cast 3 times with more or less spaces. It appears the relevant pfnFree is at typegen.c:3778. I'm attaching a patch that made the warning disappear. Can someone tell me if this is the right approach ? Ideally, wine would compile without any warning whatever your compiler or architecture is. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.