diff options
author | Stefan Metzmacher <metze@samba.org> | 2006-08-29 09:46:59 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:16:53 -0500 |
commit | 3caba856238d985c31c5e3509336060b3d8fcc86 (patch) | |
tree | 10705c6fe1574c39b49c60e75d58db5ea0fe0ddc | |
parent | 2a1ef3c817336f8ed64e0a78773de9e798810393 (diff) | |
download | samba-3caba856238d985c31c5e3509336060b3d8fcc86.tar.gz samba-3caba856238d985c31c5e3509336060b3d8fcc86.tar.bz2 samba-3caba856238d985c31c5e3509336060b3d8fcc86.zip |
r17905: fix c++ warnings
metze
(This used to be commit 972a84f220f0dabc4e1cc3ffd40a4bf4dedc74d9)
-rw-r--r-- | source4/lib/talloc/testsuite.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/source4/lib/talloc/testsuite.c b/source4/lib/talloc/testsuite.c index 45d73bd1c0..5f7b68776b 100644 --- a/source4/lib/talloc/testsuite.c +++ b/source4/lib/talloc/testsuite.c @@ -435,7 +435,7 @@ static BOOL test_misc(void) talloc_report(root, stdout); - p2 = talloc_zero_size(p1, 20); + p2 = (char *)talloc_zero_size(p1, 20); if (p2[19] != 0) { printf("Failed to give zero memory\n"); return False; @@ -501,8 +501,8 @@ static BOOL test_misc(void) talloc_unlink(NULL, p1); p1 = talloc_named_const(root, 10, "p1"); - p2 = talloc_named_const(root, 20, "p2"); - talloc_reference(p1, p2); + p2 = (char *)talloc_named_const(root, 20, "p2"); + (void)talloc_reference(p1, p2); talloc_report_full(root, stdout); talloc_unlink(root, p2); talloc_report_full(root, stdout); @@ -513,8 +513,8 @@ static BOOL test_misc(void) talloc_unlink(root, p1); p1 = talloc_named_const(root, 10, "p1"); - p2 = talloc_named_const(root, 20, "p2"); - talloc_reference(NULL, p2); + p2 = (char *)talloc_named_const(root, 20, "p2"); + (void)talloc_reference(NULL, p2); talloc_report_full(root, stdout); talloc_unlink(root, p2); talloc_report_full(root, stdout); @@ -851,16 +851,16 @@ static BOOL test_speed(void) static BOOL test_lifeless(void) { - char *top = talloc_new(NULL); + void *top = talloc_new(NULL); char *parent, *child; - char *child_owner = talloc_new(NULL); + void *child_owner = talloc_new(NULL); printf("TESTING TALLOC_UNLINK LOOP\n"); parent = talloc_strdup(top, "parent"); child = talloc_strdup(parent, "child"); - talloc_reference(child, parent); - talloc_reference(child_owner, child); + (void)talloc_reference(child, parent); + (void)talloc_reference(child_owner, child); talloc_report_full(top, stdout); talloc_unlink(top, parent); talloc_free(child); @@ -883,7 +883,7 @@ static int test_loop_destructor(char *ptr) static BOOL test_loop(void) { - char *top = talloc_new(NULL); + void *top = talloc_new(NULL); char *parent; struct req1 { char *req2, *req3; @@ -895,7 +895,7 @@ static BOOL test_loop(void) req1->req2 = talloc_strdup(req1, "req2"); talloc_set_destructor(req1->req2, test_loop_destructor); req1->req3 = talloc_strdup(req1, "req3"); - talloc_reference(req1->req3, req1); + (void)talloc_reference(req1->req3, req1); talloc_report_full(top, stdout); talloc_free(parent); talloc_report_full(top, stdout); @@ -917,7 +917,7 @@ static int fail_destructor_str(char *ptr) static BOOL test_free_parent_deny_child(void) { - char *top = talloc_new(NULL); + void *top = talloc_new(NULL); char *level1; char *level2; char *level3; @@ -941,7 +941,7 @@ static BOOL test_free_parent_deny_child(void) static BOOL test_talloc_ptrtype(void) { BOOL ret = True; - char *top = talloc_new(NULL); + void *top = talloc_new(NULL); struct struct1 { int foo; int bar; |