From 921f06eb6fb2a3ebacc18c3612e33f23c4d327d1 Mon Sep 17 00:00:00 2001 From: catree Date: Sun, 2 Jul 2017 01:59:41 +0200 Subject: [PATCH] Fix ffmpeg detection with -D OPENCV_WARNINGS_ARE_ERRORS=ON option. --- cmake/checks/ffmpeg_test.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmake/checks/ffmpeg_test.cpp b/cmake/checks/ffmpeg_test.cpp index 81c755632f..4a7a3e0db4 100644 --- a/cmake/checks/ffmpeg_test.cpp +++ b/cmake/checks/ffmpeg_test.cpp @@ -15,12 +15,15 @@ static void test() AVFormatContext* c = 0; AVCodec* avcodec = 0; AVFrame* frame = 0; + (void)avcodec; + (void)frame; #if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(52, 111, 0) int err = avformat_open_input(&c, "", NULL, NULL); #else int err = av_open_input_file(&c, "", NULL, 0, NULL); #endif + (void)err; } int main() { test(); return 0; }