Alexandre Julliard : Avoid size_t types in traces.
Alexandre Julliard
julliard at winehq.org
Fri Dec 7 13:19:11 CST 2007
Module: wine
Branch: master
Commit: c0b12351e08a02fae48fba8d00471e840d7ccf81
URL: http://source.winehq.org/git/wine.git/?a=commit;h=c0b12351e08a02fae48fba8d00471e840d7ccf81
Author: Alexandre Julliard <julliard at winehq.org>
Date: Fri Dec 7 18:49:18 2007 +0100
Avoid size_t types in traces.
---
dlls/advapi32/tests/security.c | 4 ++--
dlls/comctl32/tests/mru.c | 8 ++++----
dlls/dsound/dsound.c | 4 ++--
dlls/riched20/tests/editor.c | 4 ++--
dlls/riched32/tests/editor.c | 4 ++--
dlls/rpcrt4/tests/ndr_marshall.c | 2 +-
6 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c
index 0d269b5..e9f4795 100644
--- a/dlls/advapi32/tests/security.c
+++ b/dlls/advapi32/tests/security.c
@@ -2163,12 +2163,12 @@ static void test_ConvertSecurityDescriptorToString()
* don't replicate this feature so we only test len >= strlen+1. */
#define CHECK_RESULT_AND_FREE(exp_str) \
ok(strcmp(string, (exp_str)) == 0, "String mismatch (expected \"%s\", got \"%s\")\n", (exp_str), string); \
- ok(len >= (strlen(exp_str) + 1), "Length mismatch (expected %d, got %d)\n", strlen(exp_str) + 1, len); \
+ ok(len >= (lstrlen(exp_str) + 1), "Length mismatch (expected %d, got %d)\n", lstrlen(exp_str) + 1, len); \
LocalFree(string);
#define CHECK_ONE_OF_AND_FREE(exp_str1, exp_str2) \
ok(strcmp(string, (exp_str1)) == 0 || strcmp(string, (exp_str2)) == 0, "String mismatch (expected\n\"%s\" or\n\"%s\", got\n\"%s\")\n", (exp_str1), (exp_str2), string); \
- ok(len >= (strlen(string) + 1), "Length mismatch (expected %d, got %d)\n", strlen(string) + 1, len); \
+ ok(len >= (strlen(string) + 1), "Length mismatch (expected %d, got %d)\n", lstrlen(string) + 1, len); \
LocalFree(string);
InitializeSecurityDescriptor(&desc, SECURITY_DESCRIPTOR_REVISION);
diff --git a/dlls/comctl32/tests/mru.c b/dlls/comctl32/tests/mru.c
index 5201a95..cf42e9e 100644
--- a/dlls/comctl32/tests/mru.c
+++ b/dlls/comctl32/tests/mru.c
@@ -307,7 +307,7 @@ static void test_MRUListA(void)
/* check entry 0 */
buffer[0] = 0;
iRet = pEnumMRUList(hMRU, 0, buffer, 255);
- todo_wine ok(iRet == strlen(checks[3]), "EnumMRUList expected %d, got %d\n", strlen(checks[3]), iRet);
+ todo_wine ok(iRet == lstrlen(checks[3]), "EnumMRUList expected %d, got %d\n", lstrlen(checks[3]), iRet);
ok(strcmp(buffer, checks[3]) == 0, "EnumMRUList expected %s, got %s\n", checks[3], buffer);
/* check entry 0 with a too small buffer */
@@ -316,7 +316,7 @@ static void test_MRUListA(void)
buffer[2] = 'A'; /* unchanged */
buffer[3] = 0; /* unchanged */
iRet = pEnumMRUList(hMRU, 0, buffer, 2);
- todo_wine ok(iRet == strlen(checks[3]), "EnumMRUList expected %d, got %d\n", strlen(checks[3]), iRet);
+ todo_wine ok(iRet == lstrlen(checks[3]), "EnumMRUList expected %d, got %d\n", lstrlen(checks[3]), iRet);
todo_wine ok(strcmp(buffer, "T") == 0, "EnumMRUList expected %s, got %s\n", "T", buffer);
/* make sure space after buffer has old values */
ok(buffer[2] == 'A', "EnumMRUList expected %02x, got %02x\n", 'A', buffer[2]);
@@ -324,13 +324,13 @@ static void test_MRUListA(void)
/* check entry 1 */
buffer[0] = 0;
iRet = pEnumMRUList(hMRU, 1, buffer, 255);
- todo_wine ok(iRet == strlen(checks[1]), "EnumMRUList expected %d, got %d\n", strlen(checks[1]), iRet);
+ todo_wine ok(iRet == lstrlen(checks[1]), "EnumMRUList expected %d, got %d\n", lstrlen(checks[1]), iRet);
ok(strcmp(buffer, checks[1]) == 0, "EnumMRUList expected %s, got %s\n", checks[1], buffer);
/* check entry 2 */
buffer[0] = 0;
iRet = pEnumMRUList(hMRU, 2, buffer, 255);
- todo_wine ok(iRet == strlen(checks[2]), "EnumMRUList expected %d, got %d\n", strlen(checks[2]), iRet);
+ todo_wine ok(iRet == lstrlen(checks[2]), "EnumMRUList expected %d, got %d\n", lstrlen(checks[2]), iRet);
ok(strcmp(buffer, checks[2]) == 0, "EnumMRUList expected %s, got %s\n", checks[2], buffer);
/* check out of bounds entry 3 */
diff --git a/dlls/dsound/dsound.c b/dlls/dsound/dsound.c
index 7b2d5d6..73fbd91 100644
--- a/dlls/dsound/dsound.c
+++ b/dlls/dsound/dsound.c
@@ -1587,13 +1587,13 @@ HRESULT DirectSoundDevice_CreateSoundBuffer(
{
if (pwfxe->Format.cbSize < (sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX)))
{
- WARN("Too small a cbSize (%d/%d)\n", pwfxe->Format.cbSize, (sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX)));
+ WARN("Too small a cbSize %u\n", pwfxe->Format.cbSize);
return DSERR_INVALIDPARAM;
}
if (pwfxe->Format.cbSize > (sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX)))
{
- WARN("Too big a cbSize (%d/%d)\n", pwfxe->Format.cbSize, (sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX)));
+ WARN("Too big a cbSize %u\n", pwfxe->Format.cbSize);
return DSERR_CONTROLUNAVAIL;
}
diff --git a/dlls/riched20/tests/editor.c b/dlls/riched20/tests/editor.c
index c3d09bf..7a5c9c9 100644
--- a/dlls/riched20/tests/editor.c
+++ b/dlls/riched20/tests/editor.c
@@ -1070,9 +1070,9 @@ static void test_WM_SETTEXT()
result = SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) a); \
ok (result == 1, "WM_SETTEXT returned %ld instead of 1\n", result); \
result = SendMessage(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM) buf); \
- ok (result == strlen(buf), \
+ ok (result == lstrlen(buf), \
"WM_GETTEXT returned %ld instead of expected %u\n", \
- result, strlen(buf)); \
+ result, lstrlen(buf)); \
result = strcmp(b, buf); \
ok(result == 0, \
"WM_SETTEXT round trip: strcmp = %ld\n", result);
diff --git a/dlls/riched32/tests/editor.c b/dlls/riched32/tests/editor.c
index 6d0c04e..77c86e7 100644
--- a/dlls/riched32/tests/editor.c
+++ b/dlls/riched32/tests/editor.c
@@ -78,9 +78,9 @@ static void test_WM_SETTEXT()
result = SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) a); \
ok (result == 1, "WM_SETTEXT returned %ld instead of 1\n", result); \
result = SendMessage(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM) buf); \
- ok (result == strlen(buf), \
+ ok (result == lstrlen(buf), \
"WM_GETTEXT returned %ld instead of expected %u\n", \
- result, strlen(buf)); \
+ result, lstrlen(buf)); \
result = strcmp(b, buf); \
if (is_todo) todo_wine { \
ok(result == 0, \
diff --git a/dlls/rpcrt4/tests/ndr_marshall.c b/dlls/rpcrt4/tests/ndr_marshall.c
index e4e2399..d72d76f 100644
--- a/dlls/rpcrt4/tests/ndr_marshall.c
+++ b/dlls/rpcrt4/tests/ndr_marshall.c
@@ -1141,7 +1141,7 @@ static void test_conformant_string(void)
ptr = NdrPointerMarshall( &StubMsg, (unsigned char *)memsrc, fmtstr_conf_str );
ok(ptr == NULL, "ret %p\n", ptr);
ok(StubMsg.Buffer - StubMsg.BufferStart == sizeof(memsrc) + 12, "Buffer %p Start %p len %d\n",
- StubMsg.Buffer, StubMsg.BufferStart, 12 + sizeof(memsrc));
+ StubMsg.Buffer, StubMsg.BufferStart, StubMsg.Buffer - StubMsg.BufferStart);
ok(!memcmp(StubMsg.BufferStart + 12, memsrc, sizeof(memsrc)), "incorrectly marshaled\n");
StubMsg.Buffer = StubMsg.BufferStart;
More information about the wine-cvs
mailing list