twain_32: Avoid using an uninitialized variable in the failure path in path in a couple of cases.
Gerald Pfeifer
gerald at pfeifer.com
Fri Feb 6 15:11:30 CST 2015
Alternatively we could initialize actual_support in those four
cases; let me know if you prefer such a patch:
dsm.c:189:24: warning: 'actual_support' may be used uninitialized in this function [-Wmaybe-uninitialized]
dsm.c:458:24: warning: 'actual_support' may be used uninitialized in this function [-Wmaybe-uninitialized]
dsm.c:382:24: warning: 'actual_support' may be used uninitialized in this function [-Wmaybe-uninitialized]
dsm.c:556:9: warning: 'actual_support' may be used uninitialized in this function [-Wmaybe-uninitialized]
Gerald
---
dlls/twain_32/tests/dsm.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/dlls/twain_32/tests/dsm.c b/dlls/twain_32/tests/dsm.c
index b8f1c9e..ab6e84f 100644
--- a/dlls/twain_32/tests/dsm.c
+++ b/dlls/twain_32/tests/dsm.c
@@ -71,6 +71,8 @@ static BOOL get_onevalue(TW_HANDLE hcontainer, TW_UINT32 *ret, TW_UINT16 *type)
GlobalUnlock(hcontainer);
return TRUE;
}
+ else
+ *ret = 0;
return FALSE;
}
--
2.2.1
More information about the wine-patches
mailing list