[SCM] Samba Shared Repository - branch master updated

Matthias Dieter Wallnöfer mdw at samba.org
Sat Nov 21 09:37:51 MST 2009


The branch, master has been updated
       via  e406c17... s4:torture/smb2/oplock - Remove unneeded "status" redeclarations
       via  ec49360... s4:torture/smb2/notify - Rename nested "fname" variable to prevent warnings
       via  5dc478e... s4:torture/raw/unlink - Remove unused variable and label
       via  2842311... s4:torture/rpc/netlogon - Fix uninitialised variable
      from  37e4e38... s3: Convert cli_get_fs_attr_info to the async API

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit e406c17b2fce57fff112354df5f5bd1a4655b3d6
Author: Matthias Dieter Wallnöfer <mwallnoefer at yahoo.de>
Date:   Sat Nov 21 17:33:04 2009 +0100

    s4:torture/smb2/oplock - Remove unneeded "status" redeclarations

commit ec4936077878e7bcbf1addfdc69a9f737e9c98f3
Author: Matthias Dieter Wallnöfer <mwallnoefer at yahoo.de>
Date:   Sat Nov 21 17:32:07 2009 +0100

    s4:torture/smb2/notify - Rename nested "fname" variable to prevent warnings

commit 5dc478e390ce18c6e40ec398977854f8a7d0d13d
Author: Matthias Dieter Wallnöfer <mwallnoefer at yahoo.de>
Date:   Sat Nov 21 17:23:31 2009 +0100

    s4:torture/raw/unlink - Remove unused variable and label

commit 28423114ecd418d312049aa11072baddad296001
Author: Matthias Dieter Wallnöfer <mwallnoefer at yahoo.de>
Date:   Sat Nov 21 17:22:07 2009 +0100

    s4:torture/rpc/netlogon - Fix uninitialised variable

-----------------------------------------------------------------------

Summary of changes:
 source4/torture/raw/unlink.c   |    3 +--
 source4/torture/rpc/netlogon.c |    3 +--
 source4/torture/smb2/notify.c  |   12 ++++++------
 source4/torture/smb2/oplock.c  |    5 -----
 4 files changed, 8 insertions(+), 15 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/torture/raw/unlink.c b/source4/torture/raw/unlink.c
index 968a4a8..9da036e 100644
--- a/source4/torture/raw/unlink.c
+++ b/source4/torture/raw/unlink.c
@@ -450,7 +450,6 @@ static bool oplock_handler_ack_to_none(struct smbcli_transport *transport,
 	struct unlink_defer_cli_state *ud_cli_state =
 	    (struct unlink_defer_cli_state *)private_data;
 	union smb_setfileinfo sfinfo;
-	NTSTATUS status;
 	bool ret;
 	struct smbcli_request *req = NULL;
 
@@ -469,7 +468,7 @@ static bool oplock_handler_ack_to_none(struct smbcli_transport *transport,
 
 	ret = smbcli_oplock_ack(ud_cli_state->cli1->tree, fnum,
 				 OPLOCK_BREAK_TO_NONE);
- done:
+
 	return ret;
 }
 
diff --git a/source4/torture/rpc/netlogon.c b/source4/torture/rpc/netlogon.c
index 8972834..2806cca 100644
--- a/source4/torture/rpc/netlogon.c
+++ b/source4/torture/rpc/netlogon.c
@@ -1354,8 +1354,7 @@ static bool test_DatabaseRedo(struct torture_context *tctx,
 	r.out.delta_enum_array = &delta_enum_array;
 
 	for (d=0; d<3; d++) {
-
-		const char *database;
+		const char *database = NULL;
 
 		switch (d) {
 		case 0:
diff --git a/source4/torture/smb2/notify.c b/source4/torture/smb2/notify.c
index 60a6468..d1fe598 100644
--- a/source4/torture/smb2/notify.c
+++ b/source4/torture/smb2/notify.c
@@ -327,7 +327,7 @@ static bool torture_smb2_notify_dir(struct torture_context *torture,
 		"testing buffered notify on create of %d files\n", count);
 	for (i=0;i<count;i++) {
 		struct smb2_handle h12;
-		char *fname = talloc_asprintf(torture, BASEDIR "\\test%d.txt",
+		char *fname2 = talloc_asprintf(torture, BASEDIR "\\test%d.txt",
 					      i);
 
 		ZERO_STRUCT(io.smb2);
@@ -343,7 +343,7 @@ static bool torture_smb2_notify_dir(struct torture_context *torture,
 	        io.smb2.in.create_disposition = NTCREATEX_DISP_CREATE;
 		io.smb2.in.impersonation_level = SMB2_IMPERSONATION_ANONYMOUS;
 	        io.smb2.in.security_flags = 0;
-		io.smb2.in.fname = fname;
+		io.smb2.in.fname = fname2;
 
 		status = smb2_create(tree1, torture, &(io.smb2));
 		if (!NT_STATUS_EQUAL(status, NT_STATUS_OK)) {
@@ -353,7 +353,7 @@ static bool torture_smb2_notify_dir(struct torture_context *torture,
 			goto done;
 		}
 		h12 = io.smb2.out.file.handle;
-		talloc_free(fname);
+		talloc_free(fname2);
 		smb2_util_close(tree1, h12);
 	}
 
@@ -404,11 +404,11 @@ static bool torture_smb2_notify_dir(struct torture_context *torture,
 	CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_NOT_FOUND);
 
 	for (i=1;i<count;i++) {
-		char *fname = talloc_asprintf(torture,
+		char *fname2 = talloc_asprintf(torture,
 			      BASEDIR "\\test%d.txt", i);
-		status = smb2_util_unlink(tree2, fname);
+		status = smb2_util_unlink(tree2, fname2);
 		CHECK_STATUS(status, NT_STATUS_OK);
-		talloc_free(fname);
+		talloc_free(fname2);
 	}
 
 	/* receive the 3rd notify */
diff --git a/source4/torture/smb2/oplock.c b/source4/torture/smb2/oplock.c
index f686de6..12f16cb 100644
--- a/source4/torture/smb2/oplock.c
+++ b/source4/torture/smb2/oplock.c
@@ -168,8 +168,6 @@ static bool torture_oplock_handler_level2_to_none(
 					       uint8_t level,
 					       void *private_data)
 {
-	struct smb2_tree *tree = private_data;
-
 	break_info.handle = *handle;
 	break_info.level = level;
 	break_info.count++;
@@ -3467,8 +3465,6 @@ bool test_smb2_bench_oplock(struct torture_context *tctx,
 	torture_comment(tctx, "Running for %d seconds\n", timelimit);
 	while (timeval_elapsed(&tv) < timelimit) {
 		for (i=0;i<torture_nprocs;i++) {
-			NTSTATUS status;
-
 			status = smb2_create(trees[i], mem_ctx, &(io.smb2));
 			torture_assert_ntstatus_ok(tctx, status, "Incorrect status");
 			count++;
@@ -3565,7 +3561,6 @@ bool test_smb2_hold_oplock(struct torture_context *tctx,
 	/* setup the files */
 	for (i=0;i<ARRAY_SIZE(hold_info);i++) {
 		union smb_open io;
-		NTSTATUS status;
 		char c = 1;
 
 		ZERO_STRUCT(io.smb2);


-- 
Samba Shared Repository


More information about the samba-cvs mailing list