Fixed few more warnings/bugs.

This commit is contained in:
Andrey Kamaev 2012-06-20 21:09:27 +00:00
parent e94e5866a1
commit f6ef504ef0
2 changed files with 30 additions and 30 deletions

View File

@ -3564,7 +3564,7 @@ icvReadMat( CvFileStorage* fs, CvFileNode* node )
cols = cvReadIntByName( fs, node, "cols", -1 );
dt = cvReadStringByName( fs, node, "dt", 0 );
if( rows < 0 || cols < 0 || dt < 0 )
if( rows < 0 || cols < 0 || !dt )
CV_Error( CV_StsError, "Some of essential matrix attributes are absent" );
elem_type = icvDecodeSimpleFormat( dt );
@ -4632,7 +4632,7 @@ icvReadGraph( CvFileStorage* fs, CvFileNode* node )
if( header_dt )
header_size = icvCalcElemSize( header_dt, header_size );
if( vtx_dt > 0 )
if( vtx_dt )
{
src_vtx_size = icvCalcElemSize( vtx_dt, 0 );
vtx_size = icvCalcElemSize( vtx_dt, vtx_size );

View File

@ -469,7 +469,7 @@ icvCreateGLCMDescriptors_AllowDoubleNest( CvGLCM* destGLCM, int matrixIndex )
descriptors[ CV_GLCMDESC_ENERGY ] += entryValue*entryValue;
}
if( marginalProbability>0 )
if( marginalProbability[ actualSideLoop1 ] > 0 )
marginalProbabilityEntropy += marginalProbability[ actualSideLoop1 ]*log(marginalProbability[ actualSideLoop1 ]);
}