From cee211123a63c54dd2a72a4898a33ac5421d95da Mon Sep 17 00:00:00 2001 From: Jordan Petridis Date: Wed, 5 Aug 2020 12:35:12 +0300 Subject: [PATCH] opencv: compile with -Wno-format-nonliteral opencv plugin is pulling a header which makses clang++ 10 complain a lot and blocks -werror. ``` /usr/include/opencv4/opencv2/flann/logger.h:83:36: error: format string is not a string literal [-Werror,-Wformat-nonliteral] int ret = vfprintf(stream, fmt, arglist); ^~~ ``` Part-of: --- ext/opencv/meson.build | 4 +++- gst-libs/gst/opencv/meson.build | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ext/opencv/meson.build b/ext/opencv/meson.build index 730a1345fb..0b0b3fcf1a 100644 --- a/ext/opencv/meson.build +++ b/ext/opencv/meson.build @@ -105,7 +105,9 @@ endif if opencv_found # opencv4 seems to ship with .pc file that references non-existent include dir # (/usr/include/opencv4/opencv instead of /usr/include/opencv4/opencv2) - gstopencv_cargs += cxx.get_supported_arguments(['-Wno-missing-include-dirs']) + # clang 10 complains about the following header in opencv4 + # /usr/include/opencv4/opencv2/flann/logger.h:83:36: error: format string is not a string literal [-Werror,-Wformat-nonliteral] + gstopencv_cargs += cxx.get_supported_arguments(['-Wno-missing-include-dirs', '-Wno-format-nonliteral']) gstopencv = library('gstopencv', gstopencv_sources, diff --git a/gst-libs/gst/opencv/meson.build b/gst-libs/gst/opencv/meson.build index 522f7e5cc3..6cc4602f31 100644 --- a/gst-libs/gst/opencv/meson.build +++ b/gst-libs/gst/opencv/meson.build @@ -16,7 +16,9 @@ endif if opencv_dep.found() # opencv4 seems to ship with .pc file that references non-existent include dir # (/usr/include/opencv4/opencv instead of /usr/include/opencv4/opencv2) - gstopencv_cargs = cxx.get_supported_arguments(['-Wno-missing-include-dirs']) + # clang 10 complains about the following header in opencv4 + # /usr/include/opencv4/opencv2/flann/logger.h:83:36: error: format string is not a string literal [-Werror,-Wformat-nonliteral] + gstopencv_cargs = cxx.get_supported_arguments(['-Wno-missing-include-dirs', '-Wno-format-nonliteral']) gstopencv = library('gstopencv-' + api_version, opencv_sources,