Francois Gouget : winetest: Annotate xmalloc() and xrealloc() with allocation size attribute.

Alexandre Julliard julliard at winehq.org
Wed Feb 18 10:15:23 CST 2009


Module: wine
Branch: master
Commit: e3aa47c3889d3787a25e3e6bf686e825d08ae90b
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=e3aa47c3889d3787a25e3e6bf686e825d08ae90b

Author: Francois Gouget <fgouget at free.fr>
Date:   Tue Feb 17 18:51:43 2009 +0100

winetest: Annotate xmalloc() and xrealloc() with allocation size attribute.

---

 programs/winetest/winetest.h |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/programs/winetest/winetest.h b/programs/winetest/winetest.h
index 795bf03..e4844a9 100644
--- a/programs/winetest/winetest.h
+++ b/programs/winetest/winetest.h
@@ -28,9 +28,6 @@
 
 void fatal (const char* msg);
 void warning (const char* msg);
-void *xmalloc (size_t len);
-void *xrealloc (void *op, size_t len);
-char *xstrdup( const char *str );
 void xprintf (const char *fmt, ...);
 char *vstrmake (size_t *lenp, va_list ap);
 char *strmake (size_t *lenp, ...);
@@ -45,6 +42,13 @@ extern HANDLE logfile;
 
 #include <windows.h>
 
+#ifndef __WINE_ALLOC_SIZE
+#define __WINE_ALLOC_SIZE(x)
+#endif
+void *xmalloc (size_t len) __WINE_ALLOC_SIZE(1);
+void *xrealloc (void *op, size_t len) __WINE_ALLOC_SIZE(2);
+char *xstrdup( const char *str );
+
 enum report_type {
     R_STATUS = 0,
     R_PROGRESS,




More information about the wine-cvs mailing list