diff options
Diffstat (limited to 'source4/torture/raw')
-rw-r--r-- | source4/torture/raw/chkpath.c | 7 | ||||
-rw-r--r-- | source4/torture/raw/lock.c | 4 | ||||
-rw-r--r-- | source4/torture/raw/notify.c | 3 | ||||
-rw-r--r-- | source4/torture/raw/oplock.c | 6 | ||||
-rw-r--r-- | source4/torture/raw/unlink.c | 6 |
5 files changed, 8 insertions, 18 deletions
diff --git a/source4/torture/raw/chkpath.c b/source4/torture/raw/chkpath.c index d000283685..ed7b5b2917 100644 --- a/source4/torture/raw/chkpath.c +++ b/source4/torture/raw/chkpath.c @@ -122,7 +122,6 @@ static bool test_chkpath(struct smbcli_state *cli, struct torture_context *tctx) NTSTATUS status; bool ret = true; int fnum = -1; - int fnum1 = -1; io.chkpath.in.path = BASEDIR; @@ -186,7 +185,7 @@ static bool test_chkpath(struct smbcli_state *cli, struct torture_context *tctx) /* We expect this open to fail with the same error code as the chkpath below. */ printf("Testing Open on %s\n", "\\.\\\\\\\\\\\\."); /* findfirst seems to fail with a different error. */ - fnum1 = smbcli_nt_create_full(cli->tree, "\\.\\\\\\\\\\\\.", + (void)smbcli_nt_create_full(cli->tree, "\\.\\\\\\\\\\\\.", 0, SEC_RIGHTS_FILE_ALL, FILE_ATTRIBUTE_NORMAL, NTCREATEX_SHARE_ACCESS_DELETE| @@ -227,7 +226,7 @@ static bool test_chkpath(struct smbcli_state *cli, struct torture_context *tctx) /* We expect this open to fail with the same error code as the chkpath below. */ printf("Testing Open on %s\n", BASEDIR".\\.\\.\\.\\foo\\..\\.\\"); /* findfirst seems to fail with a different error. */ - fnum1 = smbcli_nt_create_full(cli->tree, BASEDIR".\\.\\.\\.\\foo\\..\\.\\", + (void)smbcli_nt_create_full(cli->tree, BASEDIR".\\.\\.\\.\\foo\\..\\.\\", 0, SEC_RIGHTS_FILE_ALL, FILE_ATTRIBUTE_NORMAL, NTCREATEX_SHARE_ACCESS_DELETE| @@ -245,7 +244,7 @@ static bool test_chkpath(struct smbcli_state *cli, struct torture_context *tctx) /* We expect this open to fail with the same error code as the chkpath below. */ /* findfirst seems to fail with a different error. */ printf("Testing Open on %s\n", BASEDIR "\\nt\\V S\\VB98\\vb6.exe\\3"); - fnum1 = smbcli_nt_create_full(cli->tree, BASEDIR "\\nt\\V S\\VB98\\vb6.exe\\3", + (void)smbcli_nt_create_full(cli->tree, BASEDIR "\\nt\\V S\\VB98\\vb6.exe\\3", 0, SEC_RIGHTS_FILE_ALL, FILE_ATTRIBUTE_NORMAL, NTCREATEX_SHARE_ACCESS_DELETE| diff --git a/source4/torture/raw/lock.c b/source4/torture/raw/lock.c index 127745e38e..e90b8346aa 100644 --- a/source4/torture/raw/lock.c +++ b/source4/torture/raw/lock.c @@ -2040,7 +2040,6 @@ static bool test_stacking(struct torture_context *tctx, struct smbcli_state *cli int fnum1; const char *fname = BASEDIR "\\stacking.txt"; struct smb_lock_entry lock1; - struct smb_lock_entry lock2; torture_comment(tctx, "Testing stacking:\n"); @@ -2062,9 +2061,6 @@ static bool test_stacking(struct torture_context *tctx, struct smbcli_state *cli lock1.pid = cli->session->pid; lock1.offset = 0; lock1.count = 10; - lock2.pid = cli->session->pid - 1; - lock2.offset = 0; - lock2.count = 10; /** * Try to take a shared lock, then stack an exclusive. diff --git a/source4/torture/raw/notify.c b/source4/torture/raw/notify.c index 6c4ca82668..402974cb66 100644 --- a/source4/torture/raw/notify.c +++ b/source4/torture/raw/notify.c @@ -1482,7 +1482,7 @@ static bool test_notify_tcon(struct smbcli_state *cli, struct torture_context *t NTSTATUS status; union smb_notify notify; union smb_open io; - int fnum, fnum2; + int fnum; struct smbcli_request *req; extern int torture_numops; struct smbcli_tree *tree = NULL; @@ -1511,7 +1511,6 @@ static bool test_notify_tcon(struct smbcli_state *cli, struct torture_context *t status = smb_raw_open(cli->tree, torture, &io); CHECK_STATUS(status, NT_STATUS_OK); - fnum2 = io.ntcreatex.out.file.fnum; /* ask for a change notify, on file or directory name changes */ diff --git a/source4/torture/raw/oplock.c b/source4/torture/raw/oplock.c index 46f2ed3230..d3c7aae025 100644 --- a/source4/torture/raw/oplock.c +++ b/source4/torture/raw/oplock.c @@ -3550,7 +3550,6 @@ static bool test_raw_oplock_brl1(struct torture_context *tctx, /*int fname, f;*/ bool ret = true; uint8_t buf[1000]; - bool correct = true; union smb_open io; NTSTATUS status; uint16_t fnum=0; @@ -3602,7 +3601,6 @@ static bool test_raw_oplock_brl1(struct torture_context *tctx, sizeof(buf)) { torture_comment(tctx, "Failed to create file\n"); - correct = false; goto done; } @@ -3662,7 +3660,6 @@ static bool test_raw_oplock_brl2(struct torture_context *tctx, struct smbcli_sta /*int fname, f;*/ bool ret = true; uint8_t buf[1000]; - bool correct = true; union smb_open io; NTSTATUS status; uint16_t fnum=0; @@ -3715,7 +3712,6 @@ static bool test_raw_oplock_brl2(struct torture_context *tctx, struct smbcli_sta sizeof(buf)) { torture_comment(tctx, "Failed to create file\n"); - correct = false; goto done; } @@ -3868,7 +3864,6 @@ static bool test_raw_oplock_brl4(struct torture_context *tctx, const char *fname = BASEDIR "\\test_batch_brl.dat"; bool ret = true; uint8_t buf[1000]; - bool correct = true; union smb_open io; NTSTATUS status; uint16_t fnum = 0; @@ -3918,7 +3913,6 @@ static bool test_raw_oplock_brl4(struct torture_context *tctx, sizeof(buf)) { torture_comment(tctx, "Failed to create file\n"); - correct = false; goto done; } diff --git a/source4/torture/raw/unlink.c b/source4/torture/raw/unlink.c index 59e127bf15..ee8f7c8ba3 100644 --- a/source4/torture/raw/unlink.c +++ b/source4/torture/raw/unlink.c @@ -462,6 +462,10 @@ static bool oplock_handler_ack_to_none(struct smbcli_transport *transport, sfinfo.disposition_info.in.file.fnum = fnum; sfinfo.disposition_info.in.delete_on_close = 1; req = smb_raw_setfileinfo_send(ud_cli_state->cli1->tree, &sfinfo); + if (!req) { + torture_comment(ud_cli_state->tctx, "smb_raw_setfileinfo_send " + "failed."); + } smbcli_close(ud_cli_state->cli1->tree, fnum); @@ -482,7 +486,6 @@ static bool test_unlink_defer(struct torture_context *tctx, bool ret = true; union smb_open io; union smb_unlink unl; - uint16_t fnum=0; struct unlink_defer_cli_state ud_cli_state = {}; if (!torture_setup_dir(cli1, BASEDIR)) { @@ -519,7 +522,6 @@ static bool test_unlink_defer(struct torture_context *tctx, status = smb_raw_open(cli1->tree, tctx, &io); CHECK_STATUS(status, NT_STATUS_OK); - fnum = io.ntcreatex.out.file.fnum; /* cli2: Try to unlink it, but block on the oplock */ torture_comment(tctx, "Try an unlink (should defer the open\n"); |