- Fix warnings in ros' tests
authorStefan Ginsberg <stefanginsberg@gmail.com>
Sun, 18 Jan 2009 12:20:51 +0000 (12:20 +0000)
committerStefan Ginsberg <stefanginsberg@gmail.com>
Sun, 18 Jan 2009 12:20:51 +0000 (12:20 +0000)
svn path=/trunk/; revision=38887

rostests/dibtests/palbitblt/pal.c
rostests/dibtests/palbitblt/palbitblt.rbuild
rostests/dxtest/win32kdxtest/NtGdiDdCanCreateSurface.c
rostests/dxtest/win32kdxtest/NtGdiDdQueryDirectDrawObject.c
rostests/dxtest/win32kdxtest/win32kdxtest.rbuild
rostests/tests/regqueryvalue/regqueryvalue.c
rostests/tests/regqueryvalue/regqueryvalue.rbuild
rostests/tests/subclass/subclass.c
rostests/tests/subclass/subclass.rbuild
rostests/win32/kernel32/queuetest/queuetest.c
rostests/win32/kernel32/queuetest/queuetest.rbuild

index 786eb30..b1af6a5 100644 (file)
@@ -77,7 +77,7 @@ void UpdatePalette(HBITMAP hBM){
        DoBlt(hBM);
 }
 
-void InitBitmap(HANDLE *hBM){
+void InitBitmap(HBITMAP *hBM){
        HPALETTE PalHan;
        HWND ActiveWindow;
        HDC hDC;
index 8364b43..badd99a 100644 (file)
@@ -1,4 +1,4 @@
-<module name="palbitblt" type="win32gui" installbase="bin" installname="palbitblt.exe" allowwarnings="true" stdlib="host">
+<module name="palbitblt" type="win32gui" installbase="bin" installname="palbitblt.exe" stdlib="host">
        <define name="__USE_W32API" />
        <library>kernel32</library>
        <library>user32</library>
index 0bc6e4c..bab5f4d 100644 (file)
@@ -34,7 +34,7 @@ test_NtGdiDdCanCreateSurface(HANDLE hDirectDrawLocal)
     retValue = OsThunkDdCanCreateSurface(hDirectDrawLocal,(PDD_CANCREATESURFACEDATA)&pCanCreateSurface);\r
     testing_eq(retValue, DDHAL_DRIVER_HANDLED,fails,"3. NtGdiDdCanCreateSurface(hDirectDrawLocal,pCanCreateSurface);\0");\r
 \r
-    pCanCreateSurface.lpDDSurfaceDesc = &desc;\r
+    pCanCreateSurface.lpDDSurfaceDesc = (DDSURFACEDESC*)&desc;\r
     desc.dwSize = sizeof(DDSURFACEDESC2);\r
 \r
     retValue = OsThunkDdCanCreateSurface(hDirectDrawLocal,(PDD_CANCREATESURFACEDATA)&pCanCreateSurface);\r
index 1b69608..c0e4886 100644 (file)
@@ -54,10 +54,7 @@ test_NtGdiDdQueryDirectDrawObject( HANDLE hDirectDrawLocal)
     D3DNTHAL_GLOBALDRIVERDATA D3dDriverData;
     DD_D3DBUFCALLBACKS D3dBufferCallbacks;
     DDSURFACEDESC2 D3dTextureFormats[100];
-    DWORD NumHeaps = 0;
     VIDEOMEMORY vmList;
-    DWORD NumFourCC = 0;
-    DWORD FourCC = 0;
 
     /* clear data */
     memset(&vmList,0,sizeof(VIDEOMEMORY));
index ed1253b..5b4c06c 100644 (file)
@@ -1,4 +1,4 @@
-<module name="win32kdxtest" type="win32cui" installbase="bin" installname="win32kdxtest.exe" allowwarnings ="true" >
+<module name="win32kdxtest" type="win32cui" installbase="bin" installname="win32kdxtest.exe">
        <include base="win32kdxtest">.</include>
        <library>kernel32</library>
        <library>user32</library>
index b482cd3..dd275e6 100644 (file)
@@ -10,7 +10,7 @@ int main( int argc, char **argv ) {
   PWCHAR WcharResult;
   WCHAR ValueNameWC[100];
   PCHAR CharResult;
-  HANDLE RegKey;
+  HKEY RegKey;
   int i;
 
   if( argc < 2 ) {
@@ -56,7 +56,7 @@ int main( int argc, char **argv ) {
     return 7;
   }
 
-  RegQueryValueExA( RegKey, argv[2], NULL, NULL, CharResult, &ResultSize );
+  RegQueryValueExA( RegKey, argv[2], NULL, NULL, (PBYTE)CharResult, &ResultSize );
 
   printf( " char Value: %s\n", CharResult );
   fflush( stdout );
index 047d856..3b493cf 100644 (file)
@@ -1,4 +1,4 @@
-<module name="regqueryvalue" type="win32gui" installbase="bin" installname="regqueryvalue.exe" allowwarnings="true">
+<module name="regqueryvalue" type="win32gui" installbase="bin" installname="regqueryvalue.exe">
        <define name="__USE_W32API" />
        <library>kernel32</library>
        <library>user32</library>
index db299a4..63c4f0e 100644 (file)
@@ -15,7 +15,6 @@ WinMain(HINSTANCE hInstance,
        int nCmdShow)
 {
   WNDCLASSW wc;
-  MSG msg;
   HWND hWnd;
   WCHAR WindowTextW[256];
   char WindowTextA[256];
@@ -32,11 +31,11 @@ WinMain(HINSTANCE hInstance,
   wc.cbWndExtra = 0;
   if (RegisterClassW(&wc) == 0)
     {
-      fprintf(stderr, "RegisterClassW failed (last error 0x%X)\n",
+      fprintf(stderr, "RegisterClassW failed (last error 0x%lu)\n",
              GetLastError());
       return 1;
     }
-  printf("Unicode class registered, WndProc = 0x%08x\n", wc.lpfnWndProc);
+  printf("Unicode class registered, WndProc = 0x%p\n", wc.lpfnWndProc);
 
   hWnd = CreateWindowA("UnicodeClass",
                       "Unicode Window",
@@ -51,7 +50,7 @@ WinMain(HINSTANCE hInstance,
                       NULL);
   if (hWnd == NULL)
     {
-      fprintf(stderr, "CreateWindowA failed (last error 0x%X)\n",
+      fprintf(stderr, "CreateWindowA failed (last error 0x%lu)\n",
              GetLastError());
       return 1;
     }
@@ -61,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%X)\n", GetLastError());
+      fprintf(stderr, "GetWindowTextW failed (last error 0x%lu)\n", GetLastError());
       return 1;
     }
   printf("GetWindowTextW returned Unicode string \"%S\"\n", WindowTextW);
@@ -69,43 +68,43 @@ WinMain(HINSTANCE hInstance,
   printf("Calling GetWindowTextA\n");
   if (! GetWindowTextA(hWnd, WindowTextA, sizeof(WindowTextA) / sizeof(WindowTextA[0])))
     {
-      fprintf(stderr, "GetWindowTextA failed (last error 0x%X)\n", GetLastError());
+      fprintf(stderr, "GetWindowTextA failed (last error 0x%lu)\n", GetLastError());
       return 1;
     }
   printf("GetWindowTextA returned Ansi string \"%s\"\n", WindowTextA);
   printf("\n");
 
   SavedWndProcW = (WNDPROC) GetWindowLongW(hWnd, GWL_WNDPROC);
-  printf("GetWindowLongW returned 0x%08x\n", SavedWndProcW);
+  printf("GetWindowLongW returned 0x%p\n", SavedWndProcW);
   SavedWndProcA = (WNDPROC) GetWindowLongA(hWnd, GWL_WNDPROC);
-  printf("GetWindowLongA returned 0x%08x\n", SavedWndProcA);
+  printf("GetWindowLongA returned 0x%p\n", SavedWndProcA);
   printf("\n");
 
-  printf("Subclassing window using SetWindowLongW, new WndProc 0x%08x\n", UnicodeSubclassProc);
+  printf("Subclassing window using SetWindowLongW, new WndProc 0x%p\n", UnicodeSubclassProc);
   SetWindowLongW(hWnd, GWL_WNDPROC, (LONG) UnicodeSubclassProc);
-  printf("After subclass, IsWindowUnicode %s, WndProcA 0x%08x, WndProcW 0x%08x\n",
+  printf("After subclass, IsWindowUnicode %s, WndProcA 0x%lx, WndProcW 0x%lx\n",
          IsWindowUnicode(hWnd) ? "TRUE" : "FALSE", GetWindowLongA(hWnd, GWL_WNDPROC),
          GetWindowLongW(hWnd, GWL_WNDPROC));
 
   printf("Calling GetWindowTextW\n");
   if (! GetWindowTextW(hWnd, WindowTextW, sizeof(WindowTextW) / sizeof(WindowTextW[0])))
     {
-      fprintf(stderr, "GetWindowTextW failed (last error 0x%X)\n", GetLastError());
+      fprintf(stderr, "GetWindowTextW failed (last error 0x%lu)\n", GetLastError());
       return 1;
     }
   printf("GetWindowTextW returned Unicode string \"%S\"\n", WindowTextW);
   printf("\n");
 
-  printf("Subclassing window using SetWindowLongA, new WndProc 0x%08x\n", AnsiSubclassProc);
+  printf("Subclassing window using SetWindowLongA, new WndProc 0x%p\n", AnsiSubclassProc);
   SetWindowLongA(hWnd, GWL_WNDPROC, (LONG) AnsiSubclassProc);
-  printf("After subclass, IsWindowUnicode %s, WndProcA 0x%08x, WndProcW 0x%08x\n",
+  printf("After subclass, IsWindowUnicode %s, WndProcA 0x%lx, WndProcW 0x%lx\n",
          IsWindowUnicode(hWnd) ? "TRUE" : "FALSE", GetWindowLongA(hWnd, GWL_WNDPROC),
          GetWindowLongW(hWnd, GWL_WNDPROC));
 
   printf("Calling GetWindowTextW\n");
   if (! GetWindowTextW(hWnd, WindowTextW, sizeof(WindowTextW) / sizeof(WindowTextW[0])))
     {
-      fprintf(stderr, "GetWindowTextW failed (last error 0x%X)\n", GetLastError());
+      fprintf(stderr, "GetWindowTextW failed (last error 0x%lu)\n", GetLastError());
       return 1;
     }
   printf("GetWindowTextW returned Unicode string \"%S\"\n", WindowTextW);
index b8fcd0f..84d1b71 100644 (file)
@@ -1,4 +1,4 @@
-<module name="subclass" type="win32gui" installbase="bin" installname="subclass.exe" allowwarnings="true">
+<module name="subclass" type="win32gui" installbase="bin" installname="subclass.exe">
        <define name="__USE_W32API" />
        <library>kernel32</library>
        <library>user32</library>
index f198465..7b629c5 100644 (file)
@@ -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%x context 0x%p\n", n, GetCurrentThreadId(), ctx);\
+    printf("TestProc%d thread 0x%lu context 0x%p\n", n, GetCurrentThreadId(), ctx);\
     return 0;\
 }
 
index 7211e75..4b11aed 100644 (file)
@@ -1,4 +1,4 @@
-<module name="queuetest" type="win32cui" installbase="system32" installname="queuetest.exe" allowwarnings="true">
+<module name="queuetest" type="win32cui" installbase="system32" installname="queuetest.exe">
         <define name="__USE_W32API" />
        <library>kernel32</library>
        <file>queuetest.c</file>