diff options
author | Jeremy Allison <jra@samba.org> | 2011-11-21 13:06:00 -0800 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2011-11-21 23:39:08 +0100 |
commit | 3e6e1aed949a4483fc38607e443b5c8b715aca3b (patch) | |
tree | 631d089cbae788cd8c68442774bdc6720dbc07ab /source4/torture/basic/disconnect.c | |
parent | aa2e415442fe121a3db5fa79e53ad732d78e9572 (diff) | |
download | samba-3e6e1aed949a4483fc38607e443b5c8b715aca3b.tar.gz samba-3e6e1aed949a4483fc38607e443b5c8b715aca3b.tar.bz2 samba-3e6e1aed949a4483fc38607e443b5c8b715aca3b.zip |
Fix a bunch of "warning: variable ‘XXXX’ set but not used [-Wunused-but-set-variable]" warnings from the new gcc.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Mon Nov 21 23:39:08 CET 2011 on sn-devel-104
Diffstat (limited to 'source4/torture/basic/disconnect.c')
-rw-r--r-- | source4/torture/basic/disconnect.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/source4/torture/basic/disconnect.c b/source4/torture/basic/disconnect.c index 71471c7f0a..17fbc61d2f 100644 --- a/source4/torture/basic/disconnect.c +++ b/source4/torture/basic/disconnect.c @@ -43,8 +43,8 @@ static bool test_disconnect_open(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) { union smb_open io; - NTSTATUS status; struct smbcli_request *req1, *req2; + NTSTATUS status; printf("trying open/disconnect\n"); @@ -66,6 +66,11 @@ static bool test_disconnect_open(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) io.ntcreatex.in.share_access = 0; req1 = smb_raw_open_send(cli->tree, &io); req2 = smb_raw_open_send(cli->tree, &io); + if (!req1 || !req2) { + printf("test_disconnect_open: smb_raw_open_send() " + "returned NULL\n"); + return false; + } status = smbcli_chkpath(cli->tree, "\\"); CHECK_STATUS(status, NT_STATUS_OK); @@ -113,6 +118,11 @@ static bool test_disconnect_lock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) lock[0].pid = 2; io.lockx.in.timeout = 3000; req = smb_raw_lock_send(cli->tree, &io); + if (!req) { + printf("test_disconnect_lock: smb_raw_lock_send() " + "returned NULL\n"); + return false; + } status = smbcli_chkpath(cli->tree, "\\"); CHECK_STATUS(status, NT_STATUS_OK); |