From 84db82a3293827264916a4f46a322ea75b75b1b2 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Tue, 24 Apr 2018 14:29:01 +0300 Subject: [PATCH] build: fix warnings --- .../include/opencv2/core/hal/intrin_cpp.hpp | 2 +- .../opencv2/videoio/container_avi.private.hpp | 3 ++- modules/videoio/src/cap_gstreamer.cpp | 22 +++++++++---------- modules/videoio/test/test_video_io.cpp | 1 + samples/dnn/object_detection.cpp | 2 +- 5 files changed, 16 insertions(+), 14 deletions(-) diff --git a/modules/core/include/opencv2/core/hal/intrin_cpp.hpp b/modules/core/include/opencv2/core/hal/intrin_cpp.hpp index 5f0aab1bae..c7cbb578db 100644 --- a/modules/core/include/opencv2/core/hal/intrin_cpp.hpp +++ b/modules/core/include/opencv2/core/hal/intrin_cpp.hpp @@ -1047,7 +1047,7 @@ template inline bool v_check_any(const v_reg<_Tp, n>& a) Return value will be built by combining values _a_ and _b_ using the following scheme: result[i] = mask[i] ? a[i] : b[i]; -@Note: _mask_ element values are restricted to these values: +@note: _mask_ element values are restricted to these values: - 0: select element from _b_ - 0xff/0xffff/etc: select element from _a_ (fully compatible with bitwise-based operator) diff --git a/modules/videoio/include/opencv2/videoio/container_avi.private.hpp b/modules/videoio/include/opencv2/videoio/container_avi.private.hpp index 212a892699..61ea74dece 100644 --- a/modules/videoio/include/opencv2/videoio/container_avi.private.hpp +++ b/modules/videoio/include/opencv2/videoio/container_avi.private.hpp @@ -106,7 +106,8 @@ protected: bool parseMovi(frame_list& in_frame_list) { //not implemented - in_frame_list.empty(); + CV_UNUSED(in_frame_list); + // FIXIT: in_frame_list.empty(); return true; } bool parseStrl(char stream_id, Codecs codec_); diff --git a/modules/videoio/src/cap_gstreamer.cpp b/modules/videoio/src/cap_gstreamer.cpp index c5212f6731..9c3fd049b7 100644 --- a/modules/videoio/src/cap_gstreamer.cpp +++ b/modules/videoio/src/cap_gstreamer.cpp @@ -158,7 +158,7 @@ inline static bool is_gst_element_exists(const std::string & name) //================================================================================================== -class GStreamerCapture : public IVideoCapture +class GStreamerCapture CV_FINAL : public IVideoCapture { private: GstElement* pipeline; @@ -184,12 +184,12 @@ private: public: GStreamerCapture(); ~GStreamerCapture(); - virtual bool grabFrame(); - virtual bool retrieveFrame(int /*unused*/, OutputArray dst); - virtual double getProperty(int propId) const; - virtual bool setProperty(int propId, double value); - virtual bool isOpened() const; - virtual int getCaptureDomain(); // Return the type of the capture object: CAP_VFW, etc... + virtual bool grabFrame() CV_OVERRIDE; + virtual bool retrieveFrame(int /*unused*/, OutputArray dst) CV_OVERRIDE; + virtual double getProperty(int propId) const CV_OVERRIDE; + virtual bool setProperty(int propId, double value) CV_OVERRIDE; + virtual bool isOpened() const CV_OVERRIDE; + virtual int getCaptureDomain() CV_OVERRIDE; // Return the type of the capture object: CAP_VFW, etc... bool open(int id); bool open(const String &filename_); static void newPad(GstElement * /*elem*/, GstPad *pad, gpointer data); @@ -630,7 +630,7 @@ bool GStreamerCapture::open(const String &filename_) const gchar * filename = filename_.c_str(); bool file = false; - bool stream = false; + //bool stream = false; bool manualpipeline = false; char *uri = NULL; GstElement* uridecodebin = NULL; @@ -655,7 +655,7 @@ bool GStreamerCapture::open(const String &filename_) #else uri = realpath(filename, NULL); #endif - stream = false; + //stream = false; if(uri) { uri = g_filename_to_uri(uri, NULL, NULL); @@ -680,13 +680,13 @@ bool GStreamerCapture::open(const String &filename_) fprintf(stderr, "GStreamer: Error opening bin: %s\n", err->message); return false; } - stream = true; + //stream = true; manualpipeline = true; } } else { - stream = true; + //stream = true; uri = g_strdup(filename); } diff --git a/modules/videoio/test/test_video_io.cpp b/modules/videoio/test/test_video_io.cpp index 14bb1315b1..c1834be5ec 100644 --- a/modules/videoio/test/test_video_io.cpp +++ b/modules/videoio/test/test_video_io.cpp @@ -83,6 +83,7 @@ struct VideoCaptureAPI case CAP_ARAVIS: return "CAP_ARAVIS"; case CAP_OPENCV_MJPEG: return "CAP_OPENCV_MJPEG"; case CAP_INTEL_MFX: return "CAP_INTEL_MFX"; + case CAP_XINE: return "CAP_XINE"; } return "unknown"; } diff --git a/samples/dnn/object_detection.cpp b/samples/dnn/object_detection.cpp index 16d82eb0e7..5ff537bdbd 100644 --- a/samples/dnn/object_detection.cpp +++ b/samples/dnn/object_detection.cpp @@ -214,7 +214,7 @@ void postprocess(Mat& frame, const std::vector& outs, Net& net) } } std::vector indices; - NMSBoxes(boxes, confidences, confThreshold, 0.4, indices); + NMSBoxes(boxes, confidences, confThreshold, 0.4f, indices); for (size_t i = 0; i < indices.size(); ++i) { int idx = indices[i];