Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


Hello,

Cppcheck reports this :
[source/filter/oox/formulaparser.cxx:2611]: (error) Uninitialized variable:
bIsRow
Here are the lines :
   2608 bool BiffFormulaParserImpl::readNlrSAddrAddData( BiffNlr& orNlr,
BiffInputStream& rStrm, bool bRow )
   2609 {
   2610     bool bIsRow;
   2611     return readNlrSRangeAddData( orNlr, bIsRow, rStrm ) && (bIsRow
== bRow);
   2612 }

Now the function called is just the lines after :
bool BiffFormulaParserImpl::readNlrSRangeAddData( BiffNlr& orNlr, bool&
orbIsRow, BiffInputStream& rStrm )
Ok, so orbIsRow must be initialized on this function. The pb is it isn't
always the case.

Moreover "readNlrSRangeAddData" is called by  2 functions :
- BiffFormulaParserImpl::importNlrSRangeToken
- BiffFormulaParserImpl::readNlrSAddrAddData

Now the question, should the boolean variables be initialized by the 2
calling functions, if yes at which value ?
Or should there be a default value (which one ?) on readNlrSRangeAddData ?

Julien.

--
View this message in context: 
http://nabble.documentfoundation.org/Cppcheck-reports-Uninitialized-variable-bIsRow-in-formulaparser-cxx-tp3836234p3836234.html
Sent from the Dev mailing list archive at Nabble.com.

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.