Commit 89e66208 authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

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

parent 62f270e2
...@@ -2897,6 +2897,7 @@ static void test_capture_4(void) ...@@ -2897,6 +2897,7 @@ static void test_capture_4(void)
HWND hwnd; HWND hwnd;
WNDCLASSA wclass; WNDCLASSA wclass;
HINSTANCE hInstance = GetModuleHandleA( NULL ); HINSTANCE hInstance = GetModuleHandleA( NULL );
ATOM aclass;
if (!pGetGUIThreadInfo) if (!pGetGUIThreadInfo)
{ {
...@@ -2913,10 +2914,11 @@ static void test_capture_4(void) ...@@ -2913,10 +2914,11 @@ static void test_capture_4(void)
wclass.lpszMenuName = 0; wclass.lpszMenuName = 0;
wclass.cbClsExtra = 0; wclass.cbClsExtra = 0;
wclass.cbWndExtra = 0; wclass.cbWndExtra = 0;
assert (RegisterClassA( &wclass )); aclass = RegisterClassA( &wclass );
assert (hwnd = CreateWindowA( wclass.lpszClassName, "MenuTest", ok( aclass, "RegisterClassA failed with error %d\n", GetLastError());
WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, 0, hwnd = CreateWindowA( wclass.lpszClassName, "MenuTest",
400, 200, NULL, NULL, hInstance, NULL) ); WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, 0,
400, 200, NULL, NULL, hInstance, NULL);
ok(hwnd != NULL, "CreateWindowEx failed with error %d\n", GetLastError()); ok(hwnd != NULL, "CreateWindowEx failed with error %d\n", GetLastError());
if (!hwnd) return; if (!hwnd) return;
hmenu = CreatePopupMenu(); hmenu = CreatePopupMenu();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment