Cppcheck: reassignment of edt1Id because isWin2000() has been removed (fpicker module)

Julien Nabet serval2412 at yahoo.fr
Thu Jun 13 11:33:36 PDT 2013

On 13/06/2013 20:15, Andras Timar wrote:
> Hi Julien,
> On Thu, Jun 13, 2013 at 8:03 PM, julien2412<serval2412 at yahoo.fr>  wrote:
>> Hello,
>> 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;
>>      989
>>      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.
Thank you Andras for your quick feedback.
I understood what you mean, now if I can do this change (blindly because 
don't build on Win), the comments about edt1 need tweaking (see 
If you don't have much time to make the whole change, I can propose you 
I "gerrit submit" a patch without comment part and you tweak this last one?


More information about the LibreOffice mailing list