From 1a33bc3cdfe66dbe7d6057d1d39aaf0e71b097ac Mon Sep 17 00:00:00 2001 From: Sylvain Petreolle Date: Sat, 3 Oct 2015 22:21:19 +0000 Subject: [PATCH] [ROSTESTS] Fix 0x%lu specifier. Add cmake file for notificationtest. svn path=/trunk/; revision=69436 --- rostests/tests/apc/apc.c | 4 ++-- rostests/tests/subclass/subclass.c | 12 ++++++------ rostests/win32/CMakeLists.txt | 1 + rostests/win32/kernel32/queuetest/queuetest.c | 2 +- 4 files changed, 10 insertions(+), 9 deletions(-) create mode 100644 rostests/win32/CMakeLists.txt diff --git a/rostests/tests/apc/apc.c b/rostests/tests/apc/apc.c index 5b45c37e772..935bcee5dcc 100644 --- a/rostests/tests/apc/apc.c +++ b/rostests/tests/apc/apc.c @@ -63,7 +63,7 @@ int main(int argc, char* argv[]) if (FileHandle == INVALID_HANDLE_VALUE) { - printf("Open failed last err 0x%lu\n",GetLastError()); + printf("Open failed last err 0x%lx\n",GetLastError()); return 0; } @@ -82,7 +82,7 @@ int main(int argc, char* argv[]) if (!NT_SUCCESS(Status)) { - printf("Read failed status 0x%lu\n",Status); + printf("Read failed status 0x%lx\n",Status); } printf("Waiting\n"); WaitForSingleObjectEx(EventHandle, INFINITE, TRUE); diff --git a/rostests/tests/subclass/subclass.c b/rostests/tests/subclass/subclass.c index 63c4f0e568c..8504dd294aa 100644 --- a/rostests/tests/subclass/subclass.c +++ b/rostests/tests/subclass/subclass.c @@ -31,7 +31,7 @@ WinMain(HINSTANCE hInstance, wc.cbWndExtra = 0; if (RegisterClassW(&wc) == 0) { - fprintf(stderr, "RegisterClassW failed (last error 0x%lu)\n", + fprintf(stderr, "RegisterClassW failed (last error 0x%lx)\n", GetLastError()); return 1; } @@ -50,7 +50,7 @@ WinMain(HINSTANCE hInstance, NULL); if (hWnd == NULL) { - fprintf(stderr, "CreateWindowA failed (last error 0x%lu)\n", + fprintf(stderr, "CreateWindowA failed (last error 0x%lx)\n", GetLastError()); return 1; } @@ -60,7 +60,7 @@ WinMain(HINSTANCE hInstance, printf("Calling GetWindowTextW\n"); if (! GetWindowTextW(hWnd, WindowTextW, sizeof(WindowTextW) / sizeof(WindowTextW[0]))) { - fprintf(stderr, "GetWindowTextW failed (last error 0x%lu)\n", GetLastError()); + fprintf(stderr, "GetWindowTextW failed (last error 0x%lx)\n", GetLastError()); return 1; } printf("GetWindowTextW returned Unicode string \"%S\"\n", WindowTextW); @@ -68,7 +68,7 @@ WinMain(HINSTANCE hInstance, printf("Calling GetWindowTextA\n"); if (! GetWindowTextA(hWnd, WindowTextA, sizeof(WindowTextA) / sizeof(WindowTextA[0]))) { - fprintf(stderr, "GetWindowTextA failed (last error 0x%lu)\n", GetLastError()); + fprintf(stderr, "GetWindowTextA failed (last error 0x%lx)\n", GetLastError()); return 1; } printf("GetWindowTextA returned Ansi string \"%s\"\n", WindowTextA); @@ -89,7 +89,7 @@ WinMain(HINSTANCE hInstance, printf("Calling GetWindowTextW\n"); if (! GetWindowTextW(hWnd, WindowTextW, sizeof(WindowTextW) / sizeof(WindowTextW[0]))) { - fprintf(stderr, "GetWindowTextW failed (last error 0x%lu)\n", GetLastError()); + fprintf(stderr, "GetWindowTextW failed (last error 0x%lx)\n", GetLastError()); return 1; } printf("GetWindowTextW returned Unicode string \"%S\"\n", WindowTextW); @@ -104,7 +104,7 @@ WinMain(HINSTANCE hInstance, printf("Calling GetWindowTextW\n"); if (! GetWindowTextW(hWnd, WindowTextW, sizeof(WindowTextW) / sizeof(WindowTextW[0]))) { - fprintf(stderr, "GetWindowTextW failed (last error 0x%lu)\n", GetLastError()); + fprintf(stderr, "GetWindowTextW failed (last error 0x%lx)\n", GetLastError()); return 1; } printf("GetWindowTextW returned Unicode string \"%S\"\n", WindowTextW); diff --git a/rostests/win32/CMakeLists.txt b/rostests/win32/CMakeLists.txt new file mode 100644 index 00000000000..3a70c221bb6 --- /dev/null +++ b/rostests/win32/CMakeLists.txt @@ -0,0 +1 @@ +add_subdirectory(kernel32) diff --git a/rostests/win32/kernel32/queuetest/queuetest.c b/rostests/win32/kernel32/queuetest/queuetest.c index 7b629c54900..cfe2a086cad 100644 --- a/rostests/win32/kernel32/queuetest/queuetest.c +++ b/rostests/win32/kernel32/queuetest/queuetest.c @@ -15,7 +15,7 @@ BOOL WINAPI QueueUserWorkItem(LPTHREAD_START_ROUTINE,PVOID,ULONG); #define TestProc(n) \ DWORD CALLBACK TestProc##n(void *ctx)\ {\ - printf("TestProc%d thread 0x%lu context 0x%p\n", n, GetCurrentThreadId(), ctx);\ + printf("TestProc%d thread 0x%lx context 0x%p\n", n, GetCurrentThreadId(), ctx);\ return 0;\ }