summaryrefslogtreecommitdiff
path: root/source4/torture/raw
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2015-03-18 22:52:32 +0100
committerJeremy Allison <jra@samba.org>2015-03-20 20:43:13 +0100
commit116e3ef23c8ebefe60556a9e5a91388e9a9862d9 (patch)
treec04f165dbfce75428de8f4c25b286ccd4a345908 /source4/torture/raw
parentc1c4dbe75986eb34739c169d9f3a7a74577afec9 (diff)
downloadsamba-116e3ef23c8ebefe60556a9e5a91388e9a9862d9.tar.gz
s4:torture/raw: avoid compiler warnings
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source4/torture/raw')
-rw-r--r--source4/torture/raw/samba3misc.c2
-rw-r--r--source4/torture/raw/search.c11
-rw-r--r--source4/torture/raw/streams.c9
3 files changed, 8 insertions, 14 deletions
diff --git a/source4/torture/raw/samba3misc.c b/source4/torture/raw/samba3misc.c
index a818c6bb484..95a82295d20 100644
--- a/source4/torture/raw/samba3misc.c
+++ b/source4/torture/raw/samba3misc.c
@@ -981,7 +981,6 @@ bool torture_samba3_rootdirfid(struct torture_context *tctx, struct smbcli_state
bool torture_samba3_oplock_logoff(struct torture_context *tctx, struct smbcli_state *cli)
{
- uint16_t fnum1;
union smb_open io;
const char *fname = "testfile";
bool ret = false;
@@ -1007,7 +1006,6 @@ bool torture_samba3_oplock_logoff(struct torture_context *tctx, struct smbcli_st
torture_assert_ntstatus_equal_goto(tctx, smb_raw_open(cli->tree, tctx, &io),
NT_STATUS_OK,
ret, done, "first smb_open on the file failed");
- fnum1 = io.ntcreatex.out.file.fnum;
/*
* Create a conflicting open, causing the one-second delay
diff --git a/source4/torture/raw/search.c b/source4/torture/raw/search.c
index 0736c41d0cc..924c7f2bf6b 100644
--- a/source4/torture/raw/search.c
+++ b/source4/torture/raw/search.c
@@ -35,14 +35,17 @@
NT_STATUS_NOT_SUPPORTED) || \
NT_STATUS_EQUAL(__status, \
NT_STATUS_NOT_IMPLEMENTED)) { \
- torture_warning(__tctx, "(%s) Info " \
- "level "#__level" is %s", \
- __location__, nt_errstr(__status)); \
__supp = false; \
} else { \
+ __supp = true; \
+ } \
+ if (__supp) { \
torture_assert_ntstatus_ok_goto(__tctx, \
__status, ret, done, #__level" failed"); \
- __supp = true; \
+ } else { \
+ torture_warning(__tctx, "(%s) Info " \
+ "level "#__level" is %s", \
+ __location__, nt_errstr(__status)); \
} \
} while (0)
diff --git a/source4/torture/raw/streams.c b/source4/torture/raw/streams.c
index c1e502ff237..103a2c3057d 100644
--- a/source4/torture/raw/streams.c
+++ b/source4/torture/raw/streams.c
@@ -655,7 +655,7 @@ static bool test_stream_names(struct torture_context *tctx,
const char *fname = BASEDIR "\\stream_names.txt";
const char *sname1, *sname1b, *sname1c, *sname1d;
const char *sname2, *snamew, *snamew2;
- const char *snamer1, *snamer2;
+ const char *snamer1;
bool ret = true;
int fnum1 = -1;
int fnum2 = -1;
@@ -692,7 +692,6 @@ static bool test_stream_names(struct torture_context *tctx,
snamew = talloc_asprintf(tctx, "%s:%s:$DATA", fname, "?Stream*");
snamew2 = talloc_asprintf(tctx, "%s\\stream*:%s:$DATA", BASEDIR, "?Stream*");
snamer1 = talloc_asprintf(tctx, "%s:%s:$DATA", fname, "BeforeRename");
- snamer2 = talloc_asprintf(tctx, "%s:%s:$DATA", fname, "AfterRename");
printf("(%s) testing stream names\n", __location__);
io.generic.level = RAW_OPEN_NTCREATEX;
@@ -1090,8 +1089,6 @@ done:
}
#define CHECK_CALL_FNUM(call, rightstatus) do { \
- check_fnum = true; \
- call_name = #call; \
sfinfo.generic.level = RAW_SFILEINFO_ ## call; \
sfinfo.generic.in.file.fnum = fnum; \
status = smb_raw_setfileinfo(cli->tree, &sfinfo); \
@@ -1122,8 +1119,6 @@ static bool test_stream_rename(struct torture_context *tctx,
union smb_setfileinfo sfinfo;
bool ret = true;
int fnum = -1;
- bool check_fnum;
- const char *call_name;
torture_assert(tctx, torture_setup_dir(cli, BASEDIR), "Failed to setup up test directory: " BASEDIR);
@@ -1398,8 +1393,6 @@ static bool test_stream_rename3(struct torture_context *tctx,
bool ret = true;
int fnum = -1;
int fnum2 = -1;
- bool check_fnum;
- const char *call_name;
torture_assert(tctx, torture_setup_dir(cli, BASEDIR), "Failed to setup up test directory: " BASEDIR);