changeset 70:580d76781c9e

Remove attributes for buffer too
author David Demelier <markand@malikania.fr>
date Fri, 11 Nov 2011 02:24:09 +0100
parents 8f6d3850fac1
children 6981419d48c1
files buffer.h
diffstat 1 files changed, 10 insertions(+), 26 deletions(-) [+]
line wrap: on
line diff
--- a/buffer.h	Fri Nov 11 02:21:59 2011 +0100
+++ b/buffer.h	Fri Nov 11 02:24:09 2011 +0100
@@ -25,22 +25,6 @@
 extern "C" {
 #endif
 
-/*
- * Some useful attributes with gcc or clang.
- */
-
-#if defined(__GNUC__)
-# pragma GCC diagnostic warning	"-Wnonnull"
-# pragma GCC diagnostic warning	"-Wformat"
-# define __at_malloc		__attribute__ ((malloc))
-# define __at_nonnull		__attribute__ ((nonnull(1)))
-# define __at_printf(...)	__attribute__ ((format(printf, __VA_ARGS__)))
-#else
-# define __at_malloc
-# define __at_nonnull
-# define __at_printf(...)
-#endif
-
 #define	BUFFER_DEFAULT_BSIZE	512
 
 enum buffer_type {
@@ -56,16 +40,16 @@
 	int		bsize;		/* initial length */
 };
 
-struct buffer	*buffer_new(enum buffer_type, int) __at_malloc;
-int		buffer_strcat(struct buffer *, const char *) __at_nonnull;
-int		buffer_putc(struct buffer *buf, char) __at_nonnull;
-int		buffer_bcat(struct buffer *, const void *, size_t) __at_nonnull;
-int		buffer_vprintf(struct buffer *, const char *, va_list) __at_nonnull;
-int		buffer_printf(struct buffer *, const char *, ...) __at_printf(2, 3);
-int		buffer_shrink(struct buffer *) __at_nonnull;
-char		*buffer_end(struct buffer *) __at_nonnull;
-void		buffer_clear(struct buffer *) __at_nonnull;
-void		buffer_free(struct buffer *) __at_nonnull;
+struct buffer	*buffer_new(enum buffer_type, int);
+int		buffer_strcat(struct buffer *, const char *);
+int		buffer_putc(struct buffer *buf, char);
+int		buffer_bcat(struct buffer *, const void *, size_t);
+int		buffer_vprintf(struct buffer *, const char *, va_list);
+int		buffer_printf(struct buffer *, const char *, ...);
+int		buffer_shrink(struct buffer *);
+char		*buffer_end(struct buffer *);
+void		buffer_clear(struct buffer *);
+void		buffer_free(struct buffer *);
 
 #ifdef __cplusplus
 }