diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2018-10-27 10:59:44 +0200 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2018-10-27 14:09:47 +0200 |
commit | 3bb49555e9e3ea54a575ac8342ca3740aad51d74 (patch) | |
tree | 37ce453ef196fd64321569bf8c7f33402a7502c8 /fpicker/source/win32 | |
parent | bb702103f210cd344d8e700ece27f3708aab8eaf (diff) |
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.kaganski@collabora.com>
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'fpicker/source/win32')
-rw-r--r-- | fpicker/source/win32/VistaFilePickerImpl.cxx | 8 |
1 files changed, 3 insertions, 5 deletions
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++); } |