[PATCH] user32: initialize just the members we need (Coverity)
Marcus Meissner
marcus at jet.franken.de
Thu May 9 03:55:26 CDT 2013
CID 971376 Uninitialized scalar variable
Does not like copying half initialized structs,
even though it gets overwritten later.
Ciao, Marcus
---
dlls/user32/tests/scroll.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/dlls/user32/tests/scroll.c b/dlls/user32/tests/scroll.c
index 0f0ede2..732f8d7 100644
--- a/dlls/user32/tests/scroll.c
+++ b/dlls/user32/tests/scroll.c
@@ -406,11 +406,10 @@ static LRESULT CALLBACK scroll_init_proc(HWND hwnd, UINT msg,
TRUE;
case WM_CREATE:
- horz.cbSize = sizeof horz;
- horz.fMask = SIF_ALL;
+ horz.cbSize = vert.cbSize = sizeof(horz);
+ horz.fMask = vert.fMask = SIF_ALL;
horz.nMin = 0xdeadbeaf;
horz.nMax = 0xbaadc0de;
- vert = horz;
h_ret = GetScrollInfo(hwnd, SB_HORZ, &horz);
v_ret = GetScrollInfo(hwnd, SB_VERT, &vert);
--
1.7.10.4
More information about the wine-patches
mailing list