summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-12-02 04:51:56 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:06:16 -0500
commit4183b2ac3832cdc2055d7eb3ed7121a9ea91085c (patch)
tree880492048be3a307eb82ebc663b4a7d3805dd337 /source4/torture
parent3b863542dca8e638cdba6daad043f224d81fcd6a (diff)
downloadsamba-4183b2ac3832cdc2055d7eb3ed7121a9ea91085c.tar.gz
samba-4183b2ac3832cdc2055d7eb3ed7121a9ea91085c.tar.bz2
samba-4183b2ac3832cdc2055d7eb3ed7121a9ea91085c.zip
r4037: fixed a bunch of "might be uninitialised" warnings after enabling -O1 in my compile
(This used to be commit 0928b1f5b68c858922c3ea6c27ed03b5091c6221)
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/basic/denytest.c2
-rw-r--r--source4/torture/basic/locking.c2
-rw-r--r--source4/torture/dcom/simple.c2
-rw-r--r--source4/torture/raw/acls.c8
-rw-r--r--source4/torture/raw/eas.c2
-rw-r--r--source4/torture/raw/rename.c2
-rw-r--r--source4/torture/raw/streams.c2
-rw-r--r--source4/torture/rpc/samlogon.c6
-rw-r--r--source4/torture/rpc/xplogin.c2
9 files changed, 13 insertions, 15 deletions
diff --git a/source4/torture/basic/denytest.c b/source4/torture/basic/denytest.c
index 70d7a2b2a1..7979778c3f 100644
--- a/source4/torture/basic/denytest.c
+++ b/source4/torture/basic/denytest.c
@@ -1968,7 +1968,7 @@ BOOL torture_denydos_sharing(void)
union smb_fileinfo finfo;
const char *fname = "\\torture_denydos.txt";
NTSTATUS status;
- int fnum1, fnum2;
+ int fnum1 = -1, fnum2 = -1;
BOOL ret = True;
union smb_setfileinfo sfinfo;
TALLOC_CTX *mem_ctx;
diff --git a/source4/torture/basic/locking.c b/source4/torture/basic/locking.c
index c1dd598018..ba7d568706 100644
--- a/source4/torture/basic/locking.c
+++ b/source4/torture/basic/locking.c
@@ -790,7 +790,7 @@ BOOL torture_locktest7(void)
struct smbcli_state *cli1;
const char *fname = "\\lockt7.lck";
int fnum1;
- int fnum2;
+ int fnum2 = -1;
size_t size;
char buf[200];
BOOL correct = False;
diff --git a/source4/torture/dcom/simple.c b/source4/torture/dcom/simple.c
index 68bf9be813..9dd750baad 100644
--- a/source4/torture/dcom/simple.c
+++ b/source4/torture/dcom/simple.c
@@ -29,7 +29,7 @@
BOOL torture_dcom_simple(void)
{
NTSTATUS status;
- struct dcerpc_pipe *p;
+ struct dcerpc_pipe *p = NULL;
TALLOC_CTX *mem_ctx;
BOOL ret = True;
struct GUID IID[2];
diff --git a/source4/torture/raw/acls.c b/source4/torture/raw/acls.c
index 84d2238a9e..24f18e6cce 100644
--- a/source4/torture/raw/acls.c
+++ b/source4/torture/raw/acls.c
@@ -41,7 +41,7 @@ static BOOL test_sd(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
union smb_open io;
const char *fname = BASEDIR "\\sd.txt";
BOOL ret = True;
- int fnum;
+ int fnum = -1;
union smb_fileinfo q;
union smb_setfileinfo set;
struct security_ace ace;
@@ -249,7 +249,7 @@ static BOOL test_creator_sid(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
union smb_open io;
const char *fname = BASEDIR "\\creator.txt";
BOOL ret = True;
- int fnum;
+ int fnum = -1;
union smb_fileinfo q;
union smb_setfileinfo set;
struct security_descriptor *sd, *sd_orig, *sd2;
@@ -323,7 +323,7 @@ static BOOL test_creator_sid(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
printf("set a sec desc allowing no write by owner\n");
sd = security_descriptor_create(mem_ctx,
- NULL, NULL,
+ owner_sid, NULL,
owner_sid,
SEC_ACE_TYPE_ACCESS_ALLOWED,
SEC_RIGHTS_FILE_READ | SEC_STD_ALL,
@@ -440,7 +440,7 @@ static BOOL test_generic_bits(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
union smb_open io;
const char *fname = BASEDIR "\\generic.txt";
BOOL ret = True;
- int fnum, i;
+ int fnum = -1, i;
union smb_fileinfo q;
union smb_setfileinfo set;
struct security_descriptor *sd, *sd_orig, *sd2;
diff --git a/source4/torture/raw/eas.c b/source4/torture/raw/eas.c
index 13ebea2401..044fe9ebb4 100644
--- a/source4/torture/raw/eas.c
+++ b/source4/torture/raw/eas.c
@@ -99,7 +99,7 @@ static BOOL test_eas(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
union smb_open io;
const char *fname = BASEDIR "\\ea.txt";
BOOL ret = True;
- int fnum;
+ int fnum = -1;
printf("TESTING SETFILEINFO EA_SET\n");
diff --git a/source4/torture/raw/rename.c b/source4/torture/raw/rename.c
index 6b16612698..c839100e7c 100644
--- a/source4/torture/raw/rename.c
+++ b/source4/torture/raw/rename.c
@@ -46,7 +46,7 @@ static BOOL test_mv(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
union smb_rename io;
NTSTATUS status;
BOOL ret = True;
- int fnum;
+ int fnum = -1;
const char *fname1 = BASEDIR "\\test1.txt";
const char *fname2 = BASEDIR "\\test2.txt";
union smb_open op;
diff --git a/source4/torture/raw/streams.c b/source4/torture/raw/streams.c
index 83ba08ee0a..7053f6c998 100644
--- a/source4/torture/raw/streams.c
+++ b/source4/torture/raw/streams.c
@@ -99,7 +99,7 @@ static BOOL test_stream_io(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
const char *fname = BASEDIR "\\stream.txt";
const char *sname1, *sname2;
BOOL ret = True;
- int fnum;
+ int fnum = -1;
ssize_t retsize;
sname1 = talloc_asprintf(mem_ctx, "%s:%s", fname, "Stream One");
diff --git a/source4/torture/rpc/samlogon.c b/source4/torture/rpc/samlogon.c
index e7c04b6ad1..821a823595 100644
--- a/source4/torture/rpc/samlogon.c
+++ b/source4/torture/rpc/samlogon.c
@@ -72,10 +72,8 @@ static NTSTATUS check_samlogon(struct samlogon_state *samlogon_state,
struct netr_LogonSamLogonEx *r_ex = &samlogon_state->r_ex;
struct netr_LogonSamLogonWithFlags *r_flags = &samlogon_state->r_flags;
struct netr_NetworkInfo ninfo;
-
- struct netr_SamBaseInfo *base;
-
- uint16 validation_level;
+ struct netr_SamBaseInfo *base = NULL;
+ uint16 validation_level = 0;
samlogon_state->r.in.logon.network = &ninfo;
samlogon_state->r_ex.in.logon.network = &ninfo;
diff --git a/source4/torture/rpc/xplogin.c b/source4/torture/rpc/xplogin.c
index 8b7ccf115d..0007955e08 100644
--- a/source4/torture/rpc/xplogin.c
+++ b/source4/torture/rpc/xplogin.c
@@ -775,7 +775,7 @@ static NTSTATUS test_getallsids(struct smbcli_transport *transport,
struct samr_Connect4 r4;
struct policy_handle connect_handle, user_handle;
struct policy_handle builtin_handle, domain_handle;
- struct dom_sid *domain_sid;
+ struct dom_sid *domain_sid = NULL;
struct dom_sid *user_sid;
struct dom_sid *primary_group_sid;