From: André Hentschel Subject: dwrite: Make collection_find_family a void function (Coverity) Message-Id: <54A7FC8D.8030100@dawncrow.de> Date: Sat, 03 Jan 2015 15:28:29 +0100 CID 1261600: Unused value (UNUSED_VALUE) --- dlls/dwrite/font.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c index 80b7f07..4d275d9 100644 --- a/dlls/dwrite/font.c +++ b/dlls/dwrite/font.c @@ -1440,7 +1440,7 @@ static HRESULT WINAPI dwritefontcollection_GetFontFamily(IDWriteFontCollection * return create_fontfamily(This->family_data[index], iface, family); } -static HRESULT collection_find_family(struct dwrite_fontcollection *collection, const WCHAR *name, UINT32 *index, BOOL *exists) +static void collection_find_family(struct dwrite_fontcollection *collection, const WCHAR *name, UINT32 *index, BOOL *exists) { UINT32 i; @@ -1457,7 +1457,7 @@ static HRESULT collection_find_family(struct dwrite_fontcollection *collection, if (!strcmpW(buffer, name)) { *index = i; *exists = TRUE; - return S_OK; + return; } } } @@ -1465,15 +1465,14 @@ static HRESULT collection_find_family(struct dwrite_fontcollection *collection, *index = (UINT32)-1; *exists = FALSE; } - - return S_OK; } static HRESULT WINAPI dwritefontcollection_FindFamilyName(IDWriteFontCollection *iface, const WCHAR *name, UINT32 *index, BOOL *exists) { struct dwrite_fontcollection *This = impl_from_IDWriteFontCollection(iface); TRACE("(%p)->(%s %p %p)\n", This, debugstr_w(name), index, exists); - return collection_find_family(This, name, index, exists); + collection_find_family(This, name, index, exists); + return S_OK; } static BOOL is_same_fontfile(IDWriteFontFile *left, IDWriteFontFile *right) @@ -1772,7 +1771,7 @@ HRESULT create_font_collection(IDWriteFactory2* factory, IDWriteFontFileEnumerat IDWriteLocalizedStrings_GetString(family_name, 0, buffer, sizeof(buffer)/sizeof(WCHAR)); exists = FALSE; - hr = collection_find_family(collection, buffer, &index, &exists); + collection_find_family(collection, buffer, &index, &exists); if (exists) fontfamily_add_font(collection->family_data[index], font_data); else {