summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2011-05-07 11:06:38 +0200
committerMatthias Dieter Wallnöfer <mdw@samba.org>2011-05-21 16:21:12 +0200
commit5c4fabb08edfdc8e4da431927c5337e96988beef (patch)
treeb206f0907e9a66cd6db1afa6e66b3311ab503080
parentf44808fa1197c28137808f7e8560bbe3ed439cff (diff)
downloadsamba-5c4fabb08edfdc8e4da431927c5337e96988beef.tar.gz
samba-5c4fabb08edfdc8e4da431927c5337e96988beef.tar.bz2
samba-5c4fabb08edfdc8e4da431927c5337e96988beef.zip
s4:torture - always cast correctly when using the "%x" format string argument
Signed-off-by: Metze
-rw-r--r--source4/torture/basic/attr.c2
-rw-r--r--source4/torture/raw/open.c10
2 files changed, 6 insertions, 6 deletions
diff --git a/source4/torture/basic/attr.c b/source4/torture/basic/attr.c
index 9655f7a743..2f0248e20f 100644
--- a/source4/torture/basic/attr.c
+++ b/source4/torture/basic/attr.c
@@ -374,7 +374,7 @@ error_exit_file:
[0x%x], got attr 0x%x, should be 0x%x\n",
open_attrs_table[j],
(uint16_t)attr,
- (int)open_attrs_table[j]|FILE_ATTRIBUTE_DIRECTORY);
+ (unsigned int)(open_attrs_table[j]|FILE_ATTRIBUTE_DIRECTORY));
CHECK_MAX_FAILURES(error_exit_dir);
}
diff --git a/source4/torture/raw/open.c b/source4/torture/raw/open.c
index beb629069f..8a66a12cd5 100644
--- a/source4/torture/raw/open.c
+++ b/source4/torture/raw/open.c
@@ -130,7 +130,7 @@ static const char *rdwr_string(enum rdwr_mode m)
if ((v) != (finfo.all_info.out.field)) { \
torture_result(tctx, TORTURE_FAIL, \
"(%s) wrong value for field %s 0x%x - 0x%x\n", \
- __location__, #field, (int)v, (int)(finfo.all_info.out.field)); \
+ __location__, #field, (unsigned int)(v), (unsigned int)(finfo.all_info.out.field)); \
dump_all_info(tctx, &finfo); \
ret = false; \
}} while (0)
@@ -139,7 +139,7 @@ static const char *rdwr_string(enum rdwr_mode m)
if ((v) != (correct)) { \
torture_result(tctx, TORTURE_FAIL, \
"(%s) wrong value for %s 0x%x - should be 0x%x\n", \
- __location__, #v, (int)(v), (int)correct); \
+ __location__, #v, (unsigned int)(v), (unsigned int)(correct)); \
ret = false; \
}} while (0)
@@ -152,7 +152,7 @@ static const char *rdwr_string(enum rdwr_mode m)
status = smb_raw_setpathinfo(cli->tree, &sfinfo); \
if (!NT_STATUS_IS_OK(status)) { \
torture_warning(tctx, "(%s) Failed to set attrib 0x%x on %s\n", \
- __location__, (int)sattrib, fname); \
+ __location__, (unsigned int)(sattrib), fname); \
}} while (0)
/*
@@ -337,7 +337,7 @@ static bool test_openx(struct torture_context *tctx, struct smbcli_state *cli)
__location__, nt_errstr(status),
nt_errstr(open_funcs[i].correct_status),
i, (int)open_funcs[i].with_file,
- (int)open_funcs[i].open_func);
+ open_funcs[i].open_func);
ret = false;
}
if (NT_STATUS_IS_OK(status)) {
@@ -602,7 +602,7 @@ static bool test_t2open(struct torture_context *tctx, struct smbcli_state *cli)
__location__, nt_errstr(status),
nt_errstr(open_funcs[i].correct_status),
i, (int)open_funcs[i].with_file,
- (int)open_funcs[i].open_func);
+ open_funcs[i].open_func);
ret = false;
}
if (NT_STATUS_IS_OK(status)) {