[Libreoffice] cppcheck : Found duplicate if expressions
Julien Nabet
serval2412 at yahoo.fr
Sun May 8 05:15:02 PDT 2011
IMPRESS:
[sd/source/ui/func/bulmaper.cxx:86] ->
[sd/source/ui/func/bulmaper.cxx:79]: (style) Found duplicate if expressions
if( 0 )
{
nFontID = EE_CHAR_FONTINFO_CJK;
nFontHeightID = EE_CHAR_FONTHEIGHT_CJK;
nWeightID = EE_CHAR_WEIGHT_CJK;
nPostureID = EE_CHAR_ITALIC_CJK;
}
else if( 0 )
{
nFontID = EE_CHAR_FONTINFO_CTL;
nFontHeightID = EE_CHAR_FONTHEIGHT_CTL;
nWeightID = EE_CHAR_WEIGHT_CTL;
nPostureID = EE_CHAR_ITALIC_CTL;
}
CALC:
[sc/source/filter/lotus/lotform.cxx:2037] ->
[sc/source/filter/lotus/lotform.cxx:2033]: (style) Found duplicate if
expressions
this line is present twice :
else if(sTest== "ACOT")
This one should be easy but I need some time to do a global check.
LIBS-CORE
[svx/source/svdraw/svdoedge.cxx:1244] ->
[svx/source/svdraw/svdoedge.cxx:1241]: (style) Found duplicate if
expressions
else if (nPntAnz==3) cForm='L';
else if (nPntAnz==4) { // Z oder U
if (nAngle1==nAngle2) cForm='U';
else cForm='Z';
} else if (nPntAnz==4) { /* �-� �-� */
/* ... -� -� */
} else if (nPntAnz==6) { // S oder C oder ...
(The comments appear like this on my Linux workstation and on Opengrok).
[framework/source/fwe/xml/toolboxdocumenthandler.cxx:407] ->
[framework/source/fwe/xml/toolboxdocumenthandler.cxx:401]: (style) Found
duplicate if expressions
This line appears twice.
else if ( nHashCode == m_nHashCode_Style_DropDown )
nItemBits |= ::com::sun::star::ui::ItemStyle::DROP_DOWN;
This one should be easy to correct.
For LIBS-GUI, I just noted the lines, I think each one needs some
investigation and/or knowledge of the context :
[basegfx/source/polygon/b2dpolypolygoncutter.cxx:244] ->
[basegfx/source/polygon/b2dpolypolygoncutter.cxx:238]: (style) Found
duplicate branches for if and else.
[basegfx/source/polygon/b2dpolypolygoncutter.cxx:370] ->
[basegfx/source/polygon/b2dpolypolygoncutter.cxx:364]: (style) Found
duplicate branches for if and else
[l10ntools/source/export.cxx:1535] ->
[l10ntools/source/export.cxx:1532]: (style) Found duplicate branches for
if and else
[l10ntools/source/localize.cxx:783] ->
[l10ntools/source/localize.cxx:779]: (style) Found duplicate branches
for if and else
[svtools/source/control/toolbarmenu.cxx:1113] ->
[svtools/source/control/toolbarmenu.cxx:1105]: (style) Found duplicate
branches for if and else
[vcl/source/gdi/outdev3.cxx:1998] -> [vcl/source/gdi/outdev3.cxx:1993]:
(style) Found duplicate if expressions
[vcl/source/gdi/outdev3.cxx:1998] -> [vcl/source/gdi/outdev3.cxx:1993]:
(style) Found duplicate if expressions
[vcl/win/source/app/salinst.cxx:345] ->
[vcl/win/source/app/salinst.cxx:333]: (style) Found duplicate branches
for if and else
[vcl/win/source/window/salframe.cxx:4908] ->
[vcl/win/source/window/salframe.cxx:4906]: (style) Found duplicate
branches for if and else
Julien.
More information about the LibreOffice
mailing list