From 801c943009cd8ef6ecb10ce49c4dc3c1c4c7ebbf Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Sun, 11 Nov 2018 13:51:47 +0000 Subject: [PATCH] fix coverity reports --- modules/dnn/src/dnn.cpp | 2 +- modules/videoio/src/cap_v4l.cpp | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/dnn/src/dnn.cpp b/modules/dnn/src/dnn.cpp index 1654764..8880edb 100644 --- a/modules/dnn/src/dnn.cpp +++ b/modules/dnn/src/dnn.cpp @@ -1801,7 +1801,7 @@ struct Net::Impl nextEltwiseLayer = nextData->layerInstance.dynamicCast(); if( !nextEltwiseLayer.empty() && pinsToKeep.count(lpNext) == 0 && - nextData->inputBlobsId.size() == 2 ) + nextData && nextData->inputBlobsId.size() == 2 ) { LayerData *eltwiseData = nextData; diff --git a/modules/videoio/src/cap_v4l.cpp b/modules/videoio/src/cap_v4l.cpp index 4a628f9..1e7af0c 100644 --- a/modules/videoio/src/cap_v4l.cpp +++ b/modules/videoio/src/cap_v4l.cpp @@ -348,7 +348,9 @@ struct CvCaptureCAM_V4L CV_FINAL : public CvCapture /*********************** Implementations ***************************************/ CvCaptureCAM_V4L::CvCaptureCAM_V4L() : deviceHandle(-1), bufferIndex(-1) -{} +{ + memset(×tamp, 0, sizeof(timestamp)); +} CvCaptureCAM_V4L::~CvCaptureCAM_V4L() { streaming(false); @@ -1739,7 +1741,6 @@ double CvCaptureCAM_V4L::getProperty(int property_id) const return value; } } - return -1.0; } bool CvCaptureCAM_V4L::icvSetFrameSize(int _width, int _height) -- 2.7.4