lz32/tests: Win64 printf format warning fixes.

This commit is contained in:
Michael Ploujnikov 2006-10-11 20:28:37 -04:00 committed by Alexandre Julliard
parent 3438512f53
commit 7e9e599d1e
2 changed files with 27 additions and 28 deletions

View File

@ -4,7 +4,6 @@ SRCDIR = @srcdir@
VPATH = @srcdir@
TESTDLL = lz32.dll
IMPORTS = lz32 kernel32
EXTRADEFS = -DWINE_NO_LONG_AS_INT
CTESTS = \
lzexpand_main.c

View File

@ -77,7 +77,7 @@ static void full_file_path_name_in_a_CWD(const char *src, char *dst, BOOL expect
char shortname[MAX_PATH];
retval = GetCurrentDirectoryA(MAX_PATH, dst);
ok(retval > 0, "GetCurrentDirectoryA returned %ld, GLE=%ld\n",
ok(retval > 0, "GetCurrentDirectoryA returned %d, GLE=%d\n",
retval, GetLastError());
if(dst[retval-1] != '\\')
/* Append backslash only when it's missing */
@ -87,7 +87,7 @@ static void full_file_path_name_in_a_CWD(const char *src, char *dst, BOOL expect
{
memcpy(shortname, dst, MAX_PATH);
retval = GetShortPathName(shortname, dst, MAX_PATH-1);
ok(retval > 0, "GetShortPathName returned %ld for '%s', GLE=%ld\n",
ok(retval > 0, "GetShortPathName returned %d for '%s', GLE=%d\n",
retval, dst, GetLastError());
}
}
@ -102,7 +102,7 @@ static void create_file(char *fname)
ok(file >= 0, "LZOpenFileA failed to create '%s'\n", fname);
LZClose(file);
retval = GetFileAttributesA(fname);
ok(retval != INVALID_FILE_ATTRIBUTES, "GetFileAttributesA('%s'): error %ld\n", ofs.szPathName, GetLastError());
ok(retval != INVALID_FILE_ATTRIBUTES, "GetFileAttributesA('%s'): error %d\n", ofs.szPathName, GetLastError());
}
static void delete_file(char *fname)
@ -155,7 +155,7 @@ static void test_LZOpenFileA_existing_compressed(void)
LZClose(file);
} else { /* Win9x */
ok(GetLastError() == ERROR_FILE_NOT_FOUND,
"GetLastError() returns %ld\n", GetLastError());
"GetLastError() returns %d\n", GetLastError());
ok(test.cBytes == 0xA5,
"LZOpenFileA set test.cBytes to %d\n", test.cBytes);
ok(test.nErrCode == ERROR_FILE_NOT_FOUND,
@ -184,7 +184,7 @@ static void test_LZOpenFileA_existing_compressed(void)
LZClose(file);
} else { /* Win9x */
ok(GetLastError() == ERROR_FILE_NOT_FOUND,
"GetLastError() returns %ld\n", GetLastError());
"GetLastError() returns %d\n", GetLastError());
todo_wine
ok(test.cBytes == 0xA5,
"LZOpenFileA set test.cBytes to %d\n", test.cBytes);
@ -215,7 +215,7 @@ static void test_LZOpenFileA_existing_compressed(void)
LZClose(file);
} else { /* Win9x */
ok(GetLastError() == ERROR_FILE_NOT_FOUND,
"GetLastError() returns %ld\n", GetLastError());
"GetLastError() returns %d\n", GetLastError());
ok(test.cBytes == 0xA5,
"LZOpenFileA set test.cBytes to %d\n", test.cBytes);
ok(test.nErrCode == ERROR_FILE_NOT_FOUND,
@ -271,7 +271,7 @@ static void test_LZOpenFileA_nonexisting_compressed(void)
ok(file == LZERROR_BADINHANDLE,
"LZOpenFileA succeeded on nonexistent file\n");
ok(GetLastError() == ERROR_FILE_NOT_FOUND,
"GetLastError() returns %ld\n", GetLastError());
"GetLastError() returns %d\n", GetLastError());
todo_wine
ok(test.cBytes == 0xA5,
"LZOpenFileA set test.cBytes to %d\n", test.cBytes);
@ -292,7 +292,7 @@ static void test_LZOpenFileA_nonexisting_compressed(void)
ok(file == LZERROR_BADINHANDLE,
"LZOpenFileA succeeded on nonexistent file\n");
ok(GetLastError() == ERROR_FILE_NOT_FOUND,
"GetLastError() returns %ld\n", GetLastError());
"GetLastError() returns %d\n", GetLastError());
todo_wine
ok(test.cBytes == 0xA5,
"LZOpenFileA set test.cBytes to %d\n", test.cBytes);
@ -313,7 +313,7 @@ static void test_LZOpenFileA_nonexisting_compressed(void)
ok(file == LZERROR_BADINHANDLE,
"LZOpenFileA succeeded on nonexistent file\n");
ok(GetLastError() == ERROR_FILE_NOT_FOUND,
"GetLastError() returns %ld\n", GetLastError());
"GetLastError() returns %d\n", GetLastError());
todo_wine
ok(test.cBytes == 0xA5,
"LZOpenFileA set test.cBytes to %d\n", test.cBytes);
@ -334,7 +334,7 @@ static void test_LZOpenFileA_nonexisting_compressed(void)
ok(file == LZERROR_BADINHANDLE,
"LZOpenFileA succeeded on nonexistent file\n");
ok(GetLastError() == ERROR_FILE_NOT_FOUND,
"GetLastError() returns %ld\n", GetLastError());
"GetLastError() returns %d\n", GetLastError());
todo_wine
ok(test.cBytes == 0xA5,
"LZOpenFileA set test.cBytes to %d\n", test.cBytes);
@ -361,7 +361,7 @@ static void test_LZOpenFileA(void)
ok(file == LZERROR_BADINHANDLE,
"LZOpenFileA succeeded on nonexistent file\n");
ok(GetLastError() == ERROR_FILE_NOT_FOUND,
"GetLastError() returns %ld\n", GetLastError());
"GetLastError() returns %d\n", GetLastError());
LZClose(file);
memset(&test, 0xA5, sizeof(test));
@ -380,7 +380,7 @@ static void test_LZOpenFileA(void)
LZClose(file);
retval = GetFileAttributesA(filename_);
ok(retval != INVALID_FILE_ATTRIBUTES, "GetFileAttributesA: error %ld\n",
ok(retval != INVALID_FILE_ATTRIBUTES, "GetFileAttributesA: error %d\n",
GetLastError());
/* Check various opening options: */
@ -480,7 +480,7 @@ static void test_LZRead(void)
file = CreateFileA(filename_, GENERIC_WRITE, 0, NULL, CREATE_NEW, 0, 0);
ok(file != INVALID_HANDLE_VALUE, "Could not create test file\n");
retok = WriteFile(file, compressed_file, compressed_file_size, &ret, 0);
ok( retok, "WriteFile: error %ld\n", GetLastError());
ok( retok, "WriteFile: error %d\n", GetLastError());
ok(ret == compressed_file_size, "Wrote wrong number of bytes with WriteFile?\n");
CloseHandle(file);
@ -503,7 +503,7 @@ static void test_LZRead(void)
LZClose(cfile);
ret = DeleteFileA(filename_);
ok(ret, "DeleteFileA: error %ld\n", GetLastError());
ok(ret, "DeleteFileA: error %d\n", GetLastError());
}
static void test_LZCopy(void)
@ -517,9 +517,9 @@ static void test_LZCopy(void)
/* Create the compressed file. */
file = CreateFileA(filename_, GENERIC_WRITE, 0, NULL, CREATE_NEW, 0, 0);
ok(file != INVALID_HANDLE_VALUE,
"CreateFileA: error %ld\n", GetLastError());
"CreateFileA: error %d\n", GetLastError());
retok = WriteFile(file, compressed_file, compressed_file_size, &ret, 0);
ok( retok, "WriteFile error %ld\n", GetLastError());
ok( retok, "WriteFile error %d\n", GetLastError());
ok(ret == compressed_file_size, "Wrote wrong number of bytes\n");
CloseHandle(file);
@ -536,19 +536,19 @@ static void test_LZCopy(void)
file = CreateFileA(filename2, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, 0);
ok(file != INVALID_HANDLE_VALUE,
"CreateFileA: error %ld\n", GetLastError());
"CreateFileA: error %d\n", GetLastError());
retok = ReadFile(file, buf, uncompressed_data_size*2, &ret, 0);
ok( retok && ret == uncompressed_data_size, "ReadFile: error %ld\n", GetLastError());
ok( retok && ret == uncompressed_data_size, "ReadFile: error %d\n", GetLastError());
/* Compare what we read with what we think we should read. */
ok(!memcmp(buf, uncompressed_data, uncompressed_data_size),
"buffer contents mismatch\n");
CloseHandle(file);
ret = DeleteFileA(filename_);
ok(ret, "DeleteFileA: error %ld\n", GetLastError());
ok(ret, "DeleteFileA: error %d\n", GetLastError());
ret = DeleteFileA(filename2);
ok(ret, "DeleteFileA: error %ld\n", GetLastError());
ok(ret, "DeleteFileA: error %d\n", GetLastError());
}
static void create_fileW(WCHAR *fnameW)
@ -561,7 +561,7 @@ static void create_fileW(WCHAR *fnameW)
ok(file >= 0, "LZOpenFileW failed on creation\n");
LZClose(file);
retval = GetFileAttributesW(fnameW);
ok(retval != INVALID_FILE_ATTRIBUTES, "GetFileAttributesW('%s'): error %ld\n", ofs.szPathName, GetLastError());
ok(retval != INVALID_FILE_ATTRIBUTES, "GetFileAttributesW('%s'): error %d\n", ofs.szPathName, GetLastError());
}
static void delete_fileW(WCHAR *fnameW)
@ -684,7 +684,7 @@ static void test_LZOpenFileW_nonexisting_compressed(void)
ok(file == LZERROR_BADINHANDLE,
"LZOpenFileW succeeded on nonexistent file\n");
ok(GetLastError() == ERROR_FILE_NOT_FOUND,
"GetLastError() returns %ld\n", GetLastError());
"GetLastError() returns %d\n", GetLastError());
todo_wine
ok(test.cBytes == 0xA5,
"LZOpenFileW set test.cBytes to %d\n", test.cBytes);
@ -704,7 +704,7 @@ static void test_LZOpenFileW_nonexisting_compressed(void)
ok(file == LZERROR_BADINHANDLE,
"LZOpenFileW succeeded on nonexistent file\n");
ok(GetLastError() == ERROR_FILE_NOT_FOUND,
"GetLastError() returns %ld\n", GetLastError());
"GetLastError() returns %d\n", GetLastError());
todo_wine
ok(test.cBytes == 0xA5,
"LZOpenFileW set test.cBytes to %d\n", test.cBytes);
@ -724,7 +724,7 @@ static void test_LZOpenFileW_nonexisting_compressed(void)
ok(file == LZERROR_BADINHANDLE,
"LZOpenFileW succeeded on nonexistent file\n");
ok(GetLastError() == ERROR_FILE_NOT_FOUND,
"GetLastError() returns %ld\n", GetLastError());
"GetLastError() returns %d\n", GetLastError());
todo_wine
ok(test.cBytes == 0xA5,
"LZOpenFileW set test.cBytes to %d\n", test.cBytes);
@ -744,7 +744,7 @@ static void test_LZOpenFileW_nonexisting_compressed(void)
ok(file == LZERROR_BADINHANDLE,
"LZOpenFileW succeeded on nonexistent file\n");
ok(GetLastError() == ERROR_FILE_NOT_FOUND,
"GetLastError() returns %ld\n", GetLastError());
"GetLastError() returns %d\n", GetLastError());
todo_wine
ok(test.cBytes == 0xA5,
"LZOpenFileW set test.cBytes to %d\n", test.cBytes);
@ -767,7 +767,7 @@ static void test_LZOpenFileW(void)
/* Check for nonexistent file. */
file = LZOpenFileW(badfilenameW, &test, OF_READ);
ok(GetLastError() == ERROR_FILE_NOT_FOUND || GetLastError() == ERROR_CALL_NOT_IMPLEMENTED,
"GetLastError() returns %ld\n", GetLastError());
"GetLastError() returns %d\n", GetLastError());
if(GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
{
trace("LZOpenFileW call not implemented, skipping rest of the test\n");
@ -792,7 +792,7 @@ static void test_LZOpenFileW(void)
LZClose(file);
retval = GetFileAttributesW(filenameW_);
ok(retval != INVALID_FILE_ATTRIBUTES, "GetFileAttributes: error %ld\n",
ok(retval != INVALID_FILE_ATTRIBUTES, "GetFileAttributes: error %d\n",
GetLastError());
/* Check various opening options: */