Marcus Meissner meissner@suse.de writes:
@@ -91,11 +91,11 @@ typedef HRESULT (STDMETHODCALLTYPE MAPILOGONEX)(ULONG_PTR,LPSTR,LPSTR,ULONG,LPMA typedef MAPILOGONEX *LPMAPILOGONEX; MAPILOGONEX MAPILogonEx;
-typedef SCODE (WINAPI MAPIALLOCATEBUFFER)(ULONG,LPVOID*); +typedef SCODE (__WINE_ALLOC_SIZE(1) WINAPI MAPIALLOCATEBUFFER)(ULONG,LPVOID*); typedef MAPIALLOCATEBUFFER *LPMAPIALLOCATEBUFFER; MAPIALLOCATEBUFFER MAPIAllocateBuffer;
-typedef SCODE (WINAPI MAPIALLOCATEMORE)(ULONG,LPVOID,LPVOID*); +typedef SCODE (__WINE_ALLOC_SIZE(1) WINAPI MAPIALLOCATEMORE)(ULONG,LPVOID,LPVOID*); typedef MAPIALLOCATEMORE *LPMAPIALLOCATEMORE; MAPIALLOCATEMORE MAPIAllocateMore;
I don't think it's useful to annotate functions that don't return a pointer.
@@ -1393,7 +1393,7 @@ void WINAPI InstallHinfSectionW( HWND hwnd, HINSTANCE handle, PCWSTR cmdline BOOL WINAPI IsUserAdmin(VOID); PWSTR WINAPI MultiByteToUnicode(PCSTR lpMultiByteStr, UINT uCodePage); VOID WINAPI MyFree(PVOID lpMem); -PVOID WINAPI MyMalloc(DWORD dwSize); +PVOID WINAPI MyMalloc(DWORD dwSize) __WINE_ALLOC_SIZE(1); PVOID WINAPI MyRealloc(PVOID lpSrc, DWORD dwSize); DWORD WINAPI OpenAndMapForRead(PCWSTR, PDWORD, PHANDLE, PHANDLE, PVOID *); LONG WINAPI QueryRegistryValue(HKEY, PCWSTR, PBYTE *, PDWORD, PDWORD);
Any reason you are not annotating the various realloc functions too?