[PATCH] winealsa.drv: Init *num to 0 (Coverity)
Marcus Meissner
marcus at jet.franken.de
Mon Apr 16 02:09:58 CDT 2012
Hi,
cannot really rely on all callers. CID 5598
Also initialize a "may be uninitialized" value the compiler sees.
Ciao, Marcus
---
dlls/winealsa.drv/mmdevdrv.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/dlls/winealsa.drv/mmdevdrv.c b/dlls/winealsa.drv/mmdevdrv.c
index e3c1d15..d84bbb2 100644
--- a/dlls/winealsa.drv/mmdevdrv.c
+++ b/dlls/winealsa.drv/mmdevdrv.c
@@ -345,7 +345,7 @@ static WCHAR *construct_device_id(EDataFlow flow, const WCHAR *chunk1, const cha
{
WCHAR *ret;
const WCHAR *prefix;
- DWORD len_wchars = 0, chunk1_len, copied = 0, prefix_len;
+ DWORD len_wchars = 0, chunk1_len = 0, copied = 0, prefix_len;
static const WCHAR dashW[] = {' ','-',' ',0};
static const size_t dashW_len = (sizeof(dashW) / sizeof(*dashW)) - 1;
@@ -583,6 +583,7 @@ HRESULT WINAPI AUDDRV_GetEndpointIDs(EDataFlow flow, WCHAR ***ids, GUID **guids,
TRACE("%d %p %p %p %p\n", flow, ids, guids, num, def_index);
+ *num = 0;
*ids = NULL;
*guids = NULL;
--
1.7.3.4
More information about the wine-patches
mailing list