dlls/comctl32/listview.c warning elimination
Gerald Pfeifer
gerald at pfeifer.com
Sun Oct 28 07:59:28 CDT 2007
Not a patch I am particularily proud of, but the best way I found to get
rid of
listview.c:5043: warning: 'strW' might be used uninitialized in this function
issued by GCC, and apart from the added cast it actually is simpler than
the original.
Gerald
ChangeLog:
Avoid uninitialized variable warning in FindItemA().
Index: dlls/comctl32/listview.c
===================================================================
RCS file: /home/wine/wine/dlls/comctl32/listview.c,v
retrieving revision 1.490
diff -u -3 -p -r1.490 listview.c
--- dlls/comctl32/listview.c 23 Oct 2007 18:16:28 -0000 1.490
+++ dlls/comctl32/listview.c 28 Oct 2007 12:56:50 -0000
@@ -5040,12 +5040,11 @@ static INT LISTVIEW_FindItemA(const LIST
BOOL hasText = lpFindInfo->flags & (LVFI_STRING | LVFI_PARTIAL);
LVFINDINFOW fiw;
INT res;
- LPWSTR strW;
memcpy(&fiw, lpFindInfo, sizeof(fiw));
- if (hasText) fiw.psz = strW = textdupTtoW((LPCWSTR)lpFindInfo->psz, FALSE);
+ if (hasText) fiw.psz = textdupTtoW((LPCWSTR)lpFindInfo->psz, FALSE);
res = LISTVIEW_FindItemW(infoPtr, nStart, &fiw);
- if (hasText) textfreeT(strW, FALSE);
+ if (hasText) textfreeT((LPWSTR)fiw.psz, FALSE);
return res;
}
More information about the wine-patches
mailing list