diff options
author | Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de> | 2009-11-20 11:35:13 +0100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2009-12-01 16:48:47 +1100 |
commit | 2d1bd87f732e37323bd382ac66f41bfc52a23dac (patch) | |
tree | 5443185d35c85f85b7220147e8d707a4eebc5a1a /source4/torture/raw/lock.c | |
parent | 262d26d05a6b1f6b074408ba8be352324d1b0d47 (diff) | |
download | samba-2d1bd87f732e37323bd382ac66f41bfc52a23dac.tar.gz samba-2d1bd87f732e37323bd382ac66f41bfc52a23dac.tar.xz samba-2d1bd87f732e37323bd382ac66f41bfc52a23dac.zip |
s4:torture/raw/lock - Fix "discard const" warnings by introducing "discard_const_p"s
Diffstat (limited to 'source4/torture/raw/lock.c')
-rw-r--r-- | source4/torture/raw/lock.c | 9 |
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); } |