diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-09-07 13:31:15 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 15:05:26 -0500 |
commit | 6cf69fee189857ae6f85cd3f81a6a58364839942 (patch) | |
tree | 06d80ff7f9c730a0ae70526f94d88acea800eccd /source4/torture | |
parent | bd5a802a26f427779663a3de5f6d49f352b7c473 (diff) | |
download | samba-6cf69fee189857ae6f85cd3f81a6a58364839942.tar.gz samba-6cf69fee189857ae6f85cd3f81a6a58364839942.tar.bz2 samba-6cf69fee189857ae6f85cd3f81a6a58364839942.zip |
r24994: Fix some C++ warnings.
(This used to be commit 925abf74fa1ed5ae726bae8781ec549302786b39)
Diffstat (limited to 'source4/torture')
-rw-r--r-- | source4/torture/rap/rap.c | 2 | ||||
-rw-r--r-- | source4/torture/raw/qfileinfo.c | 1 | ||||
-rw-r--r-- | source4/torture/raw/setfileinfo.c | 1 | ||||
-rw-r--r-- | source4/torture/smbtorture.c | 4 | ||||
-rw-r--r-- | source4/torture/ui.c | 8 |
5 files changed, 9 insertions, 7 deletions
diff --git a/source4/torture/rap/rap.c b/source4/torture/rap/rap.c index bd05c0f38f..f09e79919c 100644 --- a/source4/torture/rap/rap.c +++ b/source4/torture/rap/rap.c @@ -155,7 +155,7 @@ static NTSTATUS rap_pull_string(TALLOC_CTX *mem_ctx, struct ndr_pull *ndr, if ( string_offset + len + 1 > ndr->data_size ) return NT_STATUS_INVALID_PARAMETER; - *dest = talloc_zero_size(mem_ctx, len+1); + *dest = talloc_zero_array(mem_ctx, char, len+1); pull_string(*dest, p, len+1, len, STR_ASCII); return NT_STATUS_OK; diff --git a/source4/torture/raw/qfileinfo.c b/source4/torture/raw/qfileinfo.c index 95680392b4..af9001c757 100644 --- a/source4/torture/raw/qfileinfo.c +++ b/source4/torture/raw/qfileinfo.c @@ -25,6 +25,7 @@ #include "torture/util.h" #include "librpc/rpc/dcerpc.h" #include "torture/rpc/rpc.h" +#include "torture/raw/proto.h" static struct { const char *name; diff --git a/source4/torture/raw/setfileinfo.c b/source4/torture/raw/setfileinfo.c index b06a04753f..f2d5b0c199 100644 --- a/source4/torture/raw/setfileinfo.c +++ b/source4/torture/raw/setfileinfo.c @@ -23,6 +23,7 @@ #include "libcli/raw/libcliraw.h" #include "libcli/libcli.h" #include "torture/util.h" +#include "torture/raw/proto.h" #define BASEDIR "\\testsfileinfo" diff --git a/source4/torture/smbtorture.c b/source4/torture/smbtorture.c index 8cd449a9b2..babfb42fd8 100644 --- a/source4/torture/smbtorture.c +++ b/source4/torture/smbtorture.c @@ -179,7 +179,7 @@ static void print_test_list(void) } } -static void usage(poptContext pc) +_NORETURN_ static void usage(poptContext pc) { struct torture_suite *o; struct torture_suite *s; @@ -271,7 +271,7 @@ static void usage(poptContext pc) exit(1); } -static void max_runtime_handler(int sig) +_NORETURN_ static void max_runtime_handler(int sig) { DEBUG(0,("maximum runtime exceeded for smbtorture - terminating\n")); exit(1); diff --git a/source4/torture/ui.c b/source4/torture/ui.c index 4c22d950ae..064e3ee764 100644 --- a/source4/torture/ui.c +++ b/source4/torture/ui.c @@ -87,12 +87,12 @@ void torture_tcase_set_fixture(struct torture_tcase *tcase, } static bool wrap_test_with_testcase(struct torture_context *torture_ctx, - struct torture_tcase *tcase, - struct torture_test *test) + struct torture_tcase *tcase, + struct torture_test *test) { bool (*fn) (struct torture_context *, - const void *tcase_data, - const void *test_data); + const void *tcase_data, + const void *test_data); fn = test->fn; |