summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-01-18 16:20:33 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:51:16 -0500
commita920f2f9a8e4ee076471c293765ed0bee13d4cc5 (patch)
treec242596cb0ea760978a563276d976d8d77d0dd6d /source4/torture
parent5bd9b3b808393c8ad59f17d8d13a45b2be6ae0a6 (diff)
downloadsamba-a920f2f9a8e4ee076471c293765ed0bee13d4cc5.tar.gz
samba-a920f2f9a8e4ee076471c293765ed0bee13d4cc5.tar.bz2
samba-a920f2f9a8e4ee076471c293765ed0bee13d4cc5.zip
r13004: fix compiler warnings
metze (This used to be commit 833efdf8a943b210ba8e5b219dc754260001bedb)
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/basic/mangle_test.c4
-rw-r--r--source4/torture/raw/composite.c4
-rw-r--r--source4/torture/raw/open.c2
-rw-r--r--source4/torture/raw/oplock.c8
-rw-r--r--source4/torture/raw/search.c4
-rw-r--r--source4/torture/rpc/lsa.c8
6 files changed, 15 insertions, 15 deletions
diff --git a/source4/torture/basic/mangle_test.c b/source4/torture/basic/mangle_test.c
index 8317a4ee18..36b7481316 100644
--- a/source4/torture/basic/mangle_test.c
+++ b/source4/torture/basic/mangle_test.c
@@ -90,7 +90,7 @@ static BOOL test_one(struct smbcli_state *cli, const char *name)
data = tdb_fetch_bystring(tdb, shortname);
if (data.dptr) {
/* maybe its a duplicate long name? */
- if (strcasecmp(name, data.dptr) != 0) {
+ if (strcasecmp(name, (const char *)data.dptr) != 0) {
/* we have a collision */
collisions++;
printf("Collision between %s and %s -> %s "
@@ -101,7 +101,7 @@ static BOOL test_one(struct smbcli_state *cli, const char *name)
} else {
TDB_DATA namedata;
/* store it for later */
- namedata.dptr = discard_const_p(char, name);
+ namedata.dptr = discard_const_p(uint8_t, name);
namedata.dsize = strlen(name)+1;
tdb_store_bystring(tdb, shortname, namedata, TDB_REPLACE);
}
diff --git a/source4/torture/raw/composite.c b/source4/torture/raw/composite.c
index 760d464fb5..6025c3d1e4 100644
--- a/source4/torture/raw/composite.c
+++ b/source4/torture/raw/composite.c
@@ -48,7 +48,7 @@ static BOOL test_loadfile(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
struct smb_composite_savefile io1;
struct smb_composite_loadfile io2;
struct composite_context **c;
- char *data;
+ uint8_t *data;
size_t len = random() % 100000;
const int num_ops = 50;
int i;
@@ -124,7 +124,7 @@ static BOOL test_fetchfile(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
struct smb_composite_savefile io1;
struct smb_composite_fetchfile io2;
struct composite_context **c;
- char *data;
+ uint8_t *data;
int i;
size_t len = random() % 10000;
extern int torture_numops;
diff --git a/source4/torture/raw/open.c b/source4/torture/raw/open.c
index 2afad96956..1346a075f2 100644
--- a/source4/torture/raw/open.c
+++ b/source4/torture/raw/open.c
@@ -1247,7 +1247,7 @@ static BOOL test_chained(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.openxreadx.in.mincnt = sizeof(buf);
io.openxreadx.in.maxcnt = sizeof(buf);
io.openxreadx.in.remaining = 0;
- io.openxreadx.out.data = buf2;
+ io.openxreadx.out.data = (uint8_t *)buf2;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
diff --git a/source4/torture/raw/oplock.c b/source4/torture/raw/oplock.c
index 64da410bd2..6fa4c514b3 100644
--- a/source4/torture/raw/oplock.c
+++ b/source4/torture/raw/oplock.c
@@ -366,7 +366,7 @@ static BOOL test_oplock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
wr.write.in.count = 1;
wr.write.in.offset = 0;
wr.write.in.remaining = 0;
- wr.write.in.data = "x";
+ wr.write.in.data = (const uint8_t *)"x";
status = smb_raw_write(cli->tree, &wr);
CHECK_STATUS(status, NT_STATUS_OK);
}
@@ -383,7 +383,7 @@ static BOOL test_oplock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
wr.write.in.count = 1;
wr.write.in.offset = 0;
wr.write.in.remaining = 0;
- wr.write.in.data = "x";
+ wr.write.in.data = (const uint8_t *)"x";
status = smb_raw_write(cli->tree, &wr);
CHECK_STATUS(status, NT_STATUS_OK);
}
@@ -437,7 +437,7 @@ static BOOL test_oplock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
wr.write.in.count = 1;
wr.write.in.offset = 0;
wr.write.in.remaining = 0;
- wr.write.in.data = "x";
+ wr.write.in.data = (const uint8_t *)"x";
status = smb_raw_write(cli->tree, &wr);
CHECK_STATUS(status, NT_STATUS_OK);
}
@@ -454,7 +454,7 @@ static BOOL test_oplock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
wr.write.in.count = 1;
wr.write.in.offset = 0;
wr.write.in.remaining = 0;
- wr.write.in.data = "x";
+ wr.write.in.data = (const uint8_t *)"x";
status = smb_raw_write(cli->tree, &wr);
CHECK_STATUS(status, NT_STATUS_OK);
}
diff --git a/source4/torture/raw/search.c b/source4/torture/raw/search.c
index 5cb67b068e..1d98c7cb5c 100644
--- a/source4/torture/raw/search.c
+++ b/source4/torture/raw/search.c
@@ -1286,14 +1286,14 @@ static BOOL test_ea_list(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
CHECK_STRING(result.list[1].ea_list.name.s, "file2.txt");
CHECK_STRING(result.list[1].ea_list.eas.eas[0].name.s, "SECOND EA");
CHECK_VALUE(result.list[1].ea_list.eas.eas[0].value.length, 9);
- CHECK_STRING(result.list[1].ea_list.eas.eas[0].value.data, "Value Two");
+ CHECK_STRING((const char *)result.list[1].ea_list.eas.eas[0].value.data, "Value Two");
CHECK_STRING(result.list[1].ea_list.eas.eas[1].name.s, "THIRD EA");
CHECK_VALUE(result.list[1].ea_list.eas.eas[1].value.length, 0);
CHECK_STRING(result.list[2].ea_list.name.s, "file3.txt");
CHECK_STRING(result.list[2].ea_list.eas.eas[0].name.s, "SECOND EA");
CHECK_VALUE(result.list[2].ea_list.eas.eas[0].value.length, 9);
- CHECK_STRING(result.list[2].ea_list.eas.eas[0].value.data, "Value Two");
+ CHECK_STRING((const char *)result.list[2].ea_list.eas.eas[0].value.data, "Value Two");
CHECK_STRING(result.list[2].ea_list.eas.eas[1].name.s, "THIRD EA");
CHECK_VALUE(result.list[2].ea_list.eas.eas[1].value.length, 0);
diff --git a/source4/torture/rpc/lsa.c b/source4/torture/rpc/lsa.c
index 3238e31c01..5d7ddc6c80 100644
--- a/source4/torture/rpc/lsa.c
+++ b/source4/torture/rpc/lsa.c
@@ -1401,9 +1401,9 @@ static BOOL test_EnumPrivs(struct dcerpc_pipe *p,
}
for (i = 0; i< privs1.count; i++) {
- test_LookupPrivDisplayName(p, mem_ctx, handle, &privs1.privs[i].name);
- test_LookupPrivValue(p, mem_ctx, handle, &privs1.privs[i].name);
- if (!test_EnumAccountsWithUserRight(p, mem_ctx, handle, &privs1.privs[i].name)) {
+ test_LookupPrivDisplayName(p, mem_ctx, handle, (struct lsa_String *)&privs1.privs[i].name);
+ test_LookupPrivValue(p, mem_ctx, handle, (struct lsa_String *)&privs1.privs[i].name);
+ if (!test_EnumAccountsWithUserRight(p, mem_ctx, handle, (struct lsa_String *)&privs1.privs[i].name)) {
ret = False;
}
}
@@ -1606,7 +1606,7 @@ static BOOL test_CreateTrustedDomain(struct dcerpc_pipe *p,
domsid[i] = dom_sid_parse_talloc(mem_ctx, trust_sid);
trustinfo.sid = domsid[i];
- init_lsa_String(&trustinfo.name, trust_name);
+ init_lsa_String((struct lsa_String *)&trustinfo.name, trust_name);
r.in.handle = handle;
r.in.info = &trustinfo;