Module: wine Branch: master Commit: 6a9222fc39050e1f594a924215426c610e154902 URL: http://source.winehq.org/git/wine.git/?a=commit;h=6a9222fc39050e1f594a924215...
Author: Alexandre Julliard julliard@winehq.org Date: Thu Oct 12 14:58:25 2006 +0200
Fixed some printf warnings caused by using sizeof.
---
dlls/advapi32/service.c | 4 ++-- dlls/crypt32/tests/encode.c | 6 ++---- dlls/dmime/tempotrack.c | 2 +- dlls/shlwapi/tests/clist.c | 6 ++---- dlls/user/tests/class.c | 4 ++-- tools/winedump/pe.c | 1 - 6 files changed, 9 insertions(+), 14 deletions(-)
diff --git a/dlls/advapi32/service.c b/dlls/advapi32/service.c index b1d80dc..24b209e 100644 --- a/dlls/advapi32/service.c +++ b/dlls/advapi32/service.c @@ -422,8 +422,8 @@ static BOOL service_handle_start(HANDLE r = ReadFile(pipe, args, count*sizeof(WCHAR), &read, NULL); if (!r || count!=read/sizeof(WCHAR) || args[count-1]) { - ERR("pipe read failed r = %d count = %d/%d args[n-1]=%s\n", - r, count, read/sizeof(WCHAR), debugstr_wn(args, count)); + ERR("pipe read failed r = %d count = %d read = %d args[n-1]=%s\n", + r, count, read, debugstr_wn(args, count)); goto end; }
diff --git a/dlls/crypt32/tests/encode.c b/dlls/crypt32/tests/encode.c index 54d1222..6a1801d 100644 --- a/dlls/crypt32/tests/encode.c +++ b/dlls/crypt32/tests/encode.c @@ -1830,8 +1830,7 @@ static void test_decodeBits(DWORD dwEnco CRYPT_BIT_BLOB *blob;
ok(bufSize >= sizeof(CRYPT_BIT_BLOB) + bits[i].cbDecoded, - "Got unexpected size %d, expected >= %d\n", bufSize, - sizeof(CRYPT_BIT_BLOB) + bits[i].cbDecoded); + "Got unexpected size %d\n", bufSize); blob = (CRYPT_BIT_BLOB *)buf; ok(blob->cbData == bits[i].cbDecoded, "Got unexpected length %d, expected %d\n", blob->cbData, @@ -4081,8 +4080,7 @@ static void test_decodeCRLToBeSigned(DWO { CRL_INFO *info = (CRL_INFO *)buf;
- ok(size >= sizeof(CRL_INFO), "Expected size at least %d, got %d\n", - sizeof(CRL_INFO), size); + ok(size >= sizeof(CRL_INFO), "Got size %d\n", size); ok(info->cCRLEntry == 209, "Expected 209 CRL entries, got %d\n", info->cCRLEntry); ok(info->cExtension == 0, "Expected 0 extensions, got %d\n", diff --git a/dlls/dmime/tempotrack.c b/dlls/dmime/tempotrack.c index 698cc88..7a3589b 100644 --- a/dlls/dmime/tempotrack.c +++ b/dlls/dmime/tempotrack.c @@ -340,7 +340,7 @@ #if 1 IStream_Read (pStm, &StreamSize, sizeof(DWORD), NULL); StreamSize -= sizeof(DWORD); StreamCount = 0; - TRACE_(dmfile)(" - sizeof(DMUS_IO_TEMPO_ITEM): %u (chunkSize = %u)\n", StreamSize, Chunk.dwSize - sizeof(DWORD)); + TRACE_(dmfile)(" - sizeof(DMUS_IO_TEMPO_ITEM): %u (chunkSize = %u)\n", StreamSize, Chunk.dwSize); do { IStream_Read (pStm, &item, sizeof(item), NULL); ++nItem; diff --git a/dlls/shlwapi/tests/clist.c b/dlls/shlwapi/tests/clist.c index c1a5f7c..a4a55a1 100644 --- a/dlls/shlwapi/tests/clist.c +++ b/dlls/shlwapi/tests/clist.c @@ -312,8 +312,7 @@ static void test_CList(void) else if (inserted) { ok(inserted->ulSize==item->ulSize+sizeof(SHLWAPI_CLIST), - "id %d size wrong (%d!=%d)\n", inserted->ulId, inserted->ulSize, - item->ulSize+sizeof(SHLWAPI_CLIST)); + "id %d wrong size %d\n", inserted->ulId, inserted->ulSize); } if (inserted) { @@ -437,8 +436,7 @@ #endif else if (inserted) { ok(inserted->ulSize==item->ulSize+sizeof(SHLWAPI_CLIST), - "id %d size wrong (%d!=%d)\n", inserted->ulId, inserted->ulSize, - item->ulSize+sizeof(SHLWAPI_CLIST)); + "id %d wrong size %d\n", inserted->ulId, inserted->ulSize); } ok(!inserted || inserted->ulId==item->ulId, "find got wrong item\n"); if (inserted) diff --git a/dlls/user/tests/class.c b/dlls/user/tests/class.c index 109d45d..385bb7b 100644 --- a/dlls/user/tests/class.c +++ b/dlls/user/tests/class.c @@ -106,9 +106,9 @@ #endif { SetLastError(0); ok(!SetClassLongW(hTestWnd,i*sizeof(DWORD),i+1), - "GetClassLongW(%d) initial value nonzero!\n",i*sizeof(DWORD)); + "GetClassLongW(%d) initial value nonzero!\n",i); ok(!GetLastError(), - "SetClassLongW(%d) failed!\n",i*sizeof(DWORD)); + "SetClassLongW(%d) failed!\n",i); }
/* test values of valid classwords that we set */ diff --git a/tools/winedump/pe.c b/tools/winedump/pe.c index cf1c864..dd7588c 100644 --- a/tools/winedump/pe.c +++ b/tools/winedump/pe.c @@ -208,7 +208,6 @@ static inline void print_datadirectory(D { unsigned i; printf("Data Directory\n"); - printf("%d\n", n * sizeof(IMAGE_DATA_DIRECTORY));
for (i = 0; i < n && i < 16; i++) {