summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2009-11-20 11:35:13 +0100
committerAndrew Bartlett <abartlet@samba.org>2009-12-01 16:48:47 +1100
commit2d1bd87f732e37323bd382ac66f41bfc52a23dac (patch)
tree5443185d35c85f85b7220147e8d707a4eebc5a1a /source4
parent262d26d05a6b1f6b074408ba8be352324d1b0d47 (diff)
downloadsamba-2d1bd87f732e37323bd382ac66f41bfc52a23dac.tar.gz
samba-2d1bd87f732e37323bd382ac66f41bfc52a23dac.tar.bz2
samba-2d1bd87f732e37323bd382ac66f41bfc52a23dac.zip
s4:torture/raw/lock - Fix "discard const" warnings by introducing "discard_const_p"s
Diffstat (limited to 'source4')
-rw-r--r--source4/torture/raw/lock.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source4/torture/raw/lock.c b/source4/torture/raw/lock.c
index 8b49df5de5..1ccba61c55 100644
--- a/source4/torture/raw/lock.c
+++ b/source4/torture/raw/lock.c
@@ -1404,11 +1404,13 @@ static bool test_zerobytelocks(struct torture_context *tctx, struct smbcli_state
io.lockx.in.ulock_cnt = 0;
io.lockx.in.lock_cnt = 1;
- io.lockx.in.locks = &zero_byte_tests[i].lock1;
+ io.lockx.in.locks = discard_const_p(struct smb_lock_entry,
+ &zero_byte_tests[i].lock1);
status = smb_raw_lock(cli->tree, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- io.lockx.in.locks = &zero_byte_tests[i].lock2;
+ io.lockx.in.locks = discard_const_p(struct smb_lock_entry,
+ &zero_byte_tests[i].lock2);
status = smb_raw_lock(cli->tree, &io);
if (NT_STATUS_EQUAL(zero_byte_tests[i].exp_status,
@@ -1433,7 +1435,8 @@ static bool test_zerobytelocks(struct torture_context *tctx, struct smbcli_state
CHECK_STATUS(status, NT_STATUS_OK);
}
- io.lockx.in.locks = &zero_byte_tests[i].lock1;
+ io.lockx.in.locks = discard_const_p(struct smb_lock_entry,
+ &zero_byte_tests[i].lock1);
status = smb_raw_lock(cli->tree, &io);
CHECK_STATUS(status, NT_STATUS_OK);
}