From 7e9e599d1e48966bce1c19c820e2089607a56aa3 Mon Sep 17 00:00:00 2001 From: Michael Ploujnikov Date: Wed, 11 Oct 2006 20:28:37 -0400 Subject: [PATCH] lz32/tests: Win64 printf format warning fixes. --- dlls/lz32/tests/Makefile.in | 1 - dlls/lz32/tests/lzexpand_main.c | 54 ++++++++++++++++----------------- 2 files changed, 27 insertions(+), 28 deletions(-) diff --git a/dlls/lz32/tests/Makefile.in b/dlls/lz32/tests/Makefile.in index def3cf3b4f..905a4ed587 100644 --- a/dlls/lz32/tests/Makefile.in +++ b/dlls/lz32/tests/Makefile.in @@ -4,7 +4,6 @@ SRCDIR = @srcdir@ VPATH = @srcdir@ TESTDLL = lz32.dll IMPORTS = lz32 kernel32 -EXTRADEFS = -DWINE_NO_LONG_AS_INT CTESTS = \ lzexpand_main.c diff --git a/dlls/lz32/tests/lzexpand_main.c b/dlls/lz32/tests/lzexpand_main.c index 6c5f150b49..c6ad4798f5 100644 --- a/dlls/lz32/tests/lzexpand_main.c +++ b/dlls/lz32/tests/lzexpand_main.c @@ -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: */