summaryrefslogtreecommitdiff
path: root/src/gstreamer
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-10-27 00:36:13 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-08-25 02:58:04 +0300
commitdbafe16da7a9999ec77da21a42537702fb87f124 (patch)
treebf195d3f0feee0efc714267f70d85bfc54b8c63c /src/gstreamer
parent3ef378731ad89de4dd77e0cb79860cc86676060e (diff)
meson: Remove -Wno-unused-parameter
We build libcamera with -Wno-unused-parameter and this doesn't cause much issue internally. However, it prevents catching unused parameters in inline functions defined in public headers. This can lead to compilation warnings for applications compiled without -Wno-unused-parameter. To catch those issues, remove -Wno-unused-parameter and fix all the related warnings with [[maybe_unused]]. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Diffstat (limited to 'src/gstreamer')
-rw-r--r--src/gstreamer/gstlibcamerapool.cpp2
-rw-r--r--src/gstreamer/gstlibcameraprovider.cpp2
-rw-r--r--src/gstreamer/gstlibcamerasrc.cpp7
3 files changed, 7 insertions, 4 deletions
diff --git a/src/gstreamer/gstlibcamerapool.cpp b/src/gstreamer/gstlibcamerapool.cpp
index 8f536169..b756ee35 100644
--- a/src/gstreamer/gstlibcamerapool.cpp
+++ b/src/gstreamer/gstlibcamerapool.cpp
@@ -33,7 +33,7 @@ G_DEFINE_TYPE(GstLibcameraPool, gst_libcamera_pool, GST_TYPE_BUFFER_POOL);
static GstFlowReturn
gst_libcamera_pool_acquire_buffer(GstBufferPool *pool, GstBuffer **buffer,
- GstBufferPoolAcquireParams *params)
+ [[maybe_unused]] GstBufferPoolAcquireParams *params)
{
GstLibcameraPool *self = GST_LIBCAMERA_POOL(pool);
GstBuffer *buf = GST_BUFFER(gst_atomic_queue_pop(self->queue));
diff --git a/src/gstreamer/gstlibcameraprovider.cpp b/src/gstreamer/gstlibcameraprovider.cpp
index 840e87a3..cd850d81 100644
--- a/src/gstreamer/gstlibcameraprovider.cpp
+++ b/src/gstreamer/gstlibcameraprovider.cpp
@@ -89,7 +89,7 @@ gst_libcamera_device_set_property(GObject *object, guint prop_id,
}
static void
-gst_libcamera_device_init(GstLibcameraDevice *self)
+gst_libcamera_device_init([[maybe_unused]] GstLibcameraDevice *self)
{
}
diff --git a/src/gstreamer/gstlibcamerasrc.cpp b/src/gstreamer/gstlibcamerasrc.cpp
index 0c28ae3f..1bfc2e2f 100644
--- a/src/gstreamer/gstlibcamerasrc.cpp
+++ b/src/gstreamer/gstlibcamerasrc.cpp
@@ -338,7 +338,8 @@ gst_libcamera_src_task_run(gpointer user_data)
}
static void
-gst_libcamera_src_task_enter(GstTask *task, GThread *thread, gpointer user_data)
+gst_libcamera_src_task_enter(GstTask *task, [[maybe_unused]] GThread *thread,
+ gpointer user_data)
{
GstLibcameraSrc *self = GST_LIBCAMERA_SRC(user_data);
GLibRecLocker lock(&self->stream_lock);
@@ -467,7 +468,9 @@ done:
}
static void
-gst_libcamera_src_task_leave(GstTask *task, GThread *thread, gpointer user_data)
+gst_libcamera_src_task_leave([[maybe_unused]] GstTask *task,
+ [[maybe_unused]] GThread *thread,
+ gpointer user_data)
{
GstLibcameraSrc *self = GST_LIBCAMERA_SRC(user_data);
GstLibcameraSrcState *state = self->state;