Hello,
Cppcheck reported this:
basic/source/comp/sbcomp.cxx
600 unassignedVariable style Variable 'TimeBuffer' is not assigned a value.
Here are the lines:
600 char TimeBuffer[200];
601 #ifdef DBG_TRACE_PROFILING
602 if( bPrintTimeStamp )
603 {
604 double dDiffTime = dCurTime - GdLastTime;
605 GdLastTime = dCurTime;
606 sprintf( TimeBuffer, "\t\t// Time = %f ms / += %f ms",
dCurTime*1000.0, dDiffTime*1000.0 );
607 }
608 #endif
609
610 if( bSTMT )
611 {
612 lcl_lineOut( rStr_STMNT.getStr(), lcl_getSpaces( nIndent ),
613 (bPrintTimeStamp && !GbIncludePCodes) ?
TimeBuffer : NULL );
614 }
See
http://opengrok.libreoffice.org/xref/core/basic/source/comp/sbcomp.cxx#600
By taking a look at the file, I notice there was 1 #ifdef DBG_TRACE_BASIC
and several blocks of #ifdef DBG_TRACE_PROFILING. Is it really useful to
keep both? What about removing DBG_TRACE_PROFILING and considering that
DBG_TRACE_BASIC should enable all debug (Basic + profiling) ?
If not, what should be done about TimeBuffer variable?
Julien
--
View this message in context:
http://nabble.documentfoundation.org/Cppcheck-TimeBuffer-is-not-assigned-a-value-in-basic-module-tp4036591.html
Sent from the Dev mailing list archive at Nabble.com.
Context
- Cppcheck: 'TimeBuffer' is not assigned a value in basic module · julien2412
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.