[xiph-commits] r13423 - experimental/moritz/xalloc

moritz at svn.xiph.org moritz at svn.xiph.org
Wed Aug 1 14:00:05 PDT 2007


Author: moritz
Date: 2007-08-01 14:00:04 -0700 (Wed, 01 Aug 2007)
New Revision: 13423

Modified:
   experimental/moritz/xalloc/Makefile
   experimental/moritz/xalloc/xalloc.c
Log:
Add tree prototypes, fix _xalloc_warn() prototype location.


Modified: experimental/moritz/xalloc/Makefile
===================================================================
--- experimental/moritz/xalloc/Makefile	2007-08-01 10:33:05 UTC (rev 13422)
+++ experimental/moritz/xalloc/Makefile	2007-08-01 21:00:04 UTC (rev 13423)
@@ -9,7 +9,7 @@
 THREADS =	-pthread
 CC ?=		gcc
 CFLAGS ?=	-O2 -pipe
-CFLAGS +=	-DHAVE_CONFIG_H=1 -DXALLOC_DEBUG=1 -DXALLOC_WITH_XASPRINTF=1 -fstrict-aliasing -Wall -W -ansi -pedantic -Wwrite-strings -Wpointer-arith $(THREADS)
+CFLAGS +=	-DHAVE_CONFIG_H=1 -DXALLOC_DEBUG=1 -DXALLOC_WITH_XASPRINTF=1 -fstrict-aliasing -Wall -W -ansi -pedantic -Wwrite-strings -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes $(THREADS)
 DEBUG ?=	-g -ggdb
 INCLUDEFLAGS =	-I../compat
 LDFLAGS =	-L. -lxalloc $(THREADS)

Modified: experimental/moritz/xalloc/xalloc.c
===================================================================
--- experimental/moritz/xalloc/xalloc.c	2007-08-01 10:33:05 UTC (rev 13422)
+++ experimental/moritz/xalloc/xalloc.c	2007-08-01 21:00:04 UTC (rev 13423)
@@ -84,12 +84,12 @@
 	unsigned int	 freed_in_line;
 };
 RB_HEAD(memory_tree, memory) memory_tree_head = RB_INITIALIZER(&memory_tree_head);
-RB_GENERATE(memory_tree, memory, entry, _memory_cmp)
+RB_PROTOTYPE(memory_tree, memory, entry, _memory_cmp)
 
 void	_memory_free(struct memory **);
+void	_xalloc_warn(const char *, ...);
 #else
 void	xalloc_initialize_debug(unsigned int, FILE *);
-void	_xalloc_warn(const char *, ...);
 #endif /* XALLOC_DEBUG */
 
 void	_xalloc_error(int, const char *, ...);
@@ -112,6 +112,8 @@
 static const char	 *unknown_file = "<unknown>";
 
 #ifdef XALLOC_DEBUG
+RB_GENERATE(memory_tree, memory, entry, _memory_cmp)
+
 int
 _memory_cmp(void *arg_a, void *arg_b)
 {



More information about the commits mailing list