summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBrad Hards <bradh@frogmouth.net>2011-01-02 12:33:12 +1100
committerStefan Metzmacher <metze@samba.org>2011-01-03 11:12:39 +0100
commit10b1ed670f215d1cd4252374b4040e4cbf58723a (patch)
tree8a428ed5d3b487ee86b17c6c59bceb49990b4190 /lib
parent3e52b99a3167c320f232e3792f6fab280cf992b8 (diff)
downloadsamba-10b1ed670f215d1cd4252374b4040e4cbf58723a.tar.gz
samba-10b1ed670f215d1cd4252374b4040e4cbf58723a.tar.bz2
samba-10b1ed670f215d1cd4252374b4040e4cbf58723a.zip
talloc: Fix warnings in test code
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
Diffstat (limited to 'lib')
-rw-r--r--lib/talloc/talloc_testsuite.h7
-rw-r--r--lib/talloc/testsuite.c5
-rw-r--r--lib/talloc/testsuite_main.c3
3 files changed, 12 insertions, 3 deletions
diff --git a/lib/talloc/talloc_testsuite.h b/lib/talloc/talloc_testsuite.h
new file mode 100644
index 0000000000..acb9701041
--- /dev/null
+++ b/lib/talloc/talloc_testsuite.h
@@ -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
diff --git a/lib/talloc/testsuite.c b/lib/talloc/testsuite.c
index 5e9b3ec8f2..0026931d26 100644
--- a/lib/talloc/testsuite.c
+++ b/lib/talloc/testsuite.c
@@ -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;
diff --git a/lib/talloc/testsuite_main.c b/lib/talloc/testsuite_main.c
index 1b51333278..50ce0f8e3b 100644
--- a/lib/talloc/testsuite_main.c
+++ b/lib/talloc/testsuite_main.c
@@ -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)
{