New Defects reported by Coverity Scan for LibreOffice

Caolán McNamara caolanm at redhat.com
Fri May 6 16:37:46 UTC 2016


On Fri, 2016-05-06 at 08:12 -0700, scan-admin at coverity.com wrote:


> ** CID 1359230:  Control flow issues  (DEADCODE)
> /sc/source/core/tool/interpr8.cxx: 1977 in
> ScInterpreter::ScSwitch_MS()()
> 
> 
> _____________________________________________________________________
> ___________________________________
> *** CID 1359230:  Control flow issues  (DEADCODE)
> /sc/source/core/tool/interpr8.cxx: 1977 in
> ScInterpreter::ScSwitch_MS()()
> 1971                  ( !isValue && aRefStr.getDataIgnoreCase() ==
> aStr.getDataIgnoreCase() )) )
> 1972             {
> 1973                 // TRUE
> 1974                 if ( nParamCount < 1 )
> 1975                 {
> 1976                     // no parameter given for THEN
> > > >     CID 1359230:  Control flow issues  (DEADCODE)
> > > >     Execution cannot reach this statement: "this->nGlobalError
> > > > = nFirst...".
> 1977                     nGlobalError = nFirstMatchError;
> 1978                     PushParameterExpected();
> 1979                     return;
> 1980                 }
> 1981                 bFinished = true;
> 1982             }
> 
> ** CID 1359229:  Error handling issues  (CHECKED_RETURN)
> /sc/source/core/tool/interpr8.cxx: 1936 in
> ScInterpreter::ScSwitch_MS()()
> 
> 
> _____________________________________________________________________
> ___________________________________
> *** CID 1359229:  Error handling issues  (CHECKED_RETURN)
> /sc/source/core/tool/interpr8.cxx: 1936 in
> ScInterpreter::ScSwitch_MS()()
> 1930                 aRefStr = GetString();
> 1931                 break;
> 1932             case svSingleRef :
> 1933             case svDoubleRef :
> 1934                 {
> 1935                     ScAddress aAdr;
> > > >     CID 1359229:  Error handling issues  (CHECKED_RETURN)
> > > >     Calling "PopDoubleRefOrSingleRef" without checking return
> > > > value (as is done elsewhere 24 out of 25 times).
> 1936                     PopDoubleRefOrSingleRef( aAdr );
> 1937                     if ( nGlobalError )
> 1938                         break;
> 1939                     ScRefCellValue aCell( *pDok, aAdr );
> 1940                     isValue = !( aCell.hasString() ||
> aCell.hasEmptyValue() || aCell.isEmpty() );
> 1941                     if ( isValue )


These look worth looking at, especially the first one.

C.


More information about the LibreOffice mailing list