[Libreoffice] "Found duplicate branches for if and else" in dbtree.cxx
Michael Stahl
mstahl at redhat.com
Mon Jan 23 06:24:01 PST 2012
On 21/01/12 08:53, julien2412 wrote:
> Hello,
>
> Cppcheck reported this :
> core/sw/source/ui/dbui/dbtree.cxx
> 349 duplicateBranch style Found duplicate branches for if and else.
>
> if(bTable)<--- Found duplicate branches for if and
> else.
> InsertEntry(sName, pParent);
> else
> InsertEntry(sName, pParent);
> I took a look at the git history, it's been there since the initial commit
> on 2000.
>
> So either the if(bTable) is useless or something's missing.
reading the code above the if, bTable is used for 2 different ways to
get the table columns.
thus, the if(bTable) looks totally spurious and should be removed.
> Any idea ?
>
> Julien.
More information about the LibreOffice
mailing list