Cppcheck: "bEmbed" always false -> block never called in fillinfo.cxx (sc module)

julien2412 serval2412 at yahoo.fr
Mon Feb 11 03:05:42 PST 2013


Hello,

Cppcheck reported this:
sc/source/core/data/fillinfo.cxx
507	variableScope	style	The scope of the variable 'bEmbed' can be reduced.

Here are the lines:
    507                                 bool bEmbed = false;
    508 
    509                                 if (bScenario)
    510                                 {
    511                                     pInfo->pBackground =
ScGlobal::GetButtonBrushItem();
    512                                     pThisRowInfo->bEmptyBack =
false;
    513                                 }
    514                                 else if (bEmbed)
    515                                 {
    516                                     pInfo->pBackground =
ScGlobal::GetEmbeddedBrushItem();
    517                                     pThisRowInfo->bEmptyBack =
false;
    518                                 }

and bEmbed is nowhere else in this function
See
http://opengrok.libreoffice.org/xref/core/sc/source/core/data/fillinfo.cxx#507

So should we remove bEmbed and the else if block or is something really
lacking?

Julien



--
View this message in context: http://nabble.documentfoundation.org/Cppcheck-bEmbed-always-false-block-never-called-in-fillinfo-cxx-sc-module-tp4036346.html
Sent from the Dev mailing list archive at Nabble.com.


More information about the LibreOffice mailing list