Cppcheck: ''bSkipBreaks' is assigned a value that is never used (sc)

julien2412 serval2412 at yahoo.fr
Tue Feb 5 14:26:48 PST 2013


Hello,

Cppcheck detected this:
sc/source/core/data/table5.cxx
147	unreadVariable	style	Variable 'bSkipBreaks' is assigned a value that is
never used.

Here are the lines:
    141     if (!bSkipBreaks && pStyleSet->GetItemState(ATTR_PAGE_SCALETO,
false, &pItem) == SFX_ITEM_SET)
    142     {
    143         const ScPageScaleToItem& rScaleToItem = static_cast<const
ScPageScaleToItem&>(
    144             pStyleSet->Get(ATTR_PAGE_SCALETO));
    145         if (rScaleToItem.GetWidth() > 0 || rScaleToItem.GetHeight()
> 0)
    146             // when fitting to a fixed width x height, ignore manual
breaks.
    147             bSkipBreaks = true;
    148     }

see
http://opengrok.libreoffice.org/xref/core/sc/source/core/data/table5.cxx#141

According to the comment line 146, it seems "bSkipBreaks" should be used but
how?

Julien 



--
View this message in context: http://nabble.documentfoundation.org/Cppcheck-bSkipBreaks-is-assigned-a-value-that-is-never-used-sc-tp4034724.html
Sent from the Dev mailing list archive at Nabble.com.


More information about the LibreOffice mailing list