Marcus Meissner : user32: Move functional code out of assert() (Coverity).

Alexandre Julliard julliard at winehq.org
Wed Feb 23 13:01:54 CST 2011


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

Author: Marcus Meissner <meissner at suse.de>
Date:   Wed Feb 23 17:33:20 2011 +0100

user32: Move functional code out of assert() (Coverity).

---

 dlls/user32/tests/win.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c
index cca222f..603e93e 100644
--- a/dlls/user32/tests/win.c
+++ b/dlls/user32/tests/win.c
@@ -2897,6 +2897,7 @@ static void test_capture_4(void)
     HWND hwnd;
     WNDCLASSA wclass;
     HINSTANCE hInstance = GetModuleHandleA( NULL );
+    ATOM aclass;
 
     if (!pGetGUIThreadInfo)
     {
@@ -2913,10 +2914,11 @@ static void test_capture_4(void)
     wclass.lpszMenuName  = 0;
     wclass.cbClsExtra    = 0;
     wclass.cbWndExtra    = 0;
-    assert (RegisterClassA( &wclass ));
-    assert (hwnd = CreateWindowA( wclass.lpszClassName, "MenuTest",
-                                  WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, 0,
-                                  400, 200, NULL, NULL, hInstance, NULL) );
+    aclass = RegisterClassA( &wclass );
+    ok( aclass, "RegisterClassA failed with error %d\n", GetLastError());
+    hwnd = CreateWindowA( wclass.lpszClassName, "MenuTest",
+                          WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, 0,
+                          400, 200, NULL, NULL, hInstance, NULL);
     ok(hwnd != NULL, "CreateWindowEx failed with error %d\n", GetLastError());
     if (!hwnd) return;
     hmenu = CreatePopupMenu();




More information about the wine-cvs mailing list