summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2006-04-30 13:54:03 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:05:25 -0500
commitcf0f4ec073b694e43daeeddf9aab51cd3e51fd2b (patch)
treeca60b67aac5c2f5eaf6373ad7aaf7aee38079e18 /source4/torture
parentab758f383dfd03f3c51f647829f14ecca6a9807c (diff)
downloadsamba-cf0f4ec073b694e43daeeddf9aab51cd3e51fd2b.tar.gz
samba-cf0f4ec073b694e43daeeddf9aab51cd3e51fd2b.tar.bz2
samba-cf0f4ec073b694e43daeeddf9aab51cd3e51fd2b.zip
r15358: Fix some compiler warnings / type safety. Found by tcc
(This used to be commit 12ba42de5886f9f4f9b1698476557e0c217d06f3)
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/com/simple.c6
-rw-r--r--source4/torture/rpc/winreg.c11
2 files changed, 9 insertions, 8 deletions
diff --git a/source4/torture/com/simple.c b/source4/torture/com/simple.c
index bb67ca7bba..82aab476be 100644
--- a/source4/torture/com/simple.c
+++ b/source4/torture/com/simple.c
@@ -38,7 +38,7 @@ static BOOL test_readwrite(TALLOC_CTX *mem_ctx, const char *host)
struct IUnknown *interfaces[3];
WERROR results[2];
struct com_context *ctx;
- char test_data[5];
+ uint8_t test_data[5];
int i;
com_init();
@@ -53,7 +53,7 @@ static BOOL test_readwrite(TALLOC_CTX *mem_ctx, const char *host)
if (host) {
error = dcom_create_object(ctx, &clsid,
host, 2, IID,
- &interfaces,
+ (struct IUnknown ***)&interfaces,
results);
} else {
error = com_create_object(ctx, &clsid, 2, IID, interfaces, results);
@@ -74,7 +74,7 @@ static BOOL test_readwrite(TALLOC_CTX *mem_ctx, const char *host)
test_data[i] = i+1;
}
- error = IStream_Write((struct IStream *)interfaces[0], mem_ctx, &test_data, 5, NULL);
+ error = IStream_Write((struct IStream *)interfaces[0], mem_ctx, test_data, 5, NULL);
if (!W_ERROR_IS_OK(error)) {
printf("IStream::Write() failed - %s\n", win_errstr(error));
ret = False;
diff --git a/source4/torture/rpc/winreg.c b/source4/torture/rpc/winreg.c
index 5a05e669a2..a03da8002a 100644
--- a/source4/torture/rpc/winreg.c
+++ b/source4/torture/rpc/winreg.c
@@ -111,7 +111,7 @@ static BOOL test_CreateKey(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
struct winreg_CreateKey r;
struct policy_handle newhandle;
NTSTATUS status;
- uint32_t action_taken = 0;
+ enum winreg_CreateAction action_taken = 0;
printf("\ntesting CreateKey\n");
@@ -149,7 +149,7 @@ static BOOL test_CreateKey_sd(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
{
struct winreg_CreateKey r;
NTSTATUS status;
- uint32_t action_taken = 0;
+ enum winreg_CreateAction action_taken = 0;
struct security_descriptor *sd;
DATA_BLOB sdblob;
struct winreg_SecBuf secbuf;
@@ -500,15 +500,16 @@ static BOOL test_QueryValue(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct p
{
struct winreg_QueryValue r;
NTSTATUS status;
- uint32_t zero = 0;
+ enum winreg_Type zero_type = 0;
uint32_t offered = 0xfff;
+ uint32_t zero = 0;
printf("Testing QueryValue\n");
r.in.handle = handle;
r.in.data = NULL;
r.in.value_name.name = valuename;
- r.in.type = &zero;
+ r.in.type = &zero_type;
r.in.size = &offered;
r.in.length = &zero;
@@ -530,7 +531,7 @@ static BOOL test_EnumValue(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
struct policy_handle *handle, int max_valnamelen, int max_valbufsize)
{
struct winreg_EnumValue r;
- uint32_t type = 0;
+ enum winreg_Type type = 0;
uint32_t size = max_valbufsize, zero = 0;
BOOL ret = True;
uint8_t buf8;