Cppcheck: reassignment of edt1Id because isWin2000() has been removed (fpicker module)
timar74 at gmail.com
Thu Jun 13 11:15:28 PDT 2013
On Thu, Jun 13, 2013 at 8:03 PM, julien2412 <serval2412 at yahoo.fr> wrote:
> Cppcheck reported this:
> <error file="fpicker/source/win32/filepicker/WinFileOpenImpl.cxx" line="994"
> id="redundantAssignment" severity="style" msg="Variable 'edt1Id' is
> reassigned a value before the old one has been used."/>
> 988 sal_Int32 edt1Id = edt1;
> 990 // under W2k the there is a combobox instead
> 991 // of an edit field for the file name edit field
> 992 // the control id of this box is cmb13 and not
> 993 // edt1 as before so we must use this id
> 994 edt1Id = cmb13;
> Since we don't support anymore isWin2000 (removed by
> b30f91c58419e90a789f79a1391b13f2064997ab, 2011/07/20) , according to the
> comment shouldn't it be:
> sal_Int32 edt1Id = edt1;
> instead ?
No, looking at the file history it turns out that W2K has "new"
behavior, Win9x had the old one. So sal_Int32 edt1Id = cmb13; would be
the good solution.
More information about the LibreOffice