talloc: Fix warnings in test code
authorBrad Hards <bradh@frogmouth.net>
Sun, 2 Jan 2011 01:33:12 +0000 (12:33 +1100)
committerStefan Metzmacher <metze@samba.org>
Mon, 3 Jan 2011 10:12:39 +0000 (11:12 +0100)
This should not change any behaviour - the intent is just to reduce
the "nuisance" warnings.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Jan  3 11:12:39 CET 2011 on sn-devel-104

lib/talloc/talloc_testsuite.h [new file with mode: 0644]
lib/talloc/testsuite.c
lib/talloc/testsuite_main.c

diff --git a/lib/talloc/talloc_testsuite.h b/lib/talloc/talloc_testsuite.h
new file mode 100644 (file)
index 0000000..acb9701
--- /dev/null
@@ -0,0 +1,7 @@
+#ifndef __LIB_TALLOC_TALLOC_TESTSUITE_H__
+#define __LIB_TALLOC_TALLOC_TESTSUITE_H__
+
+struct torture_context;
+bool torture_local_talloc(struct torture_context *tctx);
+
+#endif
index 5e9b3ec8f23d3c5b6f448b2dd8ed2e7590f8171b..0026931d260cb4756ef413e3c0766a5b3fbf2fed 100644 (file)
@@ -27,6 +27,8 @@
 #include "system/time.h"
 #include <talloc.h>
 
+#include "talloc_testsuite.h"
+
 static struct timeval timeval_current(void)
 {
        struct timeval tv;
@@ -101,6 +103,7 @@ static double timeval_elapsed(struct timeval *tv)
 
 static unsigned int test_abort_count;
 
+#if 0
 static void test_abort_fn(const char *reason)
 {
        printf("# test_abort_fn(%s)\n", reason);
@@ -112,6 +115,7 @@ static void test_abort_start(void)
        test_abort_count = 0;
        talloc_set_abort_fn(test_abort_fn);
 }
+#endif
 
 static void test_abort_stop(void)
 {
@@ -1171,7 +1175,6 @@ static void test_reset(void)
        talloc_enable_null_tracking_no_autofree();
 }
 
-struct torture_context;
 bool torture_local_talloc(struct torture_context *tctx)
 {
        bool ret = true;
index 1b51333278783d8f2caa2c20ed623478c243e036..50ce0f8e3b4fed185fb1d5acf1780e021de2e2ca 100644 (file)
@@ -25,8 +25,7 @@
 
 #include "replace.h"
 
-struct torture_context;
-bool torture_local_talloc(struct torture_context *tctx);
+#include "talloc_testsuite.h"
 
 int main(void)
 {