From 5c4fabb08edfdc8e4da431927c5337e96988beef Mon Sep 17 00:00:00 2001 From: =?utf8?q?Matthias=20Dieter=20Walln=C3=B6fer?= Date: Sat, 7 May 2011 11:06:38 +0200 Subject: [PATCH] s4:torture - always cast correctly when using the "%x" format string argument Signed-off-by: Metze --- source4/torture/basic/attr.c | 2 +- source4/torture/raw/open.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/source4/torture/basic/attr.c b/source4/torture/basic/attr.c index 9655f7a7438..2f0248e20fb 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 beb629069f6..8a66a12cd57 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)) { -- 2.11.4.GIT