diff options
author | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-11-01 11:17:37 +0100 |
---|---|---|
committer | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-11-01 11:31:33 +0100 |
commit | 2a25f7515a68938249beef47546465889ca1c734 (patch) | |
tree | 5ee7d705aeb666f0d201c99bebf28a715d9567d9 /source4/torture/smb2 | |
parent | c8bcf821191ab88a82954fd485087522d3c2ef05 (diff) | |
download | samba-2a25f7515a68938249beef47546465889ca1c734.tar.gz samba-2a25f7515a68938249beef47546465889ca1c734.tar.bz2 samba-2a25f7515a68938249beef47546465889ca1c734.zip |
s4:torture - suppress printf "%llu" on uint64_t variables warnings
The signed/unsignedness does match (always unsigned). The bitlength (64 bit) on
all regular platforms does also. Therefore simply add a cast to
"unsigned long long".
Diffstat (limited to 'source4/torture/smb2')
-rw-r--r-- | source4/torture/smb2/lock.c | 36 | ||||
-rw-r--r-- | source4/torture/smb2/oplock.c | 3 |
2 files changed, 22 insertions, 17 deletions
diff --git a/source4/torture/smb2/lock.c b/source4/torture/smb2/lock.c index 508358ea61..ad66b6236b 100644 --- a/source4/torture/smb2/lock.c +++ b/source4/torture/smb2/lock.c @@ -1373,10 +1373,10 @@ static bool test_zerobytelength(struct torture_context *torture, for (i = 0; i < ARRAY_SIZE(zero_byte_tests); i++) { torture_comment(torture, " ... {%llu, %llu} + {%llu, %llu} = %s\n", - zero_byte_tests[i].lock1.offset, - zero_byte_tests[i].lock1.length, - zero_byte_tests[i].lock2.offset, - zero_byte_tests[i].lock2.length, + (unsigned long long) zero_byte_tests[i].lock1.offset, + (unsigned long long) zero_byte_tests[i].lock1.length, + (unsigned long long) zero_byte_tests[i].lock2.offset, + (unsigned long long) zero_byte_tests[i].lock2.length, nt_errstr(zero_byte_tests[i].status)); /* Lock both locks. */ @@ -1410,10 +1410,10 @@ static bool test_zerobytelength(struct torture_context *torture, for (i = 0; i < ARRAY_SIZE(zero_byte_tests); i++) { torture_comment(torture, " ... {%llu, %llu} + {%llu, %llu} = %s\n", - zero_byte_tests[i].lock1.offset, - zero_byte_tests[i].lock1.length, - zero_byte_tests[i].lock2.offset, - zero_byte_tests[i].lock2.length, + (unsigned long long) zero_byte_tests[i].lock1.offset, + (unsigned long long) zero_byte_tests[i].lock1.length, + (unsigned long long) zero_byte_tests[i].lock2.offset, + (unsigned long long) zero_byte_tests[i].lock2.length, nt_errstr(zero_byte_tests[i].status)); /* Lock both locks. */ @@ -2524,7 +2524,7 @@ static bool test_range(struct torture_context *torture, CHECK_STATUS_CMT(status, NT_STATUS_OK, talloc_asprintf(torture, "lock h failed at offset %#llx ", - el[0].offset)); + (unsigned long long) el[0].offset)); lck.in.file.handle = h2; el[0].offset = offset - 2; @@ -2532,7 +2532,7 @@ static bool test_range(struct torture_context *torture, CHECK_STATUS_CMT(status, NT_STATUS_OK, talloc_asprintf(torture, "lock h2 failed at offset %#llx ", - el[0].offset)); + (unsigned long long) el[0].offset)); } torture_comment(torture, " testing %d locks\n", torture_numops); @@ -2546,7 +2546,8 @@ static bool test_range(struct torture_context *torture, CHECK_STATUS_CMT(status, NT_STATUS_LOCK_NOT_GRANTED, talloc_asprintf(torture, "lock h at offset %#llx should not have " - "succeeded ", el[0].offset)); + "succeeded ", + (unsigned long long) el[0].offset)); lck.in.file.handle = h; el[0].offset = offset - 2; @@ -2554,7 +2555,8 @@ static bool test_range(struct torture_context *torture, CHECK_STATUS_CMT(status, NT_STATUS_LOCK_NOT_GRANTED, talloc_asprintf(torture, "lock h2 at offset %#llx should not have " - "succeeded ", el[0].offset)); + "succeeded ", + (unsigned long long) el[0].offset)); lck.in.file.handle = h2; el[0].offset = offset - 1; @@ -2562,7 +2564,8 @@ static bool test_range(struct torture_context *torture, CHECK_STATUS_CMT(status, NT_STATUS_LOCK_NOT_GRANTED, talloc_asprintf(torture, "lock h at offset %#llx should not have " - "succeeded ", el[0].offset)); + "succeeded ", + (unsigned long long) el[0].offset)); lck.in.file.handle = h2; el[0].offset = offset - 2; @@ -2570,7 +2573,8 @@ static bool test_range(struct torture_context *torture, CHECK_STATUS_CMT(status, NT_STATUS_LOCK_NOT_GRANTED, talloc_asprintf(torture, "lock h2 at offset %#llx should not have " - "succeeded ", el[0].offset)); + "succeeded ", + (unsigned long long) el[0].offset)); } torture_comment(torture, " removing %d locks\n", torture_numops); @@ -2586,7 +2590,7 @@ static bool test_range(struct torture_context *torture, CHECK_STATUS_CMT(status, NT_STATUS_OK, talloc_asprintf(torture, "unlock from h failed at offset %#llx ", - el[0].offset)); + (unsigned long long) el[0].offset)); lck.in.file.handle = h2; el[0].offset = offset - 2; @@ -2594,7 +2598,7 @@ static bool test_range(struct torture_context *torture, CHECK_STATUS_CMT(status, NT_STATUS_OK, talloc_asprintf(torture, "unlock from h2 failed at offset %#llx ", - el[0].offset)); + (unsigned long long) el[0].offset)); } done: diff --git a/source4/torture/smb2/oplock.c b/source4/torture/smb2/oplock.c index aa0b92dc80..5261b58473 100644 --- a/source4/torture/smb2/oplock.c +++ b/source4/torture/smb2/oplock.c @@ -3514,7 +3514,8 @@ static bool torture_oplock_handler_hold(struct smb2_transport *transport, if (i == ARRAY_SIZE(hold_info)) { printf("oplock break for unknown handle 0x%llx%llx\n", - handle->data[0], handle->data[1]); + (unsigned long long) handle->data[0], + (unsigned long long) handle->data[1]); return false; } |