summaryrefslogtreecommitdiff
path: root/lib/torture
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2019-04-30 14:23:52 +0200
committerAndrew Bartlett <abartlet@samba.org>2019-05-01 03:12:07 +0000
commit62ba14a41b6fb590dce8df5d3d0c9796d4a85393 (patch)
tree67ee6392503cef1fc8a3140b1e8e2d2cbfbc7f1f /lib/torture
parentc5e387d22a2117c5819fd94e1a1b077d37739842 (diff)
downloadsamba-62ba14a41b6fb590dce8df5d3d0c9796d4a85393.tar.gz
lib:torture: Fix size type in torture macro
Found by csbuild. https://gitlab.com/samba-team/devel/samba/-/jobs/204481431 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'lib/torture')
-rw-r--r--lib/torture/torture.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/torture/torture.h b/lib/torture/torture.h
index c0fbdb9081d..2921ae74b9b 100644
--- a/lib/torture/torture.h
+++ b/lib/torture/torture.h
@@ -406,7 +406,7 @@ static inline void torture_dump_data_str_cb(const char *buf, void *private_data)
char *__dump = NULL; \
uint8_t __byte_a = 0x00;\
uint8_t __byte_b = 0x00;\
- int __i;\
+ size_t __i;\
for (__i=0; __i < __expected.length; __i++) {\
__byte_a = __expected.data[__i];\
if (__i == __got.length) {\
@@ -418,14 +418,14 @@ static inline void torture_dump_data_str_cb(const char *buf, void *private_data)
break;\
}\
}\
- torture_warning(torture_ctx, "blobs differ at byte 0x%02X (%u)", __i, __i);\
+ torture_warning(torture_ctx, "blobs differ at byte 0x%02X (%zu)", (unsigned int)__i, __i);\
torture_warning(torture_ctx, "expected byte[0x%02X] = 0x%02X got byte[0x%02X] = 0x%02X",\
- __i, __byte_a, __i, __byte_b);\
+ (unsigned int)__i, __byte_a, (unsigned int)__i, __byte_b);\
__dump = talloc_strdup(torture_ctx, ""); \
dump_data_cb(__got.data, __got.length, true, \
torture_dump_data_str_cb, &__dump); \
torture_warning(torture_ctx, "got[0x%02X]: \n%s", \
- (int)__got.length, __dump); \
+ (unsigned int)__got.length, __dump); \
TALLOC_FREE(__dump); \
__dump = talloc_strdup(torture_ctx, ""); \
dump_data_cb(__expected.data, __expected.length, true, \