Commit 6a9222fc authored by Alexandre Julliard's avatar Alexandre Julliard

Fixed some printf warnings caused by using sizeof.

parent 181cf8b6
...@@ -422,8 +422,8 @@ static BOOL service_handle_start(HANDLE pipe, service_data *service, DWORD count ...@@ -422,8 +422,8 @@ static BOOL service_handle_start(HANDLE pipe, service_data *service, DWORD count
r = ReadFile(pipe, args, count*sizeof(WCHAR), &read, NULL); r = ReadFile(pipe, args, count*sizeof(WCHAR), &read, NULL);
if (!r || count!=read/sizeof(WCHAR) || args[count-1]) if (!r || count!=read/sizeof(WCHAR) || args[count-1])
{ {
ERR("pipe read failed r = %d count = %d/%d args[n-1]=%s\n", ERR("pipe read failed r = %d count = %d read = %d args[n-1]=%s\n",
r, count, read/sizeof(WCHAR), debugstr_wn(args, count)); r, count, read, debugstr_wn(args, count));
goto end; goto end;
} }
......
...@@ -1830,8 +1830,7 @@ static void test_decodeBits(DWORD dwEncoding) ...@@ -1830,8 +1830,7 @@ static void test_decodeBits(DWORD dwEncoding)
CRYPT_BIT_BLOB *blob; CRYPT_BIT_BLOB *blob;
ok(bufSize >= sizeof(CRYPT_BIT_BLOB) + bits[i].cbDecoded, ok(bufSize >= sizeof(CRYPT_BIT_BLOB) + bits[i].cbDecoded,
"Got unexpected size %d, expected >= %d\n", bufSize, "Got unexpected size %d\n", bufSize);
sizeof(CRYPT_BIT_BLOB) + bits[i].cbDecoded);
blob = (CRYPT_BIT_BLOB *)buf; blob = (CRYPT_BIT_BLOB *)buf;
ok(blob->cbData == bits[i].cbDecoded, ok(blob->cbData == bits[i].cbDecoded,
"Got unexpected length %d, expected %d\n", blob->cbData, "Got unexpected length %d, expected %d\n", blob->cbData,
...@@ -4081,8 +4080,7 @@ static void test_decodeCRLToBeSigned(DWORD dwEncoding) ...@@ -4081,8 +4080,7 @@ static void test_decodeCRLToBeSigned(DWORD dwEncoding)
{ {
CRL_INFO *info = (CRL_INFO *)buf; CRL_INFO *info = (CRL_INFO *)buf;
ok(size >= sizeof(CRL_INFO), "Expected size at least %d, got %d\n", ok(size >= sizeof(CRL_INFO), "Got size %d\n", size);
sizeof(CRL_INFO), size);
ok(info->cCRLEntry == 209, "Expected 209 CRL entries, got %d\n", ok(info->cCRLEntry == 209, "Expected 209 CRL entries, got %d\n",
info->cCRLEntry); info->cCRLEntry);
ok(info->cExtension == 0, "Expected 0 extensions, got %d\n", ok(info->cExtension == 0, "Expected 0 extensions, got %d\n",
......
...@@ -340,7 +340,7 @@ static HRESULT WINAPI IDirectMusicTempoTrack_IPersistStream_Load (LPPERSISTSTREA ...@@ -340,7 +340,7 @@ static HRESULT WINAPI IDirectMusicTempoTrack_IPersistStream_Load (LPPERSISTSTREA
IStream_Read (pStm, &StreamSize, sizeof(DWORD), NULL); IStream_Read (pStm, &StreamSize, sizeof(DWORD), NULL);
StreamSize -= sizeof(DWORD); StreamSize -= sizeof(DWORD);
StreamCount = 0; 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 { do {
IStream_Read (pStm, &item, sizeof(item), NULL); IStream_Read (pStm, &item, sizeof(item), NULL);
++nItem; ++nItem;
......
...@@ -312,8 +312,7 @@ static void test_CList(void) ...@@ -312,8 +312,7 @@ static void test_CList(void)
else if (inserted) else if (inserted)
{ {
ok(inserted->ulSize==item->ulSize+sizeof(SHLWAPI_CLIST), ok(inserted->ulSize==item->ulSize+sizeof(SHLWAPI_CLIST),
"id %d size wrong (%d!=%d)\n", inserted->ulId, inserted->ulSize, "id %d wrong size %d\n", inserted->ulId, inserted->ulSize);
item->ulSize+sizeof(SHLWAPI_CLIST));
} }
if (inserted) if (inserted)
{ {
...@@ -437,8 +436,7 @@ static void test_CList(void) ...@@ -437,8 +436,7 @@ static void test_CList(void)
else if (inserted) else if (inserted)
{ {
ok(inserted->ulSize==item->ulSize+sizeof(SHLWAPI_CLIST), ok(inserted->ulSize==item->ulSize+sizeof(SHLWAPI_CLIST),
"id %d size wrong (%d!=%d)\n", inserted->ulId, inserted->ulSize, "id %d wrong size %d\n", inserted->ulId, inserted->ulSize);
item->ulSize+sizeof(SHLWAPI_CLIST));
} }
ok(!inserted || inserted->ulId==item->ulId, "find got wrong item\n"); ok(!inserted || inserted->ulId==item->ulId, "find got wrong item\n");
if (inserted) if (inserted)
......
...@@ -106,9 +106,9 @@ static void ClassTest(HINSTANCE hInstance, BOOL global) ...@@ -106,9 +106,9 @@ static void ClassTest(HINSTANCE hInstance, BOOL global)
{ {
SetLastError(0); SetLastError(0);
ok(!SetClassLongW(hTestWnd,i*sizeof(DWORD),i+1), 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(), ok(!GetLastError(),
"SetClassLongW(%d) failed!\n",i*sizeof(DWORD)); "SetClassLongW(%d) failed!\n",i);
} }
/* test values of valid classwords that we set */ /* test values of valid classwords that we set */
......
...@@ -208,7 +208,6 @@ static inline void print_datadirectory(DWORD n, const IMAGE_DATA_DIRECTORY *dire ...@@ -208,7 +208,6 @@ static inline void print_datadirectory(DWORD n, const IMAGE_DATA_DIRECTORY *dire
{ {
unsigned i; unsigned i;
printf("Data Directory\n"); printf("Data Directory\n");
printf("%d\n", n * sizeof(IMAGE_DATA_DIRECTORY));
for (i = 0; i < n && i < 16; i++) for (i = 0; i < n && i < 16; i++)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment