Mercurial > dovecot > original-hg > dovecot-1.2
diff src/lib/macros.h @ 4720:b0daeec3d416 HEAD
Use malloc attribute for the most commonly used memory and string allocation
functions. Use warn_unused_result attribute for reallocs.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 01 Nov 2006 21:19:35 +0200 |
parents | 1995cb3763db |
children | d972f9e2902e |
line wrap: on
line diff
--- a/src/lib/macros.h Wed Nov 01 20:47:37 2006 +0200 +++ b/src/lib/macros.h Wed Nov 01 21:19:35 2006 +0200 @@ -102,6 +102,8 @@ # define __attr_unused__ __attribute__((unused)) # define __attr_noreturn__ __attribute__((noreturn)) # define __attr_const__ __attribute__((const)) +# define __attr_malloc__ __attribute__((malloc)) +# define __attr_warn_unused_result__ __attribute__((warn_unused_result)) # if __GNUC__ > 3 /* GCC 4.0 and later */ # define __attr_sentinel__ __attribute__((sentinel))