fpicker/source/win32/VistaFilePickerImpl.cxx |    8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

New commits:
commit 3bb49555e9e3ea54a575ac8342ca3740aad51d74
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Sat Oct 27 10:59:44 2018 +0200
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Sat Oct 27 14:09:47 2018 +0200

    tdf#120703 PVS: V519 variable is assigned values twice successively
    
    V519 The 'hResult' variable is assigned values twice successively.
         Perhaps this is a mistake. Check lines: 1097, 1098.
    
    Change-Id: Ib6f9c3467578ebc68b3a15f8dbea4054af45707d
    Reviewed-on: https://gerrit.libreoffice.org/62411
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>
    Tested-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/fpicker/source/win32/VistaFilePickerImpl.cxx 
b/fpicker/source/win32/VistaFilePickerImpl.cxx
index 168595f63d41..ff0cf2c27956 100644
--- a/fpicker/source/win32/VistaFilePickerImpl.cxx
+++ b/fpicker/source/win32/VistaFilePickerImpl.cxx
@@ -1091,11 +1091,9 @@ TFileDialogCustomize 
VistaFilePickerImpl::impl_getCustomizeInterface()
 static void lcl_removeControlItemsWorkaround(const TFileDialogCustomize& 
iCustom   ,
                                             ::sal_Int16           nControlId)
 {
-    ::sal_Int32 i       = 0;
-    HRESULT   hResult;
-
-    hResult = iCustom->SetSelectedControlItem(nControlId, 1000);
-    hResult = S_OK;
+    (void)iCustom->SetSelectedControlItem(nControlId, 1000); // Don't care if 
this fails (useless?)
+    DWORD i = 0;
+    HRESULT hResult = S_OK;
     while ( SUCCEEDED(hResult) )
         hResult = iCustom->RemoveControlItem(nControlId, i++);
 }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to