Signed-off-by: Alex Henrie alexhenrie24@gmail.com --- dlls/shell32/shlview_cmenu.c:1163:17: warning: variable 'psfhlpsrc' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] if (SUCCEEDED(hr)) ^~~~~~~~~~~~~ include/winerror.h:74:25: note: expanded from macro 'SUCCEEDED' ^~~~~~~~~~~~~~~~~~~~ dlls/shell32/shlview_cmenu.c:1175:16: note: uninitialized use occurs here if(psfhlpsrc) ISFHelper_Release(psfhlpsrc); ^~~~~~~~~ dlls/shell32/shlview_cmenu.c:1163:13: note: remove the 'if' if its condition is always true if (SUCCEEDED(hr)) ^~~~~~~~~~~~~~~~~~ dlls/shell32/shlview_cmenu.c:1161:45: note: initialize the variable 'psfhlpsrc' to silence this warning ISFHelper *psfhlpdst, *psfhlpsrc; ^ = NULL --- dlls/shell32/shlview_cmenu.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/dlls/shell32/shlview_cmenu.c b/dlls/shell32/shlview_cmenu.c index ef11957e921..ec54f6b82cd 100644 --- a/dlls/shell32/shlview_cmenu.c +++ b/dlls/shell32/shlview_cmenu.c @@ -1171,8 +1171,11 @@ static HRESULT paste_pidls(ContextMenu *This, ITEMIDLIST **pidls, UINT count) ISFHelper_DeleteItems(psfhlpsrc, 1, &pidl_item); */ } - if(psfhlpdst) ISFHelper_Release(psfhlpdst); - if(psfhlpsrc) ISFHelper_Release(psfhlpsrc); + if(psfhlpdst) + { + ISFHelper_Release(psfhlpdst); + if(psfhlpsrc) ISFHelper_Release(psfhlpsrc); + } IShellFolder_Release(psfFrom); } SHFree(pidl_dir);