<div dir='auto'><div>Sorry for the html/phone reply,<br><div class="gmail_extra"><br><div class="gmail_quote">Le 6 mars 2020 18 h 11, Laurent Pinchart <laurent.pinchart@ideasonboard.com> a Ã©crit :<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">The G_DECLARE_FINAL_TYPE macro from GLib creates static inline functions
<br>
that, prior to GLib v2.63.0, were not marked as possibly unused. This
<br>
causes clang to complain about the ones we are not using. Silence the
<br>
-Wunused-function warning in that case.
<br>

<br>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
<br>
---
<br>
 src/gstreamer/meson.build | 12 +++++++++++-
<br>
 1 file changed, 11 insertions(+), 1 deletion(-)
<br>

<br>
diff --git a/src/gstreamer/meson.build b/src/gstreamer/meson.build
<br>
index ca64bf110dde..a144d7d2b4eb 100644
<br>
--- a/src/gstreamer/meson.build
<br>
+++ b/src/gstreamer/meson.build
<br>
@@ -13,13 +13,23 @@ libcamera_gst_c_args = [
<br>
     '-DPACKAGE="@0@"'.format(meson.project_name()),
<br>
 ]
<br>
 
<br>
+glib_dep = dependency('glib', required : get_option('gstreamer'))
<br>
+
<br>
 gst_dep_version = '>=1.14.0'
<br>
 gstvideo_dep = dependency('gstreamer-video-1.0', version : gst_dep_version,
<br>
                           required : get_option('gstreamer'))
<br>
 gstallocator_dep = dependency('gstreamer-allocators-1.0', version : gst_dep_version,
<br>
                               required : get_option('gstreamer'))
<br>
 
<br>
-if gstvideo_dep.found() and gstallocator_dep.found()
<br>
+if glib_dep.found() and gstvideo_dep.found() and gstallocator_dep.found()
<br>
+    # The G_DECLARE_FINAL_TYPE macro from GLib creates static inline functions
<br>
+    # that, prior to GLib v2.63.0, were not marked as possibly unused. This
<br></p></blockquote></div></div></div><div dir="auto">Spurious ,</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">
+    # causes clang to complain about the ones we are not using. Silence the
<br>
+    # -Wunused-function warning in that case.
<br>
+    if cc.get_id() == 'clang' and glib_dep.version().version_compare('<2.63.0')
<br>
+        libcamera_gst_c_args += [ '-Wno-unused-function' ]
<br>
+    endif
<br>
+
<br></p></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com></div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">
     libcamera_gst = shared_library('gstlibcamera',
<br>
         libcamera_gst_sources,
<br>
         c_args : libcamera_gst_c_args,
<br>
-- 
<br>
Regards,
<br>

<br>
Laurent Pinchart
<br>

<br>
</p>
</blockquote></div><br></div></div></div>