Author: tfaber
Date: Wed Mar 26 12:07:25 2014
New Revision: 62568
URL: 
http://svn.reactos.org/svn/reactos?rev=62568&view=rev
Log:
[NTDLL_APITEST]
- Fix -Wformat warnings and enable -Wformat where possible
Modified:
    trunk/rostests/apitests/ntdll/CMakeLists.txt
    trunk/rostests/apitests/ntdll/NtProtectVirtualMemory.c
    trunk/rostests/apitests/ntdll/RtlDosSearchPath_U.c
    trunk/rostests/apitests/ntdll/RtlDosSearchPath_Ustr.c
    trunk/rostests/apitests/ntdll/RtlGetFullPathName_U.c
    trunk/rostests/apitests/ntdll/RtlGetFullPathName_Ustr.c
    trunk/rostests/apitests/ntdll/RtlGetFullPathName_UstrEx.c
    trunk/rostests/apitests/ntdll/RtlGetLengthWithoutTrailingPathSeperators.c
    trunk/rostests/apitests/ntdll/RtlMemoryStream.c
    trunk/rostests/apitests/ntdll/Timer.c
Modified: trunk/rostests/apitests/ntdll/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/ntdll/CMakeLists…
==============================================================================
--- trunk/rostests/apitests/ntdll/CMakeLists.txt        [iso-8859-1] (original)
+++ trunk/rostests/apitests/ntdll/CMakeLists.txt        [iso-8859-1] Wed Mar 26 12:07:25
2014
@@ -36,9 +36,7 @@
 add_importlibs(ntdll_apitest msvcrt advapi32 kernel32 ntdll)
 if(NOT MSVC)
-    # FIXME: 
http://www.cmake.org/Bug/view.php?id=12998
-    #add_target_compile_flags(ntdll_apitest "-Wno-format")
-    set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS
"-Wno-format")
+    set_source_files_properties(RtlGetFullPathName_UstrEx.c PROPERTIES COMPILE_FLAGS
"-Wno-format")
 endif()
 add_cd_file(TARGET ntdll_apitest DESTINATION reactos/bin FOR all)
Modified: trunk/rostests/apitests/ntdll/NtProtectVirtualMemory.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/ntdll/NtProtectV…
==============================================================================
--- trunk/rostests/apitests/ntdll/NtProtectVirtualMemory.c      [iso-8859-1] (original)
+++ trunk/rostests/apitests/ntdll/NtProtectVirtualMemory.c      [iso-8859-1] Wed Mar 26
12:07:25 2014
@@ -55,7 +55,7 @@
         PAGE_READONLY,
         &oldProtection);
     ok(NT_SUCCESS(status), "NtProtectVirtualMemory failed.\n");
-    ok(oldProtection == PAGE_READWRITE, "Expected PAGE_READWRITE, got %08x.\n",
oldProtection);
+    ok(oldProtection == PAGE_READWRITE, "Expected PAGE_READWRITE, got
%08lx.\n", oldProtection);
     /* Try writing it */
     StartSeh()
@@ -76,7 +76,7 @@
         PAGE_NOACCESS,
         &oldProtection);
     ok(NT_SUCCESS(status), "NtProtectVirtualMemory failed.\n");
-    ok(oldProtection == PAGE_READONLY, "Expected PAGE_READONLY, got %08x.\n",
oldProtection);
+    ok(oldProtection == PAGE_READONLY, "Expected PAGE_READONLY, got %08lx.\n",
oldProtection);
     /* Try writing it */
     StartSeh()
Modified: trunk/rostests/apitests/ntdll/RtlDosSearchPath_U.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/ntdll/RtlDosSear…
==============================================================================
--- trunk/rostests/apitests/ntdll/RtlDosSearchPath_U.c  [iso-8859-1] (original)
+++ trunk/rostests/apitests/ntdll/RtlDosSearchPath_U.c  [iso-8859-1] Wed Mar 26 12:07:25
2014
@@ -205,7 +205,7 @@
     ok(Success, "DeleteFile failed, test might leave stale file\n");
     swprintf(FileName, L"C:\\%ls\\ThisFolderExists", CustomPath);
     Success = RemoveDirectoryW(FileName);
-    ok(Success, "RemoveDirectory failed %(lu), test might leave stale
directory\n", GetLastError());
+    ok(Success, "RemoveDirectory failed (%lu), test might leave stale
directory\n", GetLastError());
     swprintf(FileName, L"C:\\%ls", CustomPath);
     Success = RemoveDirectoryW(FileName);
     ok(Success, "RemoveDirectory failed (%lu), test might leave stale
directory\n", GetLastError());
Modified: trunk/rostests/apitests/ntdll/RtlDosSearchPath_Ustr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/ntdll/RtlDosSear…
==============================================================================
--- trunk/rostests/apitests/ntdll/RtlDosSearchPath_Ustr.c       [iso-8859-1] (original)
+++ trunk/rostests/apitests/ntdll/RtlDosSearchPath_Ustr.c       [iso-8859-1] Wed Mar 26
12:07:25 2014
@@ -128,8 +128,8 @@
     ok_eq_ustr(&CallerBuffer, &EmptyString);
     ok_eq_ustr(&DynamicString, &EmptyString);
     ok_eq_pointer(FullNameOut, NULL);
-    ok_eq_ulong(FilePartSize, 0);
-    ok_eq_ulong(LengthNeeded, 0);
+    ok_eq_ulong(FilePartSize, 0UL);
+    ok_eq_ulong(LengthNeeded, 0UL);
     /* Everything except FileNameString */
     RtlInitUnicodeString(&PathString, NULL);
@@ -156,8 +156,8 @@
     ok_eq_ustr(&CallerBuffer, &EmptyString);
     ok_eq_ustr(&DynamicString, &EmptyString);
     ok_eq_pointer(FullNameOut, NULL);
-    ok_eq_ulong(FilePartSize, 0);
-    ok_eq_ulong(LengthNeeded, 0);
+    ok_eq_ulong(FilePartSize, 0UL);
+    ok_eq_ulong(LengthNeeded, 0UL);
     /* Passing CallerBuffer and DynamicString, but not FullNameOut is invalid */
     RtlInitUnicodeString(&PathString, NULL);
@@ -185,8 +185,8 @@
     ok_eq_ustr(&ExtensionString, &EmptyString);
     ok_eq_ustr(&CallerBuffer, &EmptyString);
     ok_eq_ustr(&DynamicString, &EmptyString);
-    ok_eq_ulong(FilePartSize, 0);
-    ok_eq_ulong(LengthNeeded, 0);
+    ok_eq_ulong(FilePartSize, 0UL);
+    ok_eq_ulong(LengthNeeded, 0UL);
     /* All parameters given */
     RtlInitUnicodeString(&PathString, NULL);
@@ -215,6 +215,6 @@
     ok_eq_ustr(&CallerBuffer, &EmptyString);
     ok_eq_ustr(&DynamicString, &EmptyString);
     ok_eq_pointer(FullNameOut, NULL);
-    ok_eq_ulong(FilePartSize, 0);
-    ok_eq_ulong(LengthNeeded, 0);
+    ok_eq_ulong(FilePartSize, 0UL);
+    ok_eq_ulong(LengthNeeded, 0UL);
 }
Modified: trunk/rostests/apitests/ntdll/RtlGetFullPathName_U.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/ntdll/RtlGetFull…
==============================================================================
--- trunk/rostests/apitests/ntdll/RtlGetFullPathName_U.c        [iso-8859-1] (original)
+++ trunk/rostests/apitests/ntdll/RtlGetFullPathName_U.c        [iso-8859-1] Wed Mar 26
12:07:25 2014
@@ -155,7 +155,7 @@
                     ExpectedPathName[2] = UNICODE_NULL;
                 break;
             default:
-                skip(0, "Invalid test!\n");
+                skip("Invalid test!\n");
                 continue;
         }
         wcscat(ExpectedPathName, TestCases[i].FullPathName);
@@ -207,7 +207,7 @@
                 break;
             }
             default:
-                skip(0, "Invalid test!\n");
+                skip("Invalid test!\n");
                 continue;
         }
         ExpectedFilePartSize += TestCases[i].FilePartSize;
Modified: trunk/rostests/apitests/ntdll/RtlGetFullPathName_Ustr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/ntdll/RtlGetFull…
==============================================================================
--- trunk/rostests/apitests/ntdll/RtlGetFullPathName_Ustr.c     [iso-8859-1] (original)
+++ trunk/rostests/apitests/ntdll/RtlGetFullPathName_Ustr.c     [iso-8859-1] Wed Mar 26
12:07:25 2014
@@ -215,7 +215,7 @@
                 break;
             }
             default:
-                skip(0, "Invalid test!\n");
+                skip("Invalid test!\n");
                 continue;
         }
         wcscat(ExpectedPathName, TestCases[i].FullPathName);
@@ -269,7 +269,7 @@
                 break;
             }
             default:
-                skip(0, "Invalid test!\n");
+                skip("Invalid test!\n");
                 continue;
         }
         ExpectedFilePartSize += TestCases[i].FilePartSize;
@@ -288,7 +288,7 @@
         ok(PathType.Type == TestCases[i].PathType, "PathType = %d, expected
%d\n", PathType.Type, TestCases[i].PathType);
         ok(PathType.Unknown == 1234 ||
             broken(PathType.Unknown == 0) ||
-            broken(PathType.Unknown == 32), "Unknown = %d\n",
PathType.Unknown);
+            broken(PathType.Unknown == 32), "Unknown = %lu\n",
PathType.Unknown);
     }
 }
@@ -339,7 +339,7 @@
     EndSeh(STATUS_ACCESS_VIOLATION);
     ok(PathType.Type == RtlPathTypeUnknown, "PathType = %d\n", PathType.Type);
     ok(PathType.Unknown == 1234 ||
-        broken(PathType.Unknown == 0) /* Win7 */, "Unknown = %d\n",
PathType.Unknown);
+        broken(PathType.Unknown == 0) /* Win7 */, "Unknown = %lu\n",
PathType.Unknown);
     /* check what else is initialized before it crashes */
     PathType.Type = RtlPathTypeNotSet;
@@ -354,7 +354,7 @@
         broken(ShortName == NULL) /* Win7 */, "ShortName = %p\n", ShortName);
     ok(PathType.Type == RtlPathTypeUnknown, "PathType = %d\n", PathType.Type);
     ok(PathType.Unknown == 1234 ||
-       broken(PathType.Unknown == 0) /* Win7 */, "Unknown = %d\n",
PathType.Unknown);
+       broken(PathType.Unknown == 0) /* Win7 */, "Unknown = %lu\n",
PathType.Unknown);
     RtlInitUnicodeString(&FileName, L"");
     TempString = FileName;
@@ -380,7 +380,7 @@
     ok_eq_ustr(&FileName, &TempString);
     ok(PathType.Type == RtlPathTypeUnknown, "PathType = %d\n", PathType.Type);
     ok(PathType.Unknown == 1234 ||
-       broken(PathType.Unknown == 0) /* Win7 */, "Unknown = %d\n",
PathType.Unknown);
+       broken(PathType.Unknown == 0) /* Win7 */, "Unknown = %lu\n",
PathType.Unknown);
     RtlInitUnicodeString(&FileName, L"");
     TempString = FileName;
@@ -393,7 +393,7 @@
     ok_eq_ustr(&FileName, &TempString);
     ok(PathType.Type == RtlPathTypeUnknown, "PathType = %d\n", PathType.Type);
     ok(PathType.Unknown == 1234 ||
-       broken(PathType.Unknown == 0) /* Win7 */, "Unknown = %d\n",
PathType.Unknown);
+       broken(PathType.Unknown == 0) /* Win7 */, "Unknown = %lu\n",
PathType.Unknown);
     /* Show that NameInvalid is indeed BOOLEAN */
     RtlInitUnicodeString(&FileName, L"");
@@ -408,7 +408,7 @@
     ok_eq_ustr(&FileName, &TempString);
     ok(PathType.Type == RtlPathTypeUnknown, "PathType = %d\n", PathType.Type);
     ok(PathType.Unknown == 1234 ||
-       broken(PathType.Unknown == 0) /* Win7 */, "Unknown = %d\n",
PathType.Unknown);
+       broken(PathType.Unknown == 0) /* Win7 */, "Unknown = %lu\n",
PathType.Unknown);
     ok(NameInvalidArray[0] == FALSE, "NameInvalid = %u\n",
NameInvalidArray[0]);
     Okay = CheckBuffer(NameInvalidArray + 1, sizeof(NameInvalidArray) -
sizeof(NameInvalidArray[0]), 0x55);
     ok(Okay, "CheckBuffer failed\n");
@@ -425,7 +425,7 @@
     ok_eq_ustr(&FileName, &TempString);
     ok(PathType.Type == RtlPathTypeDriveAbsolute, "PathType = %d\n",
PathType.Type);
     ok(PathType.Unknown == 1234 ||
-       broken(PathType.Unknown == 0) /* Win7 */, "Unknown = %d\n",
PathType.Unknown);
+       broken(PathType.Unknown == 0) /* Win7 */, "Unknown = %lu\n",
PathType.Unknown);
     /* check the actual functionality with different paths */
     RunTestCases();
Modified: trunk/rostests/apitests/ntdll/RtlGetFullPathName_UstrEx.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/ntdll/RtlGetFull…
==============================================================================
--- trunk/rostests/apitests/ntdll/RtlGetFullPathName_UstrEx.c   [iso-8859-1] (original)
+++ trunk/rostests/apitests/ntdll/RtlGetFullPathName_UstrEx.c   [iso-8859-1] Wed Mar 26
12:07:25 2014
@@ -207,7 +207,7 @@
                 break;
             }
             default:
-                skip(0, "Invalid test!\n");
+                skip("Invalid test!\n");
                 continue;
         }
         wcscat(ExpectedPathName, TestCases[i].FullPathName);
@@ -268,7 +268,7 @@
                 break;
             }
             default:
-                skip(0, "Invalid test!\n");
+                skip("Invalid test!\n");
                 continue;
         }
         ExpectedFilePartSize += TestCases[i].FilePartSize;
Modified: trunk/rostests/apitests/ntdll/RtlGetLengthWithoutTrailingPathSeperators.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/ntdll/RtlGetLeng…
==============================================================================
--- trunk/rostests/apitests/ntdll/RtlGetLengthWithoutTrailingPathSeperators.c
[iso-8859-1] (original)
+++ trunk/rostests/apitests/ntdll/RtlGetLengthWithoutTrailingPathSeperators.c
[iso-8859-1] Wed Mar 26 12:07:25 2014
@@ -110,11 +110,11 @@
         EndSeh(STATUS_SUCCESS);
         ok(res == pentry->expected_result,
-            "Unexpected result 0x%08x (expected 0x%08x) in [%d:%d]\n",
+            "Unexpected result 0x%08lx (expected 0x%08lx) in [%d:%d]\n",
             res, pentry->expected_result,
             i, pentry->line);
         ok(len == pentry->expected_output,
-            "Unexpected length %d (expected %d) in [%d:%d]\n",
+            "Unexpected length %lu (expected %lu) in [%d:%d]\n",
             len, pentry->expected_output,
             i, pentry->line);
     }
@@ -128,10 +128,10 @@
     EndSeh(STATUS_SUCCESS);
     ok(res == STATUS_INVALID_PARAMETER,
-        "Unexpected result 0x%08x (expected STATUS_INVALID_PARAMETER)\n",
+        "Unexpected result 0x%08lx (expected STATUS_INVALID_PARAMETER)\n",
         res);
     ok(len == 0,
-        "Unexpected length %08x (expected 0)\n",
+        "Unexpected length %08lx (expected 0)\n",
         len);
     StartSeh()
@@ -139,7 +139,7 @@
     EndSeh(STATUS_SUCCESS);
     ok(res == STATUS_INVALID_PARAMETER,
-        "Unexpected result 0x%08x (expected STATUS_INVALID_PARAMETER)\n",
+        "Unexpected result 0x%08lx (expected STATUS_INVALID_PARAMETER)\n",
         res);
     StartSeh()
@@ -147,7 +147,7 @@
     EndSeh(STATUS_SUCCESS);
     ok(res == STATUS_INVALID_PARAMETER,
-        "Unexpected result 0x%08x (expected STATUS_INVALID_PARAMETER)\n",
+        "Unexpected result 0x%08lx (expected STATUS_INVALID_PARAMETER)\n",
         res);
     for(i = 0; i < 32; i++)
@@ -159,11 +159,11 @@
         EndSeh(STATUS_SUCCESS);
         ok(res == STATUS_INVALID_PARAMETER,
-            "Unexpected result 0x%08x (expected STATUS_INVALID_PARAMETER)\n",
+            "Unexpected result 0x%08lx (expected STATUS_INVALID_PARAMETER)\n",
             res);
         ok(len == 0,
-            "Unexpected length %08x (expected 0)\n",
+            "Unexpected length %08lx (expected 0)\n",
             len);
     }
@@ -174,10 +174,10 @@
     EndSeh(STATUS_SUCCESS);
     ok(res == STATUS_INVALID_PARAMETER,
-        "Unexpected result 0x%08x (expected STATUS_INVALID_PARAMETER)\n",
+        "Unexpected result 0x%08lx (expected STATUS_INVALID_PARAMETER)\n",
         res);
     ok(len == 0,
-        "Unexpected length %08x (expected 0)\n",
+        "Unexpected length %08lx (expected 0)\n",
         len);
 }
Modified: trunk/rostests/apitests/ntdll/RtlMemoryStream.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/ntdll/RtlMemoryS…
==============================================================================
--- trunk/rostests/apitests/ntdll/RtlMemoryStream.c     [iso-8859-1] (original)
+++ trunk/rostests/apitests/ntdll/RtlMemoryStream.c     [iso-8859-1] Wed Mar 26 12:07:25
2014
@@ -37,8 +37,8 @@
     // Compare
     if (pold->Vtbl != pnew->Vtbl) {  if (equal) { trace("%s: \n", at);
equal = FALSE; } trace("Vtbl changed from %p to %p\n", pold->Vtbl,
pnew->Vtbl);}
-    if (pold->RefCount != pnew->RefCount) {  if (equal) { trace("%s: \n",
at); equal = FALSE; } trace("RefCount changed from %p to %p\n",
pold->RefCount, pnew->RefCount); }
-    if (pold->Unk1 != pnew->Unk1) {  if (equal) { trace("%s: \n", at);
equal = FALSE; } trace("Unk1 changed from %p to %p\n", pold->Unk1,
pnew->Unk1); }
+    if (pold->RefCount != pnew->RefCount) {  if (equal) { trace("%s: \n",
at); equal = FALSE; } trace("RefCount changed from %ld to %ld\n",
pold->RefCount, pnew->RefCount); }
+    if (pold->Unk1 != pnew->Unk1) {  if (equal) { trace("%s: \n", at);
equal = FALSE; } trace("Unk1 changed from %lu to %lu\n", pold->Unk1,
pnew->Unk1); }
     if (pold->Current != pnew->Current) {  if (equal) { trace("%s: \n",
at); equal = FALSE; } trace("Current changed from %p to %p\n", pold->Current,
pnew->Current); }
     if (pold->Start != pnew->Start) {  if (equal) { trace("%s: \n", at);
equal = FALSE; } trace("Start changed from %p to %p\n", pold->Start,
pnew->Start); }
     if (pold->End != pnew->End) {  if (equal) { trace("%s: \n", at);
equal = FALSE; } trace("End changed from %p to %p\n", pold->End,
pnew->End); }
@@ -96,7 +96,7 @@
     CompareStructsAndSaveForLater(&previous, &stream, "After init");
-    ok(stream.RefCount == 0, "RefCount has a wrong value: %d (expected %d).\n",
stream.RefCount, 0);
+    ok(stream.RefCount == 0, "RefCount has a wrong value: %ld (expected
%d).\n", stream.RefCount, 0);
     stream.Current = buffer2;
     stream.Start = buffer2;
@@ -106,39 +106,33 @@
     CompareStructsAndSaveForLater(&previous, &stream, "After
assigning");
     StartSeh()
-        res = IStream_QueryInterface((struct IStream*)&stream, NULL, NULL);
-        ok(res == E_INVALIDARG, "QueryInterface to IStream returned wrong hResult:
0x%08x.\n", res);
-        ok(stream.RefCount == 0, "RefCount has a wrong value: %d (expected
%d).\n", stream.RefCount, 2);
+        IStream_QueryInterface((struct IStream*)&stream, NULL, NULL);
     EndSeh(STATUS_ACCESS_VIOLATION);
     StartSeh()
-        res = IStream_QueryInterface((struct IStream*)&stream, &IID_IStream,
NULL);
-        ok(res == E_INVALIDARG, "QueryInterface to IStream returned wrong hResult:
0x%08x.\n", res);
-        ok(stream.RefCount == 1, "RefCount has a wrong value: %d (expected
%d).\n", stream.RefCount, 2);
+        IStream_QueryInterface((struct IStream*)&stream, &IID_IStream, NULL);
     EndSeh(STATUS_ACCESS_VIOLATION);
     StartSeh()
-        res = IStream_QueryInterface((struct IStream*)&stream, NULL,
(void**)&istream);
-        ok(res == E_INVALIDARG, "QueryInterface to IStream returned wrong hResult:
0x%08x.\n", res);
-        ok(stream.RefCount == 1, "RefCount has a wrong value: %d (expected
%d).\n", stream.RefCount, 2);
+        IStream_QueryInterface((struct IStream*)&stream, NULL, (void**)&istream);
     EndSeh(STATUS_ACCESS_VIOLATION);
     StartSeh()
         res = IStream_QueryInterface((struct IStream*)&stream, &IID_IStream,
(void**)&istream);
-        ok(res == S_OK, "QueryInterface to IStream returned wrong hResult:
0x%08x.\n", res);
-        ok(stream.RefCount == 2, "RefCount has a wrong value: %d (expected
%d).\n", stream.RefCount, 2);
+        ok(res == S_OK, "QueryInterface to IStream returned wrong hResult:
0x%08lx.\n", res);
+        ok(stream.RefCount == 2, "RefCount has a wrong value: %ld (expected
%d).\n", stream.RefCount, 2);
     EndSeh(STATUS_SUCCESS);
     CompareStructsAndSaveForLater(&previous, &stream, "After
QueryInterface");
     StartSeh()
         res = IStream_Stat(istream, NULL, 0);
-        ok(res == STG_E_INVALIDPOINTER, "Stat to IStream returned wrong hResult:
0x%08x.\n", res);
+        ok(res == STG_E_INVALIDPOINTER, "Stat to IStream returned wrong hResult:
0x%08lx.\n", res);
     EndSeh(STATUS_SUCCESS);
     StartSeh()
         res = IStream_Stat(istream, &stat, STATFLAG_NONAME);
-        ok(res == S_OK, "Stat to IStream returned wrong hResult: 0x%08x.\n",
res);
+        ok(res == S_OK, "Stat to IStream returned wrong hResult: 0x%08lx.\n",
res);
     EndSeh(STATUS_SUCCESS);
     ok(stream.Current == buffer2,
@@ -148,56 +142,56 @@
     ok(stream.End == buffer2 + sizeof(buffer2), "stream.End was changed
unexpectedly\n");
     ok(stat.cbSize.QuadPart == ((PUCHAR)stream.End - (PUCHAR)stream.Start),
-       "stat.cbSize has the wrong value %lld (expected %d)\n",
+       "stat.cbSize has the wrong value %I64u (expected %d)\n",
        stat.cbSize.QuadPart, (PUCHAR)stream.End - (PUCHAR)stream.Start);
     CompareStructsAndSaveForLater(&previous, &stream, "After Stat");
     StartSeh()
         res = IStream_AddRef(istream);
-        ok(res == 3, "AddRef to IStream returned wrong hResult: %d.\n", res);
+        ok(res == 3, "AddRef to IStream returned wrong hResult: %ld.\n", res);
     EndSeh(STATUS_SUCCESS);
     StartSeh()
         res = IStream_AddRef(istream);
-        ok(res == 4, "AddRef to IStream returned wrong hResult: %d.\n", res);
+        ok(res == 4, "AddRef to IStream returned wrong hResult: %ld.\n", res);
     EndSeh(STATUS_SUCCESS);
     StartSeh()
         res = IStream_Release(istream);
-        ok(res == 3, "Release to IStream returned wrong hResult: %d.\n", res);
+        ok(res == 3, "Release to IStream returned wrong hResult: %ld.\n", res);
     EndSeh(STATUS_SUCCESS);
     StartSeh()
         res = IStream_AddRef(istream);
-        ok(res == 4, "AddRef to IStream returned wrong hResult: %d.\n", res);
+        ok(res == 4, "AddRef to IStream returned wrong hResult: %ld.\n", res);
     EndSeh(STATUS_SUCCESS);
     StartSeh()
         res = IStream_Release(istream);
-        ok(res == 3, "Release to IStream returned wrong hResult: %d.\n", res);
+        ok(res == 3, "Release to IStream returned wrong hResult: %ld.\n", res);
     EndSeh(STATUS_SUCCESS);
     StartSeh()
         res = IStream_Release(istream);
-        ok(res == 2, "Release to IStream returned wrong hResult: %d.\n", res);
+        ok(res == 2, "Release to IStream returned wrong hResult: %ld.\n", res);
     EndSeh(STATUS_SUCCESS);
     CompareStructsAndSaveForLater(&previous, &stream, "After AddRef");
     StartSeh()
         res = IStream_Read(istream, NULL, 0, &bytesRead);
-        ok(res == S_OK, "Read to IStream returned wrong hResult: 0x%08x.\n",
res);
+        ok(res == S_OK, "Read to IStream returned wrong hResult: 0x%08lx.\n",
res);
     EndSeh(STATUS_SUCCESS);
     StartSeh()
         res = IStream_Read(istream, buffer, 40, NULL);
-        ok(res == S_OK, "Read to IStream returned wrong hResult: 0x%08x.\n",
res);
+        ok(res == S_OK, "Read to IStream returned wrong hResult: 0x%08lx.\n",
res);
     EndSeh(STATUS_ACCESS_VIOLATION);
     StartSeh()
         res = IStream_Read(istream, buffer + 40, 39, &bytesRead);
-        ok(res == S_OK, "Read to IStream returned wrong hResult: 0x%08x.\n",
res);
+        ok(res == S_OK, "Read to IStream returned wrong hResult: 0x%08lx.\n",
res);
     EndSeh(STATUS_SUCCESS);
     if (SUCCEEDED(res))
@@ -205,7 +199,7 @@
         bytesRead += 40;
         for (i = 0; i < bytesRead; i++)
         {
-            ok(buffer[i] == i, "Buffer[%d] contains a wrong number %d (expected
%d).\n", i, buffer[i], i);
+            ok(buffer[i] == i, "Buffer[%lu] contains a wrong number %u (expected
%lu).\n", i, buffer[i], i);
         }
     }
@@ -222,15 +216,15 @@
     StartSeh()
         move.QuadPart = -1;
         res = IStream_Seek(istream, move, STREAM_SEEK_END, &size);
-        ok(res == STG_E_INVALIDPOINTER, "Seek to IStream returned wrong hResult:
0x%08x.\n", res);
-        ok(size.QuadPart == 0x9090909090909090ull, "Seek modified the new location
in an error (0x%08x,0x%08x).\n", size.HighPart, size.LowPart);
+        ok(res == STG_E_INVALIDPOINTER, "Seek to IStream returned wrong hResult:
0x%08lx.\n", res);
+        ok(size.QuadPart == 0x9090909090909090ull, "Seek modified the new location
in an error (0x%08lx,0x%08lx).\n", size.HighPart, size.LowPart);
     EndSeh(STATUS_SUCCESS);
     StartSeh()
         move.QuadPart = 0;
         res = IStream_Seek(istream, move, STREAM_SEEK_END, &size);
-        ok(res == S_OK, "Seek to IStream returned wrong hResult: 0x%08x.\n",
res);
-        ok(size.QuadPart == (PUCHAR)stream.End - (PUCHAR)stream.Start, "Seek new
location unexpected value: 0x%08x.\n", size.LowPart);
+        ok(res == S_OK, "Seek to IStream returned wrong hResult: 0x%08lx.\n",
res);
+        ok(size.QuadPart == (PUCHAR)stream.End - (PUCHAR)stream.Start, "Seek new
location unexpected value: 0x%08lx.\n", size.LowPart);
     EndSeh(STATUS_SUCCESS);
     size.QuadPart = 0x9090909090909090ull;
@@ -238,8 +232,8 @@
     StartSeh()
         move.QuadPart = 1;
         res = IStream_Seek(istream, move, STREAM_SEEK_END, &size);
-        ok(res == S_OK, "Seek to IStream returned wrong hResult: 0x%08x.\n",
res);
-        ok(size.QuadPart == (PUCHAR)stream.End - (PUCHAR)stream.Start - 1, "Seek new
location unexpected value: 0x%08x.\n", size.LowPart);
+        ok(res == S_OK, "Seek to IStream returned wrong hResult: 0x%08lx.\n",
res);
+        ok(size.QuadPart == (PUCHAR)stream.End - (PUCHAR)stream.Start - 1, "Seek new
location unexpected value: 0x%08lx.\n", size.LowPart);
     EndSeh(STATUS_SUCCESS);
     size.QuadPart = 0x9090909090909090ull;
@@ -247,8 +241,8 @@
     StartSeh()
         move.QuadPart = 2;
         res = IStream_Seek(istream, move, STREAM_SEEK_END, &size);
-        ok(res == S_OK, "Seek to IStream returned wrong hResult: 0x%08x.\n",
res);
-        ok(size.QuadPart == (PUCHAR)stream.End - (PUCHAR)stream.Start - 2, "Seek new
location unexpected value: 0x%08x.\n", size.LowPart);
+        ok(res == S_OK, "Seek to IStream returned wrong hResult: 0x%08lx.\n",
res);
+        ok(size.QuadPart == (PUCHAR)stream.End - (PUCHAR)stream.Start - 2, "Seek new
location unexpected value: 0x%08lx.\n", size.LowPart);
     EndSeh(STATUS_SUCCESS);
     size.QuadPart = 0x9090909090909090ull;
@@ -256,14 +250,14 @@
     StartSeh()
         move.QuadPart = -20;
         res = IStream_Seek(istream, move, STREAM_SEEK_SET, &size);
-        ok(res == STG_E_INVALIDPOINTER, "Seek to IStream returned wrong hResult:
0x%08x.\n", res);
+        ok(res == STG_E_INVALIDPOINTER, "Seek to IStream returned wrong hResult:
0x%08lx.\n", res);
         ok(size.QuadPart == 0x9090909090909090ull, "Seek modified the new location
in an error.\n");
     EndSeh(STATUS_SUCCESS);
     StartSeh()
         move.QuadPart = 4000;
         res = IStream_Seek(istream, move, STREAM_SEEK_SET, &size);
-        ok(res == STG_E_INVALIDPOINTER, "Seek to IStream returned wrong hResult:
0x%08x.\n", res);
+        ok(res == STG_E_INVALIDPOINTER, "Seek to IStream returned wrong hResult:
0x%08lx.\n", res);
         ok(size.QuadPart == 0x9090909090909090ull, "Seek modified the new location
in an error.\n");
     EndSeh(STATUS_SUCCESS);
@@ -271,11 +265,11 @@
         move.QuadPart = 0x100000000ull;
         res = IStream_Seek(istream, move, STREAM_SEEK_SET, &size);
 #ifdef _WIN64
-        ok(res == STG_E_INVALIDPOINTER, "Seek to IStream returned wrong hResult:
0x%08x.\n", res);
-        ok(size.QuadPart == 0x9090909090909090ull, "Seek modified the new location
in an error (0x%08x,0x%08x).\n", size.HighPart, size.LowPart);
+        ok(res == STG_E_INVALIDPOINTER, "Seek to IStream returned wrong hResult:
0x%08lx.\n", res);
+        ok(size.QuadPart == 0x9090909090909090ull, "Seek modified the new location
in an error (0x%08lx,0x%08lx).\n", size.HighPart, size.LowPart);
 #else
-        ok(res == S_OK, "Seek to IStream returned wrong hResult: 0x%08x.\n",
res);
-        ok(size.QuadPart == 0, "Seek new location unexpected value: 0x%08x.\n",
size.LowPart);
+        ok(res == S_OK, "Seek to IStream returned wrong hResult: 0x%08lx.\n",
res);
+        ok(size.QuadPart == 0, "Seek new location unexpected value:
0x%08lx.\n", size.LowPart);
 #endif
     EndSeh(STATUS_SUCCESS);
@@ -283,8 +277,8 @@
     StartSeh()
         move.QuadPart = 0;
         res = IStream_Seek(istream, move, STREAM_SEEK_SET, &size);
-        ok(res == S_OK, "Seek to IStream returned wrong hResult: 0x%08x.\n",
res);
-        ok(size.QuadPart == 0, "Seek new location unexpected value: 0x%08x.\n",
size.LowPart);
+        ok(res == S_OK, "Seek to IStream returned wrong hResult: 0x%08lx.\n",
res);
+        ok(size.QuadPart == 0, "Seek new location unexpected value:
0x%08lx.\n", size.LowPart);
     EndSeh(STATUS_SUCCESS);
 #endif
@@ -293,30 +287,30 @@
     StartSeh()
         move.QuadPart = -20;
         res = IStream_Seek(istream, move, STREAM_SEEK_CUR, &size);
-        ok(res == STG_E_INVALIDPOINTER, "Seek to IStream returned wrong hResult:
0x%08x.\n", res);
-        ok(size.QuadPart == 0x9090909090909090ull, "Seek modified the new location
in an error (0x%08x,0x%08x).\n", size.HighPart, size.LowPart);
+        ok(res == STG_E_INVALIDPOINTER, "Seek to IStream returned wrong hResult:
0x%08lx.\n", res);
+        ok(size.QuadPart == 0x9090909090909090ull, "Seek modified the new location
in an error (0x%08lx,0x%08lx).\n", size.HighPart, size.LowPart);
     EndSeh(STATUS_SUCCESS);
     StartSeh()
         move.QuadPart = 0x100000000ull;
         res = IStream_Seek(istream, move, STREAM_SEEK_CUR, &size);
 #ifdef _WIN64
-        ok(res == STG_E_INVALIDPOINTER, "Seek to IStream returned wrong hResult:
0x%08x.\n", res);
-        ok(size.QuadPart == 0x9090909090909090ull, "Seek modified the new location
in an error (0x%08x,0x%08x).\n", size.HighPart, size.LowPart);
+        ok(res == STG_E_INVALIDPOINTER, "Seek to IStream returned wrong hResult:
0x%08lx.\n", res);
+        ok(size.QuadPart == 0x9090909090909090ull, "Seek modified the new location
in an error (0x%08lx,0x%08lx).\n", size.HighPart, size.LowPart);
 #else
-        ok(res == S_OK, "Seek to IStream returned wrong hResult: 0x%08x.\n",
res);
-        ok(size.QuadPart == 0, "Seek new location unexpected value: 0x%08x.\n",
size.LowPart);
+        ok(res == S_OK, "Seek to IStream returned wrong hResult: 0x%08lx.\n",
res);
+        ok(size.QuadPart == 0, "Seek new location unexpected value:
0x%08lx.\n", size.LowPart);
 #endif
     EndSeh(STATUS_SUCCESS);
     StartSeh()
         move.QuadPart = 40;
         res = IStream_Seek(istream, move, STREAM_SEEK_SET, &size);
-        ok(res == S_OK, "Seek to IStream returned wrong hResult: 0x%08x.\n",
res);
+        ok(res == S_OK, "Seek to IStream returned wrong hResult: 0x%08lx.\n",
res);
     EndSeh(STATUS_SUCCESS);
     ok(size.QuadPart == 40,
-       "Seek returned wrong offset %lld (expected %d)\n",
+       "Seek returned wrong offset %I64u (expected %d)\n",
        size.QuadPart, 40);
     ok(stream.Current == buffer2 + 40,
@@ -329,13 +323,13 @@
     res = IStream_Read(istream, buffer, sizeof(buffer), &bytesRead);
-    ok(res == S_OK, "Read to IStream returned wrong hResult: 0x%08x.\n", res);
+    ok(res == S_OK, "Read to IStream returned wrong hResult: 0x%08lx.\n", res);
     if (SUCCEEDED(res))
     {
         for (i = 0; i < bytesRead; i++)
         {
-            ok(buffer[i] == (i + 40), "Buffer[%d] contains a wrong number %d
(expected %d).\n", i, buffer[i], i + 40);
+            ok(buffer[i] == (i + 40), "Buffer[%lu] contains a wrong number %u
(expected %lu).\n", i, buffer[i], i + 40);
         }
     }
@@ -349,17 +343,17 @@
     res = IStream_Release(istream);
-    ok(res == 1, "Release to IStream returned wrong hResult: 0x%08x.\n", res);
-
-    ok(stream.RefCount == 1, "RefCount has a wrong value: %d (expected %d).\n",
stream.RefCount, 1);
+    ok(res == 1, "Release to IStream returned wrong hResult: 0x%08lx.\n", res);
+
+    ok(stream.RefCount == 1, "RefCount has a wrong value: %ld (expected
%d).\n", stream.RefCount, 1);
     res = IStream_Release(istream);
-    ok(res == S_OK, "Release to IStream returned wrong hResult: 0x%08x.\n",
res);
-
-    ok(stream.RefCount == 0, "RefCount has a wrong value: %d (expected %d).\n",
stream.RefCount, 0);
-
-    ok(finalReleaseCallCount == 1, "FinalRelease was called %d times instead of
1.\n", finalReleaseCallCount);
+    ok(res == S_OK, "Release to IStream returned wrong hResult: 0x%08lx.\n",
res);
+
+    ok(stream.RefCount == 0, "RefCount has a wrong value: %ld (expected
%d).\n", stream.RefCount, 0);
+
+    ok(finalReleaseCallCount == 1, "FinalRelease was called %lu times instead of
1.\n", finalReleaseCallCount);
 }
 void test_OutOfProcess()
@@ -399,7 +393,7 @@
        "stream.FinalRelease unexpected %p != %p.\n",
        stream.FinalRelease, RtlFinalReleaseOutOfProcessMemoryStream);
-    ok(stream.RefCount == 0, "RefCount has a wrong value: %d (expected %d).\n",
stream.RefCount, 0);
+    ok(stream.RefCount == 0, "RefCount has a wrong value: %ld (expected
%d).\n", stream.RefCount, 0);
     CompareStructsAndSaveForLater(&previous, &stream, "After init");
@@ -413,19 +407,19 @@
     res = IStream_QueryInterface((struct IStream*)&stream, &IID_IStream,
(void**)&istream);
-    ok(res == S_OK, "QueryInterface to IStream returned wrong hResult:
0x%08x.\n", res);
-
-    ok(stream.RefCount == 1, "RefCount has a wrong value: %d (expected %d).\n",
stream.RefCount, 1);
+    ok(res == S_OK, "QueryInterface to IStream returned wrong hResult:
0x%08lx.\n", res);
+
+    ok(stream.RefCount == 1, "RefCount has a wrong value: %ld (expected
%d).\n", stream.RefCount, 1);
     ok(stream.ProcessHandle == process,
-       "ProcessHandle changed unexpectedly: 0x%08x (expected 0x%p)\n",
+       "ProcessHandle changed unexpectedly: 0x%p (expected 0x%p)\n",
        stream.ProcessHandle, process);
     CompareStructsAndSaveForLater(&previous, &stream, "After
QueryInterface");
     res = IStream_Stat(istream, &stat, STATFLAG_NONAME);
-    ok(res == S_OK, "Stat to IStream returned wrong hResult: 0x%08x.\n", res);
+    ok(res == S_OK, "Stat to IStream returned wrong hResult: 0x%08lx.\n", res);
     ok(stream.Current == buffer2,
        "stream.Current points to the wrong address 0x%p (expected 0x%p)\n",
@@ -433,24 +427,24 @@
     ok(stream.Start == buffer2, "stream.Start was changed unexpectedly\n");
     ok(stream.End == buffer2 + sizeof(buffer2), "stream.End was changed
unexpectedly\n");
     ok(stream.ProcessHandle == process,
-       "ProcessHandle changed unexpectedly: 0x%08x (expected 0x%p)\n",
+       "ProcessHandle changed unexpectedly: 0x%p (expected 0x%p)\n",
        stream.ProcessHandle, process);
     ok(stat.cbSize.QuadPart == ((PUCHAR)stream.End - (PUCHAR)stream.Start),
-       "stat.cbSize has the wrong value %lld (expected %d)\n",
+       "stat.cbSize has the wrong value %I64u (expected %d)\n",
        stat.cbSize.QuadPart, (PUCHAR)stream.End - (PUCHAR)stream.Start);
     CompareStructsAndSaveForLater(&previous, &stream, "After Stat");
     res = IStream_Read(istream, buffer, sizeof(buffer), &bytesRead);
-    ok(res == S_OK, "Read to IStream returned wrong hResult: 0x%08x.\n", res);
+    ok(res == S_OK, "Read to IStream returned wrong hResult: 0x%08lx.\n", res);
     if (SUCCEEDED(res))
     {
         for (i = 0; i < bytesRead; i++)
         {
-            ok(buffer[i] == i, "Buffer[%d] contains a wrong number %d (expected
%d).\n", i, buffer[i], i);
+            ok(buffer[i] == i, "Buffer[%lu] contains a wrong number %u (expected
%lu).\n", i, buffer[i], i);
         }
     }
@@ -460,7 +454,7 @@
     ok(stream.Start == buffer2, "stream.Start was changed unexpectedly\n");
     ok(stream.End == buffer2 + sizeof(buffer2), "stream.End was changed
unexpectedly\n");
     ok(stream.ProcessHandle == process,
-       "ProcessHandle changed unexpectedly: 0x%08x (expected 0x%p)\n",
+       "ProcessHandle changed unexpectedly: 0x%p (expected 0x%p)\n",
        stream.ProcessHandle, process);
     CompareStructsAndSaveForLater(&previous, &stream, "After Read 1");
@@ -469,10 +463,10 @@
     res = IStream_Seek(istream, move, STREAM_SEEK_SET, &size);
-    ok(res == S_OK, "Seek to IStream returned wrong hResult: 0x%08x.\n", res);
+    ok(res == S_OK, "Seek to IStream returned wrong hResult: 0x%08lx.\n", res);
     ok(size.QuadPart == 40,
-       "Seek returned wrong offset %lld (expected %d)\n",
+       "Seek returned wrong offset %I64u (expected %d)\n",
        size.QuadPart, 40);
     ok(stream.Current == buffer2 + 40,
@@ -481,20 +475,20 @@
     ok(stream.Start == buffer2, "stream.Start was changed unexpectedly\n");
     ok(stream.End == buffer2 + sizeof(buffer2), "stream.End was changed
unexpectedly\n");
     ok(stream.ProcessHandle == process,
-       "ProcessHandle changed unexpectedly: 0x%08x (expected 0x%p)\n",
+       "ProcessHandle changed unexpectedly: 0x%p (expected 0x%p)\n",
        stream.ProcessHandle, process);
     CompareStructsAndSaveForLater(&previous, &stream, "After Seek");
     res = IStream_Read(istream, buffer, sizeof(buffer), &bytesRead);
-    ok(res == S_OK, "Read to IStream returned wrong hResult: 0x%08x.\n", res);
+    ok(res == S_OK, "Read to IStream returned wrong hResult: 0x%08lx.\n", res);
     if (SUCCEEDED(res))
     {
         for (i = 0; i < bytesRead; i++)
         {
-            ok(buffer[i] == (i + 40), "Buffer[%d] contains a wrong number %d
(expected %d).\n", i, buffer[i], i + 40);
+            ok(buffer[i] == (i + 40), "Buffer[%lu] contains a wrong number %u
(expected %lu).\n", i, buffer[i], i + 40);
         }
     }
@@ -504,18 +498,18 @@
     ok(stream.Start == buffer2, "stream.Start was changed unexpectedly\n");
     ok(stream.End == buffer2 + sizeof(buffer2), "stream.End was changed
unexpectedly\n");
     ok(stream.ProcessHandle == process,
-       "ProcessHandle changed unexpectedly: 0x%08x (expected 0x%p)\n",
+       "ProcessHandle changed unexpectedly: 0x%p (expected 0x%p)\n",
        stream.ProcessHandle, process);
     CompareStructsAndSaveForLater(&previous, &stream, "After Read 2");
     res = IStream_Release(istream);
-    ok(res == S_OK, "Release to IStream returned wrong hResult: 0x%08x.\n",
res);
-
-    ok(stream.RefCount == 0, "RefCount has a wrong value: %d (expected %d).\n",
stream.RefCount, 0);
-
-    ok(finalReleaseCallCount == 1, "FinalRelease was called %d times instead of
1.\n", finalReleaseCallCount);
+    ok(res == S_OK, "Release to IStream returned wrong hResult: 0x%08lx.\n",
res);
+
+    ok(stream.RefCount == 0, "RefCount has a wrong value: %ld (expected
%d).\n", stream.RefCount, 0);
+
+    ok(finalReleaseCallCount == 1, "FinalRelease was called %lu times instead of
1.\n", finalReleaseCallCount);
 }
 START_TEST(RtlMemoryStream)
Modified: trunk/rostests/apitests/ntdll/Timer.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/ntdll/Timer.c?re…
==============================================================================
--- trunk/rostests/apitests/ntdll/Timer.c       [iso-8859-1] (original)
+++ trunk/rostests/apitests/ntdll/Timer.c       [iso-8859-1] Wed Mar 26 12:07:25 2014
@@ -58,15 +58,15 @@
                                   TRUE,
                                   &CurrentResolution);
     ok_hex(Status, STATUS_SUCCESS);
-    printf("Current resolution: %d ; minimum resolution: %d\n",
CurrentResolution, MinimumResolution);
-    ok(CurrentResolution <= MinimumResolution, "Current resolution: %d became too
high! (minimum resolution: %d)\n", CurrentResolution, MinimumResolution);
+    printf("Current resolution: %lu ; minimum resolution: %lu\n",
CurrentResolution, MinimumResolution);
+    ok(CurrentResolution <= MinimumResolution, "Current resolution: %lu became
too high! (minimum resolution: %lu)\n", CurrentResolution, MinimumResolution);
     Status = NtSetTimerResolution(MaximumResolution - 1,
                                   TRUE,
                                   &CurrentResolution);
     ok_hex(Status, STATUS_SUCCESS);
-    printf("Current resolution: %d ; maximum resolution: %d\n",
CurrentResolution, MaximumResolution);
-    ok(CurrentResolution >= MaximumResolution, "Current resolution: %d became too
low! (maximum resolution: %d)\n", CurrentResolution, MaximumResolution);
+    printf("Current resolution: %lu ; maximum resolution: %lu\n",
CurrentResolution, MaximumResolution);
+    ok(CurrentResolution >= MaximumResolution, "Current resolution: %lu became
too low! (maximum resolution: %lu)\n", CurrentResolution, MaximumResolution);
     /* Get the current timer resolution */
     Status = NtSetTimerResolution(0,        /* Ignored */