summaryrefslogtreecommitdiff
path: root/source4/torture/local
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-09-08 16:46:30 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:05:43 -0500
commit98b57d5eb61094a9c88e2f7d90d3e21b7e74e9d8 (patch)
tree044b24a249cc2b63c2f69214d7e7da288c170c74 /source4/torture/local
parentce0ff008b5c5af931526d14fa6232f8647e0880f (diff)
downloadsamba-98b57d5eb61094a9c88e2f7d90d3e21b7e74e9d8.tar.gz
samba-98b57d5eb61094a9c88e2f7d90d3e21b7e74e9d8.tar.bz2
samba-98b57d5eb61094a9c88e2f7d90d3e21b7e74e9d8.zip
r25035: Fix some more warnings, use service pointer rather than service number in more places.
(This used to be commit df9cebcb97e20564359097148665bd519f31bc6f)
Diffstat (limited to 'source4/torture/local')
-rw-r--r--source4/torture/local/dbspeed.c3
-rw-r--r--source4/torture/local/event.c6
-rw-r--r--source4/torture/local/iconv.c10
-rw-r--r--source4/torture/local/irpc.c8
-rw-r--r--source4/torture/local/sddl.c2
-rw-r--r--source4/torture/local/share.c12
6 files changed, 21 insertions, 20 deletions
diff --git a/source4/torture/local/dbspeed.c b/source4/torture/local/dbspeed.c
index 2a9eb49d01..fb4e5c3c3a 100644
--- a/source4/torture/local/dbspeed.c
+++ b/source4/torture/local/dbspeed.c
@@ -29,7 +29,8 @@
float tdb_speed;
-static BOOL tdb_add_record(struct tdb_wrap *tdbw, const char *fmt1, const char *fmt2, int i)
+static bool tdb_add_record(struct tdb_wrap *tdbw, const char *fmt1,
+ const char *fmt2, int i)
{
TDB_DATA key, data;
int ret;
diff --git a/source4/torture/local/event.c b/source4/torture/local/event.c
index e2c7de1c72..46acf5938e 100644
--- a/source4/torture/local/event.c
+++ b/source4/torture/local/event.c
@@ -29,7 +29,7 @@ static int fde_count;
static void fde_handler(struct event_context *ev_ctx, struct fd_event *f,
uint16_t flags, void *private)
{
- int *fd = private;
+ int *fd = (int *)private;
char c;
#ifdef SA_SIGINFO
kill(getpid(), SIGUSR1);
@@ -43,14 +43,14 @@ static void fde_handler(struct event_context *ev_ctx, struct fd_event *f,
static void finished_handler(struct event_context *ev_ctx, struct timed_event *te,
struct timeval tval, void *private)
{
- int *finished = private;
+ int *finished = (int *)private;
(*finished) = 1;
}
static void count_handler(struct event_context *ev_ctx, struct signal_event *te,
int signum, int count, void *info, void *private)
{
- int *countp = private;
+ int *countp = (int *)private;
(*countp) += count;
}
diff --git a/source4/torture/local/iconv.c b/source4/torture/local/iconv.c
index 8c2d5a3054..06659b5e9c 100644
--- a/source4/torture/local/iconv.c
+++ b/source4/torture/local/iconv.c
@@ -34,7 +34,7 @@ static bool iconv_untestable(struct torture_context *tctx)
{
iconv_t cd;
- if (!lp_parm_bool(-1, "iconv", "native", true))
+ if (!lp_parm_bool(NULL, "iconv", "native", true))
torture_skip(tctx, "system iconv disabled - skipping test");
cd = iconv_open("UTF-16LE", "UCS-4LE");
@@ -314,10 +314,10 @@ static bool test_codepoint(struct torture_context *tctx, unsigned int codepoint)
static bool test_next_codepoint(struct torture_context *tctx)
{
+ unsigned int codepoint;
if (iconv_untestable(tctx))
return true;
- unsigned int codepoint;
for (codepoint=0;codepoint<(1<<20);codepoint++) {
if (!test_codepoint(tctx, codepoint))
return false;
@@ -403,13 +403,13 @@ struct torture_suite *torture_local_iconv(TALLOC_CTX *mem_ctx)
struct torture_suite *suite = torture_suite_create(mem_ctx, "ICONV");
torture_suite_add_simple_test(suite, "next_codepoint()",
- test_next_codepoint);
+ test_next_codepoint);
torture_suite_add_simple_test(suite, "first 1M codepoints",
- test_first_1m);
+ test_first_1m);
torture_suite_add_simple_test(suite, "5M random UTF-16LE sequences",
- test_random_5m);
+ test_random_5m);
return suite;
}
diff --git a/source4/torture/local/irpc.c b/source4/torture/local/irpc.c
index 7c5de2dd56..e113b63804 100644
--- a/source4/torture/local/irpc.c
+++ b/source4/torture/local/irpc.c
@@ -86,7 +86,7 @@ static bool test_addone(struct torture_context *test, const void *_data,
{
struct echo_AddOne r;
NTSTATUS status;
- const struct irpc_test_data *data = _data;
+ const struct irpc_test_data *data = (const struct irpc_test_data *)_data;
uint32_t value = (uint32_t)_value;
/* make the call */
@@ -115,7 +115,7 @@ static bool test_echodata(struct torture_context *tctx,
{
struct echo_EchoData r;
NTSTATUS status;
- const struct irpc_test_data *data = tcase_data;
+ const struct irpc_test_data *data = (const struct irpc_test_data *)tcase_data;
TALLOC_CTX *mem_ctx = tctx;
/* make the call */
@@ -144,7 +144,7 @@ static bool test_echodata(struct torture_context *tctx,
static void irpc_callback(struct irpc_request *irpc)
{
- struct echo_AddOne *r = irpc->r;
+ struct echo_AddOne *r = (struct echo_AddOne *)irpc->r;
int *pong_count = (int *)irpc->async.private;
NTSTATUS status = irpc_call_recv(irpc);
if (!NT_STATUS_IS_OK(status)) {
@@ -166,7 +166,7 @@ static bool test_speed(struct torture_context *tctx,
{
int ping_count = 0;
int pong_count = 0;
- const struct irpc_test_data *data = tcase_data;
+ const struct irpc_test_data *data = (const struct irpc_test_data *)tcase_data;
struct timeval tv;
struct echo_AddOne r;
TALLOC_CTX *mem_ctx = tctx;
diff --git a/source4/torture/local/sddl.c b/source4/torture/local/sddl.c
index ac10627783..3e6382309e 100644
--- a/source4/torture/local/sddl.c
+++ b/source4/torture/local/sddl.c
@@ -33,7 +33,7 @@ static bool test_sddl(struct torture_context *tctx,
{
struct security_descriptor *sd, *sd2;
struct dom_sid *domain;
- const char *sddl = test_data;
+ const char *sddl = (const char *)test_data;
const char *sddl2;
TALLOC_CTX *mem_ctx = tctx;
diff --git a/source4/torture/local/share.c b/source4/torture/local/share.c
index 528f34f861..a4250bccf9 100644
--- a/source4/torture/local/share.c
+++ b/source4/torture/local/share.c
@@ -27,7 +27,7 @@ static bool test_list_empty(struct torture_context *tctx,
const void *tcase_data,
const void *test_data)
{
- struct share_context *ctx = discard_const(tcase_data);
+ struct share_context *ctx = (struct share_context *)discard_const(tcase_data);
int count;
const char **names;
@@ -41,7 +41,7 @@ static bool test_create(struct torture_context *tctx,
const void *tcase_data,
const void *test_data)
{
- struct share_context *ctx = discard_const(tcase_data);
+ struct share_context *ctx = (struct share_context *)discard_const(tcase_data);
int count;
const char **names;
int i;
@@ -79,7 +79,7 @@ static bool test_create_invalid(struct torture_context *tctx,
const void *tcase_data,
const void *test_data)
{
- struct share_context *ctx = discard_const(tcase_data);
+ struct share_context *ctx = (struct share_context *)discard_const(tcase_data);
NTSTATUS status;
status = share_create(ctx, "bla", NULL, 0);
@@ -102,7 +102,7 @@ static bool test_share_remove_invalid(struct torture_context *tctx,
const void *tcase_data,
const void *test_data)
{
- struct share_context *ctx = discard_const(tcase_data);
+ struct share_context *ctx = (struct share_context *)discard_const(tcase_data);
NTSTATUS status;
status = share_remove(ctx, "nonexistant");
@@ -121,7 +121,7 @@ static bool test_share_remove(struct torture_context *tctx,
const void *tcase_data,
const void *test_data)
{
- struct share_context *ctx = discard_const(tcase_data);
+ struct share_context *ctx = (struct share_context *)discard_const(tcase_data);
struct share_info inf[] = {
{ SHARE_INFO_STRING, SHARE_TYPE, discard_const_p(void *, "IPC$") },
{ SHARE_INFO_STRING, SHARE_PATH, discard_const_p(void *, "/tmp/bla") }
@@ -144,7 +144,7 @@ static bool test_double_create(struct torture_context *tctx,
const void *tcase_data,
const void *test_data)
{
- struct share_context *ctx = discard_const(tcase_data);
+ struct share_context *ctx = (struct share_context *)discard_const(tcase_data);
struct share_info inf[] = {
{ SHARE_INFO_STRING, SHARE_TYPE, discard_const_p(void *, "IPC$") },
{ SHARE_INFO_STRING, SHARE_PATH, discard_const_p(void *, "/tmp/bla") }