[PATCH] fixed uninitialized struct component
Marcus Meissner
marcus at jet.franken.de
Mon Mar 24 07:06:48 CDT 2008
Hi,
Compiler complained about "is used uninitialized",
caused by the fixed code only initializing some struct
members.
I am not fully sure this is right. Also the msg test
fail for me, but in other places.
Ciao, Marcus
---
dlls/user32/tests/msg.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c
index 69bba8b..a6f3b51 100644
--- a/dlls/user32/tests/msg.c
+++ b/dlls/user32/tests/msg.c
@@ -7176,14 +7176,16 @@ static LRESULT CALLBACK cbt_global_hook_proc(int nCode, WPARAM wParam, LPARAM lP
/* WH_MOUSE_LL hook */
if (nCode == HC_ACTION)
{
- struct message msg;
MSLLHOOKSTRUCT *mhll = (MSLLHOOKSTRUCT *)lParam;
/* we can't test for real mouse events */
if (mhll->flags & LLMHF_INJECTED)
{
+ struct message msg;
+
+ memset (&msg, 0, sizeof (msg));
msg.message = wParam;
- msg.flags = hook;
+ msg.flags = hook;
add_message(&msg);
}
return CallNextHookEx(hCBT_global_hook, nCode, wParam, lParam);
--
1.5.2.4
More information about the wine-patches
mailing list