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
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;
}
......
......@@ -1830,8 +1830,7 @@ static void test_decodeBits(DWORD dwEncoding)
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(DWORD dwEncoding)
{
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",
......
......@@ -340,7 +340,7 @@ static HRESULT WINAPI IDirectMusicTempoTrack_IPersistStream_Load (LPPERSISTSTREA
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;
......
......@@ -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 @@ 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);
}
ok(!inserted || inserted->ulId==item->ulId, "find got wrong item\n");
if (inserted)
......
......@@ -106,9 +106,9 @@ static void ClassTest(HINSTANCE hInstance, BOOL global)
{
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 */
......
......@@ -208,7 +208,6 @@ static inline void print_datadirectory(DWORD n, const IMAGE_DATA_DIRECTORY *dire
{
unsigned i;
printf("Data Directory\n");
printf("%d\n", n * sizeof(IMAGE_DATA_DIRECTORY));
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