Module: wine Branch: refs/heads/master Commit: 65459cb344905cb955eb1c9c9b0d26ef82485815 URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=65459cb344905cb955eb1c9c...
Author: Alexandre Julliard julliard@winehq.org Date: Tue Jun 13 14:03:01 2006 +0200
mshtml/tests: Don't use sizeof in ok() to avoid printf format warnings.
---
dlls/mshtml/tests/htmldoc.c | 3 +-- dlls/mshtml/tests/protocol.c | 15 ++++++--------- 2 files changed, 7 insertions(+), 11 deletions(-)
diff --git a/dlls/mshtml/tests/htmldoc.c b/dlls/mshtml/tests/htmldoc.c index c39242f..1835d73 100644 --- a/dlls/mshtml/tests/htmldoc.c +++ b/dlls/mshtml/tests/htmldoc.c @@ -781,8 +781,7 @@ static HRESULT WINAPI DocHostUIHandler_G CHECK_EXPECT(GetHostInfo); ok(pInfo != NULL, "pInfo=NULL\n"); if(pInfo) { - ok(pInfo->cbSize == sizeof(DOCHOSTUIINFO), "pInfo->cbSize=%lu, expected %u\n", - pInfo->cbSize, sizeof(DOCHOSTUIINFO)); + ok(pInfo->cbSize == sizeof(DOCHOSTUIINFO), "pInfo->cbSize=%lu\n", pInfo->cbSize); ok(!pInfo->dwFlags, "pInfo->dwFlags=%08lx, expected 0\n", pInfo->dwFlags); pInfo->dwFlags = DOCHOSTUIFLAG_DISABLE_HELP_MENU | DOCHOSTUIFLAG_DISABLE_SCRIPT_INACTIVE | DOCHOSTUIFLAG_ACTIVATE_CLIENTHIT_ONLY | DOCHOSTUIFLAG_ENABLE_INPLACE_NAVIGATION diff --git a/dlls/mshtml/tests/protocol.c b/dlls/mshtml/tests/protocol.c index ba1be65..dfed396 100644 --- a/dlls/mshtml/tests/protocol.c +++ b/dlls/mshtml/tests/protocol.c @@ -296,16 +296,14 @@ static void test_res_protocol(void) sizeof(buf)/sizeof(buf[0]), &size, 0); ok(hres == S_OK || hres == E_FAIL, "ParseUrl failed: %08lx\n", hres); ok(buf[0] == '?', "buf changed\n"); - ok(size == sizeof(blank_url)/sizeof(WCHAR), - "size=%ld, ezpected %d\n", size, sizeof(wrong_url1)/sizeof(WCHAR)); + ok(size == sizeof(blank_url)/sizeof(WCHAR), "size=%ld\n", size);
size = 0xdeadbeef; hres = IInternetProtocolInfo_ParseUrl(protocol_info, wrong_url1, PARSE_DOMAIN, 0, buf, sizeof(buf)/sizeof(buf[0]), &size, 0); ok(hres == S_OK || hres == E_FAIL, "ParseUrl failed: %08lx\n", hres); ok(buf[0] == '?', "buf changed\n"); - ok(size == sizeof(wrong_url1)/sizeof(WCHAR), - "size=%ld, ezpected %d\n", size, sizeof(wrong_url1)/sizeof(WCHAR)); + ok(size == sizeof(wrong_url1)/sizeof(WCHAR), "size=%ld\n", size);
#if 0 /* Crashes on win9x */ size = 0xdeadbeef; @@ -473,8 +471,7 @@ static void test_about_protocol(void) sizeof(buf)/sizeof(buf[0]), &size, 0); ok(hres == S_OK || hres == E_FAIL, "ParseUrl failed: %08lx\n", hres); ok(buf[0] == '?', "buf changed\n"); - ok(size == sizeof(blank_url)/sizeof(WCHAR), - "size=%ld, expected %d\n", size, sizeof(blank_url)/sizeof(WCHAR)); + ok(size == sizeof(blank_url)/sizeof(WCHAR), "size=%ld\n", size);
#if 0 /* Crashes on win9x */ size = 0xdeadbeef; @@ -521,7 +518,7 @@ #endif ok(hres == S_OK, "LockRequest failed: %08lx\n", hres); hres = IInternetProtocol_Read(protocol, buf, sizeof(buf), &cb); ok(hres == S_OK, "Read failed: %08lx\n", hres); - ok(cb == sizeof(blank_html), "cb=%ld, expected %d\n", cb, sizeof(blank_html)); + ok(cb == sizeof(blank_html), "cb=%ld\n", cb); ok(!memcmp(buf, blank_html, cb), "Readed wrong data\n"); hres = IInternetProtocol_UnlockRequest(protocol); ok(hres == S_OK, "UnlockRequest failed: %08lx\n", hres); @@ -531,7 +528,7 @@ #endif ok(hres == S_OK, "LockRequest failed: %08lx\n", hres); hres = IInternetProtocol_Read(protocol, buf, sizeof(buf), &cb); ok(hres == S_OK, "Read failed: %08lx\n", hres); - ok(cb == sizeof(test_html), "cb=%ld, expected %d\n", cb, sizeof(test_html)); + ok(cb == sizeof(test_html), "cb=%ld\n", cb); ok(!memcmp(buf, test_html, cb), "Readed wrong data\n"); hres = IInternetProtocol_UnlockRequest(protocol); ok(hres == S_OK, "UnlockRequest failed: %08lx\n", hres); @@ -541,7 +538,7 @@ #endif ok(hres == S_OK, "LockRequest failed: %08lx\n", hres); hres = IInternetProtocol_Read(protocol, buf, sizeof(buf), &cb); ok(hres == S_OK, "Read failed: %08lx\n", hres); - ok(cb == sizeof(blank_html), "cb=%ld, expected %d\n", cb, sizeof(blank_html)); + ok(cb == sizeof(blank_html), "cb=%ld\n", cb); ok(!memcmp(buf, blank_html, cb), "Readed wrong data\n"); hres = IInternetProtocol_UnlockRequest(protocol); ok(hres == S_OK, "UnlockRequest failed: %08lx\n", hres);