Alexandre Julliard : user32: Fix some printf format warnings.

Alexandre Julliard julliard at winehq.org
Tue Jan 17 13:45:29 CST 2012


Module: wine
Branch: master
Commit: 03820a527bdd3b0a633e7a713f4dbd34e51edf5e
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=03820a527bdd3b0a633e7a713f4dbd34e51edf5e

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue Jan 17 14:59:19 2012 +0100

user32: Fix some printf format warnings.

---

 dlls/user32/menu.c         |    2 +-
 dlls/user32/tests/edit.c   |    8 ++++----
 dlls/user32/tests/scroll.c |   18 ++++++------------
 dlls/user32/win.c          |    8 ++++----
 4 files changed, 15 insertions(+), 21 deletions(-)

diff --git a/dlls/user32/menu.c b/dlls/user32/menu.c
index 349adc6..76fe007 100644
--- a/dlls/user32/menu.c
+++ b/dlls/user32/menu.c
@@ -2111,7 +2111,7 @@ static MENUITEM *MENU_InsertItem( HMENU hMenu, UINT pos, UINT flags )
            (INT_PTR)menu->items[pos - 1].hbmpItem <= (INT_PTR)HBMMENU_MBAR_CLOSE_D)
         pos--;
 
-    TRACE("inserting at %u by pos %u\n", pos, flags & MF_BYPOSITION);
+    TRACE("inserting at %u flags %x\n", pos, flags);
 
     /* Create new items array */
 
diff --git a/dlls/user32/tests/edit.c b/dlls/user32/tests/edit.c
index 389497e..89a2843 100644
--- a/dlls/user32/tests/edit.c
+++ b/dlls/user32/tests/edit.c
@@ -1736,7 +1736,7 @@ static void test_espassword(void)
 
     hwEdit = create_editcontrol(ES_PASSWORD, 0);
     r = get_edit_style(hwEdit);
-    ok(r == ES_PASSWORD, "Wrong style expected 0x%x got: 0x%x\n", ES_PASSWORD, r);
+    ok(r == ES_PASSWORD, "Wrong style expected ES_PASSWORD got: 0x%x\n", r);
     /* set text */
     r = SendMessage(hwEdit , WM_SETTEXT, 0, (LPARAM) password);
     ok(r == TRUE, "Expected: %d, got: %d\n", TRUE, r);
@@ -1840,7 +1840,7 @@ static void test_enter(void)
     /* multiline */
     hwEdit = create_editcontrol(ES_MULTILINE, 0);
     r = get_edit_style(hwEdit);
-    ok(ES_MULTILINE == r, "Wrong style expected 0x%x got: 0x%x\n", ES_MULTILINE, r);
+    ok(ES_MULTILINE == r, "Wrong style expected ES_MULTILINE got: 0x%x\n", r);
 
     /* set text */
     r = SendMessage(hwEdit , WM_SETTEXT, 0, (LPARAM) "");
@@ -1880,7 +1880,7 @@ static void test_enter(void)
     /* single line with ES_WANTRETURN */
     hwEdit = create_editcontrol(ES_WANTRETURN, 0);
     r = get_edit_style(hwEdit);
-    ok(ES_WANTRETURN == r, "Wrong style expected 0x%x got: 0x%x\n", ES_WANTRETURN, r);
+    ok(ES_WANTRETURN == r, "Wrong style expected ES_WANTRETURN got: 0x%x\n", r);
 
     /* set text */
     r = SendMessage(hwEdit , WM_SETTEXT, 0, (LPARAM) "");
@@ -1907,7 +1907,7 @@ static void test_tab(void)
     /* multiline */
     hwEdit = create_editcontrol(ES_MULTILINE, 0);
     r = get_edit_style(hwEdit);
-    ok(ES_MULTILINE == r, "Wrong style expected 0x%x got: 0x%x\n", ES_MULTILINE, r);
+    ok(ES_MULTILINE == r, "Wrong style expected ES_MULTILINE got: 0x%x\n", r);
 
     /* set text */
     r = SendMessage(hwEdit , WM_SETTEXT, 0, (LPARAM) "");
diff --git a/dlls/user32/tests/scroll.c b/dlls/user32/tests/scroll.c
index 0bf5742..b0e206f 100644
--- a/dlls/user32/tests/scroll.c
+++ b/dlls/user32/tests/scroll.c
@@ -302,13 +302,10 @@ todo_wine
         if (bThemeActive || style != WS_HSCROLL)
 todo_wine
             ok( (winstyle & (WS_HSCROLL|WS_VSCROLL)) == ( style | WS_VSCROLL),
-                    "unexpected style change %08x expected %08x\n",
-                    (winstyle & (WS_HSCROLL|WS_VSCROLL)), style | WS_VSCROLL);
+                "unexpected style change %08x/%08x\n", winstyle, style);
         else
-            ok( (winstyle & (WS_HSCROLL|WS_VSCROLL)) == style ||
-                    broken((winstyle & (WS_HSCROLL|WS_VSCROLL)) == (WS_HSCROLL|WS_VSCROLL)), /* Win 9x/ME */
-                    "unexpected style change %08x expected %08x\n",
-                    (winstyle & (WS_HSCROLL|WS_VSCROLL)), style);
+            ok( (winstyle & (WS_HSCROLL|WS_VSCROLL)) == style,
+                "unexpected style change %08x/%08x\n", winstyle, style);
     }
     /* do the test again with H and V reversed.
      * Start with a clean window */
@@ -341,13 +338,10 @@ todo_wine
         if (bThemeActive || style != WS_VSCROLL)
 todo_wine
             ok( (winstyle & (WS_HSCROLL|WS_VSCROLL)) == ( style | WS_HSCROLL),
-                    "unexpected style change %08x expected %08x\n",
-                    (winstyle & (WS_HSCROLL|WS_VSCROLL)), style | WS_HSCROLL);
+                "unexpected style change %08x/%08x\n", winstyle, style);
         else
-            ok( (winstyle & (WS_HSCROLL|WS_VSCROLL)) == style ||
-                    broken((winstyle & (WS_HSCROLL|WS_VSCROLL)) == (WS_HSCROLL|WS_VSCROLL)), /* Win 9x/ME */
-                    "unexpected style change %08x expected %08x\n",
-                    (winstyle & (WS_HSCROLL|WS_VSCROLL)), style);
+            ok( (winstyle & (WS_HSCROLL|WS_VSCROLL)) == style,
+                "unexpected style change %08x/%08x\n", winstyle, style);
     }
     /* Slightly change the test to use SetScrollInfo
      * Start with a clean window */
diff --git a/dlls/user32/win.c b/dlls/user32/win.c
index 74e8d6b..3e7d9b1 100644
--- a/dlls/user32/win.c
+++ b/dlls/user32/win.c
@@ -1066,7 +1066,7 @@ static void dump_window_styles( DWORD style, DWORD exstyle )
 
     /* FIXME: Add dumping of BS_/ES_/SBS_/LBS_/CBS_/DS_/etc. styles */
 #define DUMPED_STYLES \
-    (WS_POPUP | \
+    ((DWORD)(WS_POPUP | \
      WS_CHILD | \
      WS_MINIMIZE | \
      WS_VISIBLE | \
@@ -1083,7 +1083,7 @@ static void dump_window_styles( DWORD style, DWORD exstyle )
      WS_GROUP | \
      WS_TABSTOP | \
      WS_MINIMIZEBOX | \
-     WS_MAXIMIZEBOX)
+     WS_MAXIMIZEBOX))
 
     if(style & ~DUMPED_STYLES) TRACE(" %08x", style & ~DUMPED_STYLES);
     TRACE("\n");
@@ -1111,7 +1111,7 @@ static void dump_window_styles( DWORD style, DWORD exstyle )
     if(exstyle & WS_EX_LAYOUTRTL) TRACE(" WS_EX_LAYOUTRTL");
 
 #define DUMPED_EX_STYLES \
-    (WS_EX_DLGMODALFRAME | \
+    ((DWORD)(WS_EX_DLGMODALFRAME | \
      WS_EX_DRAGDETECT | \
      WS_EX_NOPARENTNOTIFY | \
      WS_EX_TOPMOST | \
@@ -1129,7 +1129,7 @@ static void dump_window_styles( DWORD style, DWORD exstyle )
      WS_EX_STATICEDGE | \
      WS_EX_APPWINDOW | \
      WS_EX_LAYERED | \
-     WS_EX_LAYOUTRTL)
+     WS_EX_LAYOUTRTL))
 
     if(exstyle & ~DUMPED_EX_STYLES) TRACE(" %08x", exstyle & ~DUMPED_EX_STYLES);
     TRACE("\n");




More information about the wine-cvs mailing list