Message ID | 20200822200037.20892-5-laurent.pinchart@ideasonboard.com |
---|---|
State | Accepted |
Headers | show |
Series |
|
Related | show |
Hi Laurent, On 22/08/2020 21:00, Laurent Pinchart wrote: > 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. Ohhh removing warning disables makes me happy ;-) Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > --- > include/libcamera/bound_method.h | 2 +- > include/libcamera/signal.h | 2 +- > include/libcamera/span.h | 4 ++-- > meson.build | 1 - > src/android/camera3_hal.cpp | 11 +++++---- > src/android/camera_device.cpp | 5 ++-- > src/android/camera_ops.cpp | 5 ++-- > src/cam/main.cpp | 2 +- > src/gstreamer/gstlibcamerapool.cpp | 2 +- > src/gstreamer/gstlibcameraprovider.cpp | 2 +- > src/gstreamer/gstlibcamerasrc.cpp | 7 ++++-- > src/ipa/raspberrypi/controller/rpi/agc.cpp | 3 ++- > src/ipa/raspberrypi/raspberrypi.cpp | 2 +- > src/ipa/rkisp1/rkisp1.cpp | 13 +++++++---- > src/ipa/vimc/vimc.cpp | 16 ++++++------- > src/libcamera/device_enumerator_udev.cpp | 2 +- > src/libcamera/ipc_unixsocket.cpp | 2 +- > .../pipeline/raspberrypi/raspberrypi.cpp | 5 ++-- > src/libcamera/pipeline/rkisp1/rkisp1.cpp | 2 +- > src/libcamera/pipeline/rkisp1/timeline.cpp | 2 +- > src/libcamera/process.cpp | 2 +- > src/libcamera/proxy/ipa_proxy_linux.cpp | 23 +++++++++++-------- > src/libcamera/v4l2_pixelformat.cpp | 2 +- > src/libcamera/v4l2_videodevice.cpp | 4 ++-- > src/qcam/dng_writer.cpp | 5 ++-- > src/qcam/main.cpp | 2 +- > src/v4l2/v4l2_camera.cpp | 2 +- > test/camera/buffer_import.cpp | 3 ++- > test/camera/capture.cpp | 3 ++- > test/hotplug-cameras.cpp | 4 ++-- > test/ipa/ipa_wrappers_test.cpp | 4 ++-- > test/libtest/test.h | 2 +- > test/log/log_process.cpp | 3 ++- > test/object-invoke.cpp | 2 +- > test/process/process_test.cpp | 3 ++- > test/timer-thread.cpp | 2 +- > test/timer.cpp | 2 +- > 37 files changed, 89 insertions(+), 69 deletions(-) > > diff --git a/include/libcamera/bound_method.h b/include/libcamera/bound_method.h > index 983bb5cbbad0..d1e4448304a9 100644 > --- a/include/libcamera/bound_method.h > +++ b/include/libcamera/bound_method.h > @@ -214,7 +214,7 @@ public: > > bool match(R (*func)(Args...)) const { return func == func_; } > > - R activate(Args... args, bool deleteMethod = false) override > + R activate(Args... args, [[maybe_unused]] bool deleteMethod = false) override > { > return (*func_)(args...); > } > diff --git a/include/libcamera/signal.h b/include/libcamera/signal.h > index ed30eb559127..accb797e911c 100644 > --- a/include/libcamera/signal.h > +++ b/include/libcamera/signal.h > @@ -70,7 +70,7 @@ public: > > void disconnect() > { > - SignalBase::disconnect([](SlotList::iterator &iter) { > + SignalBase::disconnect([]([[maybe_unused]] SlotList::iterator &iter) { > return true; > }); > } > diff --git a/include/libcamera/span.h b/include/libcamera/span.h > index 513ddb432405..738af6aca871 100644 > --- a/include/libcamera/span.h > +++ b/include/libcamera/span.h > @@ -113,12 +113,12 @@ public: > { > } > > - constexpr Span(pointer ptr, size_type count) > + constexpr Span(pointer ptr, [[maybe_unused]] size_type count) > : data_(ptr) > { > } > > - constexpr Span(pointer first, pointer last) > + constexpr Span(pointer first, [[maybe_unused]] pointer last) > : data_(first) > { > } > diff --git a/meson.build b/meson.build > index ce1d1c63ddc6..d7e8122ccaa3 100644 > --- a/meson.build > +++ b/meson.build > @@ -37,7 +37,6 @@ if cc.has_header_symbol('stdlib.h', 'secure_getenv', prefix : '#define _GNU_SOUR > endif > > common_arguments = [ > - '-Wno-unused-parameter', > '-include', 'config.h', > ] > > diff --git a/src/android/camera3_hal.cpp b/src/android/camera3_hal.cpp > index decaf59e6915..ddcfea591ce6 100644 > --- a/src/android/camera3_hal.cpp > +++ b/src/android/camera3_hal.cpp > @@ -32,18 +32,21 @@ static int hal_get_camera_info(int id, struct camera_info *info) > return cameraManager.getCameraInfo(id, info); > } > > -static int hal_set_callbacks(const camera_module_callbacks_t *callbacks) > +static int hal_set_callbacks([[maybe_unused]] const camera_module_callbacks_t *callbacks) > { > return 0; > } > > -static int hal_open_legacy(const struct hw_module_t *module, const char *id, > - uint32_t halVersion, struct hw_device_t **device) > +static int hal_open_legacy([[maybe_unused]] const struct hw_module_t *module, > + [[maybe_unused]] const char *id, > + [[maybe_unused]] uint32_t halVersion, > + [[maybe_unused]] struct hw_device_t **device) > { > return -ENOSYS; > } > > -static int hal_set_torch_mode(const char *camera_id, bool enabled) > +static int hal_set_torch_mode([[maybe_unused]] const char *camera_id, > + [[maybe_unused]] bool enabled) > { > return -ENOSYS; > } > diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp > index 3419236a061c..8a39bee690a0 100644 > --- a/src/android/camera_device.cpp > +++ b/src/android/camera_device.cpp > @@ -1541,8 +1541,9 @@ void CameraDevice::notifyError(uint32_t frameNumber, camera3_stream_t *stream) > /* > * Produce a set of fixed result metadata. > */ > -std::unique_ptr<CameraMetadata> CameraDevice::getResultMetadata(int frame_number, > - int64_t timestamp) > +std::unique_ptr<CameraMetadata> > +CameraDevice::getResultMetadata([[maybe_unused]] int frame_number, > + int64_t timestamp) > { > /* > * \todo Keep this in sync with the actual number of entries. > diff --git a/src/android/camera_ops.cpp b/src/android/camera_ops.cpp > index 216ac285f964..696e80436821 100644 > --- a/src/android/camera_ops.cpp > +++ b/src/android/camera_ops.cpp > @@ -61,11 +61,12 @@ static int hal_dev_process_capture_request(const struct camera3_device *dev, > return camera->processCaptureRequest(request); > } > > -static void hal_dev_dump(const struct camera3_device *dev, int fd) > +static void hal_dev_dump([[maybe_unused]] const struct camera3_device *dev, > + [[maybe_unused]] int fd) > { > } > > -static int hal_dev_flush(const struct camera3_device *dev) > +static int hal_dev_flush([[maybe_unused]] const struct camera3_device *dev) > { > return 0; > } > diff --git a/src/cam/main.cpp b/src/cam/main.cpp > index cc3facd5a5b2..244720b491f5 100644 > --- a/src/cam/main.cpp > +++ b/src/cam/main.cpp > @@ -378,7 +378,7 @@ int CamApp::run() > return 0; > } > > -void signalHandler(int signal) > +void signalHandler([[maybe_unused]] int signal) > { > std::cout << "Exiting" << std::endl; > CamApp::instance()->quit(); > diff --git a/src/gstreamer/gstlibcamerapool.cpp b/src/gstreamer/gstlibcamerapool.cpp > index 8f536169455f..b756ee356d61 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 840e87a3d8da..cd850d813a6e 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 0c28ae3f2852..1bfc2e2f8cf3 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; > diff --git a/src/ipa/raspberrypi/controller/rpi/agc.cpp b/src/ipa/raspberrypi/controller/rpi/agc.cpp > index c02b5ece242f..3573f36be46a 100644 > --- a/src/ipa/raspberrypi/controller/rpi/agc.cpp > +++ b/src/ipa/raspberrypi/controller/rpi/agc.cpp > @@ -221,7 +221,8 @@ void Agc::SetConstraintMode(std::string const &constraint_mode_name) > constraint_mode_name_ = constraint_mode_name; > } > > -void Agc::SwitchMode(CameraMode const &camera_mode, Metadata *metadata) > +void Agc::SwitchMode([[maybe_unused]] CameraMode const &camera_mode, > + Metadata *metadata) > { > // On a mode switch, it's possible the exposure profile could change, > // so we run through the dividing up of exposure/gain again and > diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp > index 37472087f5a9..4557016c2dd4 100644 > --- a/src/ipa/raspberrypi/raspberrypi.cpp > +++ b/src/ipa/raspberrypi/raspberrypi.cpp > @@ -191,7 +191,7 @@ void IPARPi::setMode(const CameraSensorInfo &sensorInfo) > } > > void IPARPi::configure(const CameraSensorInfo &sensorInfo, > - const std::map<unsigned int, IPAStream> &streamConfig, > + [[maybe_unused]] const std::map<unsigned int, IPAStream> &streamConfig, > const std::map<unsigned int, const ControlInfoMap &> &entityControls, > const IPAOperationData &ipaConfig, > IPAOperationData *result) > diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp > index 3a1c50c4add0..d95d902adff3 100644 > --- a/src/ipa/rkisp1/rkisp1.cpp > +++ b/src/ipa/rkisp1/rkisp1.cpp > @@ -32,7 +32,10 @@ LOG_DEFINE_CATEGORY(IPARkISP1) > class IPARkISP1 : public IPAInterface > { > public: > - int init(const IPASettings &settings) override { return 0; } > + int init([[maybe_unused]] const IPASettings &settings) override > + { > + return 0; > + } > int start() override { return 0; } > void stop() override {} > > @@ -75,11 +78,11 @@ private: > * assemble one. Make sure the reported sensor information are relevant > * before accessing them. > */ > -void IPARkISP1::configure(const CameraSensorInfo &info, > - const std::map<unsigned int, IPAStream> &streamConfig, > +void IPARkISP1::configure([[maybe_unused]] const CameraSensorInfo &info, > + [[maybe_unused]] const std::map<unsigned int, IPAStream> &streamConfig, > const std::map<unsigned int, const ControlInfoMap &> &entityControls, > - const IPAOperationData &ipaConfig, > - IPAOperationData *result) > + [[maybe_unused]] const IPAOperationData &ipaConfig, > + [[maybe_unused]] IPAOperationData *result) > { > if (entityControls.empty()) > return; > diff --git a/src/ipa/vimc/vimc.cpp b/src/ipa/vimc/vimc.cpp > index 1593c92d80f3..ef257762a1d4 100644 > --- a/src/ipa/vimc/vimc.cpp > +++ b/src/ipa/vimc/vimc.cpp > @@ -37,14 +37,14 @@ public: > int start() override; > void stop() override; > > - void configure(const CameraSensorInfo &sensorInfo, > - const std::map<unsigned int, IPAStream> &streamConfig, > - const std::map<unsigned int, const ControlInfoMap &> &entityControls, > - const IPAOperationData &ipaConfig, > - IPAOperationData *result) override {} > - void mapBuffers(const std::vector<IPABuffer> &buffers) override {} > - void unmapBuffers(const std::vector<unsigned int> &ids) override {} > - void processEvent(const IPAOperationData &event) override {} > + void configure([[maybe_unused]] const CameraSensorInfo &sensorInfo, > + [[maybe_unused]] const std::map<unsigned int, IPAStream> &streamConfig, > + [[maybe_unused]] const std::map<unsigned int, const ControlInfoMap &> &entityControls, > + [[maybe_unused]] const IPAOperationData &ipaConfig, > + [[maybe_unused]] IPAOperationData *result) override {} > + void mapBuffers([[maybe_unused]] const std::vector<IPABuffer> &buffers) override {} > + void unmapBuffers([[maybe_unused]] const std::vector<unsigned int> &ids) override {} > + void processEvent([[maybe_unused]] const IPAOperationData &event) override {} > > private: > void initTrace(); > diff --git a/src/libcamera/device_enumerator_udev.cpp b/src/libcamera/device_enumerator_udev.cpp > index 96689daa5dd1..c6e23a1a7a18 100644 > --- a/src/libcamera/device_enumerator_udev.cpp > +++ b/src/libcamera/device_enumerator_udev.cpp > @@ -327,7 +327,7 @@ int DeviceEnumeratorUdev::addV4L2Device(dev_t devnum) > return 0; > } > > -void DeviceEnumeratorUdev::udevNotify(EventNotifier *notifier) > +void DeviceEnumeratorUdev::udevNotify([[maybe_unused]] EventNotifier *notifier) > { > struct udev_device *dev = udev_monitor_receive_device(monitor_); > std::string action(udev_device_get_action(dev)); > diff --git a/src/libcamera/ipc_unixsocket.cpp b/src/libcamera/ipc_unixsocket.cpp > index 7df86e885f23..701b2c518217 100644 > --- a/src/libcamera/ipc_unixsocket.cpp > +++ b/src/libcamera/ipc_unixsocket.cpp > @@ -308,7 +308,7 @@ int IPCUnixSocket::recvData(void *buffer, size_t length, > return 0; > } > > -void IPCUnixSocket::dataNotifier(EventNotifier *notifier) > +void IPCUnixSocket::dataNotifier([[maybe_unused]] EventNotifier *notifier) > { > int ret; > > diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp > index b8f0549f0c60..42c9caa03e2e 100644 > --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp > +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp > @@ -758,7 +758,7 @@ int PipelineHandlerRPi::configure(Camera *camera, CameraConfiguration *config) > return ret; > } > > -int PipelineHandlerRPi::exportFrameBuffers(Camera *camera, Stream *stream, > +int PipelineHandlerRPi::exportFrameBuffers([[maybe_unused]] Camera *camera, Stream *stream, > std::vector<std::unique_ptr<FrameBuffer>> *buffers) > { > RPiStream *s = static_cast<RPiStream *>(stream); > @@ -1182,7 +1182,8 @@ int RPiCameraData::configureIPA() > return 0; > } > > -void RPiCameraData::queueFrameAction(unsigned int frame, const IPAOperationData &action) > +void RPiCameraData::queueFrameAction([[maybe_unused]] unsigned int frame, > + const IPAOperationData &action) > { > /* > * The following actions can be handled when the pipeline handler is in > diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp > index 32fdaed7c661..4d89aab3845d 100644 > --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp > +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp > @@ -700,7 +700,7 @@ int PipelineHandlerRkISP1::configure(Camera *camera, CameraConfiguration *c) > return 0; > } > > -int PipelineHandlerRkISP1::exportFrameBuffers(Camera *camera, Stream *stream, > +int PipelineHandlerRkISP1::exportFrameBuffers([[maybe_unused]] Camera *camera, Stream *stream, > std::vector<std::unique_ptr<FrameBuffer>> *buffers) > { > unsigned int count = stream->configuration().bufferCount; > diff --git a/src/libcamera/pipeline/rkisp1/timeline.cpp b/src/libcamera/pipeline/rkisp1/timeline.cpp > index f5194608ced7..6b83bbe5b589 100644 > --- a/src/libcamera/pipeline/rkisp1/timeline.cpp > +++ b/src/libcamera/pipeline/rkisp1/timeline.cpp > @@ -204,7 +204,7 @@ void Timeline::updateDeadline() > timer_.start(deadline); > } > > -void Timeline::timeout(Timer *timer) > +void Timeline::timeout([[maybe_unused]] Timer *timer) > { > utils::time_point now = std::chrono::steady_clock::now(); > > diff --git a/src/libcamera/process.cpp b/src/libcamera/process.cpp > index 8311d274a288..994190dc6f3d 100644 > --- a/src/libcamera/process.cpp > +++ b/src/libcamera/process.cpp > @@ -89,7 +89,7 @@ void sigact(int signal, siginfo_t *info, void *ucontext) > > } /* namespace */ > > -void ProcessManager::sighandler(EventNotifier *notifier) > +void ProcessManager::sighandler([[maybe_unused]] EventNotifier *notifier) > { > char data; > ssize_t ret = read(pipe_[0], &data, sizeof(data)); > diff --git a/src/libcamera/proxy/ipa_proxy_linux.cpp b/src/libcamera/proxy/ipa_proxy_linux.cpp > index 68eafb307b2a..b78a0e4535f5 100644 > --- a/src/libcamera/proxy/ipa_proxy_linux.cpp > +++ b/src/libcamera/proxy/ipa_proxy_linux.cpp > @@ -26,17 +26,20 @@ public: > IPAProxyLinux(IPAModule *ipam); > ~IPAProxyLinux(); > > - int init(const IPASettings &settings) override { return 0; } > + int init([[maybe_unused]] const IPASettings &settings) override > + { > + return 0; > + } > int start() override { return 0; } > void stop() override {} > - void configure(const CameraSensorInfo &sensorInfo, > - const std::map<unsigned int, IPAStream> &streamConfig, > - const std::map<unsigned int, const ControlInfoMap &> &entityControls, > - const IPAOperationData &ipaConfig, > - IPAOperationData *result) override {} > - void mapBuffers(const std::vector<IPABuffer> &buffers) override {} > - void unmapBuffers(const std::vector<unsigned int> &ids) override {} > - void processEvent(const IPAOperationData &event) override {} > + void configure([[maybe_unused]] const CameraSensorInfo &sensorInfo, > + [[maybe_unused]] const std::map<unsigned int, IPAStream> &streamConfig, > + [[maybe_unused]] const std::map<unsigned int, const ControlInfoMap &> &entityControls, > + [[maybe_unused]] const IPAOperationData &ipaConfig, > + [[maybe_unused]] IPAOperationData *result) override {} > + void mapBuffers([[maybe_unused]] const std::vector<IPABuffer> &buffers) override {} > + void unmapBuffers([[maybe_unused]] const std::vector<unsigned int> &ids) override {} > + void processEvent([[maybe_unused]] const IPAOperationData &event) override {} > > private: > void readyRead(IPCUnixSocket *ipc); > @@ -91,7 +94,7 @@ IPAProxyLinux::~IPAProxyLinux() > delete socket_; > } > > -void IPAProxyLinux::readyRead(IPCUnixSocket *ipc) > +void IPAProxyLinux::readyRead([[maybe_unused]] IPCUnixSocket *ipc) > { > } > > diff --git a/src/libcamera/v4l2_pixelformat.cpp b/src/libcamera/v4l2_pixelformat.cpp > index 8391ec48ac10..30c94bb98f44 100644 > --- a/src/libcamera/v4l2_pixelformat.cpp > +++ b/src/libcamera/v4l2_pixelformat.cpp > @@ -196,7 +196,7 @@ PixelFormat V4L2PixelFormat::toPixelFormat() const > * \return The V4L2PixelFormat corresponding to \a pixelFormat > */ > V4L2PixelFormat V4L2PixelFormat::fromPixelFormat(const PixelFormat &pixelFormat, > - bool multiplanar) > + [[maybe_unused]] bool multiplanar) > { > const PixelFormatInfo &info = PixelFormatInfo::info(pixelFormat); > if (!info.isValid()) > diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp > index 652677ff1d4d..508522ef42bb 100644 > --- a/src/libcamera/v4l2_videodevice.cpp > +++ b/src/libcamera/v4l2_videodevice.cpp > @@ -1462,7 +1462,7 @@ int V4L2VideoDevice::queueBuffer(FrameBuffer *buffer) > * For Capture video devices the FrameBuffer will contain valid data. > * For Output video devices the FrameBuffer can be considered empty. > */ > -void V4L2VideoDevice::bufferAvailable(EventNotifier *notifier) > +void V4L2VideoDevice::bufferAvailable([[maybe_unused]] EventNotifier *notifier) > { > FrameBuffer *buffer = dequeueBuffer(); > if (!buffer) > @@ -1539,7 +1539,7 @@ FrameBuffer *V4L2VideoDevice::dequeueBuffer() > * When this slot is called, a V4L2 event is available to be dequeued from the > * device. > */ > -void V4L2VideoDevice::eventAvailable(EventNotifier *notifier) > +void V4L2VideoDevice::eventAvailable([[maybe_unused]] EventNotifier *notifier) > { > struct v4l2_event event{}; > int ret = ioctl(VIDIOC_DQEVENT, &event); > diff --git a/src/qcam/dng_writer.cpp b/src/qcam/dng_writer.cpp > index b5b81f0637b5..030d1387118d 100644 > --- a/src/qcam/dng_writer.cpp > +++ b/src/qcam/dng_writer.cpp > @@ -215,7 +215,7 @@ void packScanlineIPU3(void *output, const void *input, unsigned int width) > } > } > > -void thumbScanlineIPU3(const FormatInfo &info, void *output, > +void thumbScanlineIPU3([[maybe_unused]] const FormatInfo &info, void *output, > const void *input, unsigned int width, > unsigned int stride) > { > @@ -350,7 +350,8 @@ static const std::map<PixelFormat, FormatInfo> formatInfo = { > int DNGWriter::write(const char *filename, const Camera *camera, > const StreamConfiguration &config, > const ControlList &metadata, > - const FrameBuffer *buffer, const void *data) > + [[maybe_unused]] const FrameBuffer *buffer, > + const void *data) > { > const auto it = formatInfo.find(config.pixelFormat); > if (it == formatInfo.cend()) { > diff --git a/src/qcam/main.cpp b/src/qcam/main.cpp > index b3468cbf47e2..bae358df0877 100644 > --- a/src/qcam/main.cpp > +++ b/src/qcam/main.cpp > @@ -17,7 +17,7 @@ > #include "../cam/stream_options.h" > #include "main_window.h" > > -void signalHandler(int signal) > +void signalHandler([[maybe_unused]] int signal) > { > qInfo() << "Exiting"; > qApp->quit(); > diff --git a/src/v4l2/v4l2_camera.cpp b/src/v4l2/v4l2_camera.cpp > index 61bca0732447..7a22f983ec0e 100644 > --- a/src/v4l2/v4l2_camera.cpp > +++ b/src/v4l2/v4l2_camera.cpp > @@ -158,7 +158,7 @@ int V4L2Camera::validateConfiguration(const PixelFormat &pixelFormat, > return 0; > } > > -int V4L2Camera::allocBuffers(unsigned int count) > +int V4L2Camera::allocBuffers([[maybe_unused]] unsigned int count) > { > Stream *stream = config_->at(0).stream(); > > diff --git a/test/camera/buffer_import.cpp b/test/camera/buffer_import.cpp > index 97a8582761a7..d57ffa75edeb 100644 > --- a/test/camera/buffer_import.cpp > +++ b/test/camera/buffer_import.cpp > @@ -33,7 +33,8 @@ public: > } > > protected: > - void bufferComplete(Request *request, FrameBuffer *buffer) > + void bufferComplete([[maybe_unused]] Request *request, > + FrameBuffer *buffer) > { > if (buffer->metadata().status != FrameMetadata::FrameSuccess) > return; > diff --git a/test/camera/capture.cpp b/test/camera/capture.cpp > index 0fe3bf9be7f1..eb67bf2da71f 100644 > --- a/test/camera/capture.cpp > +++ b/test/camera/capture.cpp > @@ -26,7 +26,8 @@ protected: > unsigned int completeBuffersCount_; > unsigned int completeRequestsCount_; > > - void bufferComplete(Request *request, FrameBuffer *buffer) > + void bufferComplete([[maybe_unused]] Request *request, > + FrameBuffer *buffer) > { > if (buffer->metadata().status != FrameMetadata::FrameSuccess) > return; > diff --git a/test/hotplug-cameras.cpp b/test/hotplug-cameras.cpp > index 6a94535fa315..7d551eeb900d 100644 > --- a/test/hotplug-cameras.cpp > +++ b/test/hotplug-cameras.cpp > @@ -26,12 +26,12 @@ using namespace libcamera; > class HotplugTest : public Test > { > protected: > - void cameraAddedHandler(std::shared_ptr<Camera> cam) > + void cameraAddedHandler([[maybe_unused]] std::shared_ptr<Camera> cam) > { > cameraAdded_ = true; > } > > - void cameraRemovedHandler(std::shared_ptr<Camera> cam) > + void cameraRemovedHandler([[maybe_unused]] std::shared_ptr<Camera> cam) > { > cameraRemoved_ = true; > } > diff --git a/test/ipa/ipa_wrappers_test.cpp b/test/ipa/ipa_wrappers_test.cpp > index 23c799da0663..59d991cbbf6a 100644 > --- a/test/ipa/ipa_wrappers_test.cpp > +++ b/test/ipa/ipa_wrappers_test.cpp > @@ -70,8 +70,8 @@ public: > void configure(const CameraSensorInfo &sensorInfo, > const std::map<unsigned int, IPAStream> &streamConfig, > const std::map<unsigned int, const ControlInfoMap &> &entityControls, > - const IPAOperationData &ipaConfig, > - IPAOperationData *result) override > + [[maybe_unused]] const IPAOperationData &ipaConfig, > + [[maybe_unused]] IPAOperationData *result) override > { > /* Verify sensorInfo. */ > if (sensorInfo.outputSize.width != 2560 || > diff --git a/test/libtest/test.h b/test/libtest/test.h > index 26d4b94bc12d..8ecf2bda950f 100644 > --- a/test/libtest/test.h > +++ b/test/libtest/test.h > @@ -30,7 +30,7 @@ protected: > }; > > #define TEST_REGISTER(klass) \ > -int main(int argc, char *argv[]) \ > +int main([[maybe_unused]] int argc, [[maybe_unused]] char *argv[]) \ > { \ > return klass().execute(); \ > } > diff --git a/test/log/log_process.cpp b/test/log/log_process.cpp > index d46d5e354727..b024f002843c 100644 > --- a/test/log/log_process.cpp > +++ b/test/log/log_process.cpp > @@ -125,7 +125,8 @@ protected: > } > > private: > - void procFinished(Process *proc, enum Process::ExitStatus exitStatus, int exitCode) > + void procFinished([[maybe_unused]] Process *proc, > + enum Process::ExitStatus exitStatus, int exitCode) > { > exitStatus_ = exitStatus; > exitCode_ = exitCode; > diff --git a/test/object-invoke.cpp b/test/object-invoke.cpp > index 1ae11bb11e16..f3fd23283239 100644 > --- a/test/object-invoke.cpp > +++ b/test/object-invoke.cpp > @@ -50,7 +50,7 @@ public: > value_ = value; > } > > - void methodWithReference(const int &value) > + void methodWithReference([[maybe_unused]] const int &value) > { > } > > diff --git a/test/process/process_test.cpp b/test/process/process_test.cpp > index 721a7c9d46ff..42a26749f5d9 100644 > --- a/test/process/process_test.cpp > +++ b/test/process/process_test.cpp > @@ -80,7 +80,8 @@ protected: > } > > private: > - void procFinished(Process *proc, enum Process::ExitStatus exitStatus, int exitCode) > + void procFinished([[maybe_unused]] Process *proc, > + enum Process::ExitStatus exitStatus, int exitCode) > { > exitStatus_ = exitStatus; > exitCode_ = exitCode; > diff --git a/test/timer-thread.cpp b/test/timer-thread.cpp > index 2f901787f5fb..f794d8e7dd4e 100644 > --- a/test/timer-thread.cpp > +++ b/test/timer-thread.cpp > @@ -40,7 +40,7 @@ public: > } > > private: > - void timeoutHandler(Timer *timer) > + void timeoutHandler([[maybe_unused]] Timer *timer) > { > timeout_ = true; > } > diff --git a/test/timer.cpp b/test/timer.cpp > index 7d5b93c37799..537489d736ad 100644 > --- a/test/timer.cpp > +++ b/test/timer.cpp > @@ -57,7 +57,7 @@ public: > } > > private: > - void timeoutHandler(Timer *timer) > + void timeoutHandler([[maybe_unused]] Timer *timer) > { > expiration_ = std::chrono::steady_clock::now(); > count_++; >
Hi Laurent, On Sat, Aug 22, 2020 at 11:00:36PM +0300, Laurent Pinchart wrote: > 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. I would mention the usage of [[maybe_unused]] as that's what allows you to drop the -Wno-unused-parameter flag :) Looks good otherwise. > > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > --- > include/libcamera/bound_method.h | 2 +- > include/libcamera/signal.h | 2 +- > include/libcamera/span.h | 4 ++-- > meson.build | 1 - > src/android/camera3_hal.cpp | 11 +++++---- > src/android/camera_device.cpp | 5 ++-- > src/android/camera_ops.cpp | 5 ++-- > src/cam/main.cpp | 2 +- > src/gstreamer/gstlibcamerapool.cpp | 2 +- > src/gstreamer/gstlibcameraprovider.cpp | 2 +- > src/gstreamer/gstlibcamerasrc.cpp | 7 ++++-- > src/ipa/raspberrypi/controller/rpi/agc.cpp | 3 ++- > src/ipa/raspberrypi/raspberrypi.cpp | 2 +- > src/ipa/rkisp1/rkisp1.cpp | 13 +++++++---- > src/ipa/vimc/vimc.cpp | 16 ++++++------- > src/libcamera/device_enumerator_udev.cpp | 2 +- > src/libcamera/ipc_unixsocket.cpp | 2 +- > .../pipeline/raspberrypi/raspberrypi.cpp | 5 ++-- > src/libcamera/pipeline/rkisp1/rkisp1.cpp | 2 +- > src/libcamera/pipeline/rkisp1/timeline.cpp | 2 +- > src/libcamera/process.cpp | 2 +- > src/libcamera/proxy/ipa_proxy_linux.cpp | 23 +++++++++++-------- > src/libcamera/v4l2_pixelformat.cpp | 2 +- > src/libcamera/v4l2_videodevice.cpp | 4 ++-- > src/qcam/dng_writer.cpp | 5 ++-- > src/qcam/main.cpp | 2 +- > src/v4l2/v4l2_camera.cpp | 2 +- > test/camera/buffer_import.cpp | 3 ++- > test/camera/capture.cpp | 3 ++- > test/hotplug-cameras.cpp | 4 ++-- > test/ipa/ipa_wrappers_test.cpp | 4 ++-- > test/libtest/test.h | 2 +- > test/log/log_process.cpp | 3 ++- > test/object-invoke.cpp | 2 +- > test/process/process_test.cpp | 3 ++- > test/timer-thread.cpp | 2 +- > test/timer.cpp | 2 +- > 37 files changed, 89 insertions(+), 69 deletions(-) > > diff --git a/include/libcamera/bound_method.h b/include/libcamera/bound_method.h > index 983bb5cbbad0..d1e4448304a9 100644 > --- a/include/libcamera/bound_method.h > +++ b/include/libcamera/bound_method.h > @@ -214,7 +214,7 @@ public: > > bool match(R (*func)(Args...)) const { return func == func_; } > > - R activate(Args... args, bool deleteMethod = false) override > + R activate(Args... args, [[maybe_unused]] bool deleteMethod = false) override > { > return (*func_)(args...); > } > diff --git a/include/libcamera/signal.h b/include/libcamera/signal.h > index ed30eb559127..accb797e911c 100644 > --- a/include/libcamera/signal.h > +++ b/include/libcamera/signal.h > @@ -70,7 +70,7 @@ public: > > void disconnect() > { > - SignalBase::disconnect([](SlotList::iterator &iter) { > + SignalBase::disconnect([]([[maybe_unused]] SlotList::iterator &iter) { > return true; > }); > } > diff --git a/include/libcamera/span.h b/include/libcamera/span.h > index 513ddb432405..738af6aca871 100644 > --- a/include/libcamera/span.h > +++ b/include/libcamera/span.h > @@ -113,12 +113,12 @@ public: > { > } > > - constexpr Span(pointer ptr, size_type count) > + constexpr Span(pointer ptr, [[maybe_unused]] size_type count) > : data_(ptr) > { > } > > - constexpr Span(pointer first, pointer last) > + constexpr Span(pointer first, [[maybe_unused]] pointer last) > : data_(first) > { > } > diff --git a/meson.build b/meson.build > index ce1d1c63ddc6..d7e8122ccaa3 100644 > --- a/meson.build > +++ b/meson.build > @@ -37,7 +37,6 @@ if cc.has_header_symbol('stdlib.h', 'secure_getenv', prefix : '#define _GNU_SOUR > endif > > common_arguments = [ > - '-Wno-unused-parameter', > '-include', 'config.h', > ] > > diff --git a/src/android/camera3_hal.cpp b/src/android/camera3_hal.cpp > index decaf59e6915..ddcfea591ce6 100644 > --- a/src/android/camera3_hal.cpp > +++ b/src/android/camera3_hal.cpp > @@ -32,18 +32,21 @@ static int hal_get_camera_info(int id, struct camera_info *info) > return cameraManager.getCameraInfo(id, info); > } > > -static int hal_set_callbacks(const camera_module_callbacks_t *callbacks) > +static int hal_set_callbacks([[maybe_unused]] const camera_module_callbacks_t *callbacks) > { > return 0; > } > > -static int hal_open_legacy(const struct hw_module_t *module, const char *id, > - uint32_t halVersion, struct hw_device_t **device) > +static int hal_open_legacy([[maybe_unused]] const struct hw_module_t *module, > + [[maybe_unused]] const char *id, > + [[maybe_unused]] uint32_t halVersion, > + [[maybe_unused]] struct hw_device_t **device) > { > return -ENOSYS; > } > > -static int hal_set_torch_mode(const char *camera_id, bool enabled) > +static int hal_set_torch_mode([[maybe_unused]] const char *camera_id, > + [[maybe_unused]] bool enabled) > { > return -ENOSYS; > } > diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp > index 3419236a061c..8a39bee690a0 100644 > --- a/src/android/camera_device.cpp > +++ b/src/android/camera_device.cpp > @@ -1541,8 +1541,9 @@ void CameraDevice::notifyError(uint32_t frameNumber, camera3_stream_t *stream) > /* > * Produce a set of fixed result metadata. > */ > -std::unique_ptr<CameraMetadata> CameraDevice::getResultMetadata(int frame_number, > - int64_t timestamp) > +std::unique_ptr<CameraMetadata> > +CameraDevice::getResultMetadata([[maybe_unused]] int frame_number, > + int64_t timestamp) > { > /* > * \todo Keep this in sync with the actual number of entries. > diff --git a/src/android/camera_ops.cpp b/src/android/camera_ops.cpp > index 216ac285f964..696e80436821 100644 > --- a/src/android/camera_ops.cpp > +++ b/src/android/camera_ops.cpp > @@ -61,11 +61,12 @@ static int hal_dev_process_capture_request(const struct camera3_device *dev, > return camera->processCaptureRequest(request); > } > > -static void hal_dev_dump(const struct camera3_device *dev, int fd) > +static void hal_dev_dump([[maybe_unused]] const struct camera3_device *dev, > + [[maybe_unused]] int fd) > { > } > > -static int hal_dev_flush(const struct camera3_device *dev) > +static int hal_dev_flush([[maybe_unused]] const struct camera3_device *dev) > { > return 0; > } > diff --git a/src/cam/main.cpp b/src/cam/main.cpp > index cc3facd5a5b2..244720b491f5 100644 > --- a/src/cam/main.cpp > +++ b/src/cam/main.cpp > @@ -378,7 +378,7 @@ int CamApp::run() > return 0; > } > > -void signalHandler(int signal) > +void signalHandler([[maybe_unused]] int signal) > { > std::cout << "Exiting" << std::endl; > CamApp::instance()->quit(); > diff --git a/src/gstreamer/gstlibcamerapool.cpp b/src/gstreamer/gstlibcamerapool.cpp > index 8f536169455f..b756ee356d61 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 840e87a3d8da..cd850d813a6e 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 0c28ae3f2852..1bfc2e2f8cf3 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; > diff --git a/src/ipa/raspberrypi/controller/rpi/agc.cpp b/src/ipa/raspberrypi/controller/rpi/agc.cpp > index c02b5ece242f..3573f36be46a 100644 > --- a/src/ipa/raspberrypi/controller/rpi/agc.cpp > +++ b/src/ipa/raspberrypi/controller/rpi/agc.cpp > @@ -221,7 +221,8 @@ void Agc::SetConstraintMode(std::string const &constraint_mode_name) > constraint_mode_name_ = constraint_mode_name; > } > > -void Agc::SwitchMode(CameraMode const &camera_mode, Metadata *metadata) > +void Agc::SwitchMode([[maybe_unused]] CameraMode const &camera_mode, > + Metadata *metadata) > { > // On a mode switch, it's possible the exposure profile could change, > // so we run through the dividing up of exposure/gain again and > diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp > index 37472087f5a9..4557016c2dd4 100644 > --- a/src/ipa/raspberrypi/raspberrypi.cpp > +++ b/src/ipa/raspberrypi/raspberrypi.cpp > @@ -191,7 +191,7 @@ void IPARPi::setMode(const CameraSensorInfo &sensorInfo) > } > > void IPARPi::configure(const CameraSensorInfo &sensorInfo, > - const std::map<unsigned int, IPAStream> &streamConfig, > + [[maybe_unused]] const std::map<unsigned int, IPAStream> &streamConfig, > const std::map<unsigned int, const ControlInfoMap &> &entityControls, > const IPAOperationData &ipaConfig, > IPAOperationData *result) > diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp > index 3a1c50c4add0..d95d902adff3 100644 > --- a/src/ipa/rkisp1/rkisp1.cpp > +++ b/src/ipa/rkisp1/rkisp1.cpp > @@ -32,7 +32,10 @@ LOG_DEFINE_CATEGORY(IPARkISP1) > class IPARkISP1 : public IPAInterface > { > public: > - int init(const IPASettings &settings) override { return 0; } > + int init([[maybe_unused]] const IPASettings &settings) override > + { > + return 0; > + } > int start() override { return 0; } > void stop() override {} > > @@ -75,11 +78,11 @@ private: > * assemble one. Make sure the reported sensor information are relevant > * before accessing them. > */ > -void IPARkISP1::configure(const CameraSensorInfo &info, > - const std::map<unsigned int, IPAStream> &streamConfig, > +void IPARkISP1::configure([[maybe_unused]] const CameraSensorInfo &info, > + [[maybe_unused]] const std::map<unsigned int, IPAStream> &streamConfig, > const std::map<unsigned int, const ControlInfoMap &> &entityControls, > - const IPAOperationData &ipaConfig, > - IPAOperationData *result) > + [[maybe_unused]] const IPAOperationData &ipaConfig, > + [[maybe_unused]] IPAOperationData *result) > { > if (entityControls.empty()) > return; > diff --git a/src/ipa/vimc/vimc.cpp b/src/ipa/vimc/vimc.cpp > index 1593c92d80f3..ef257762a1d4 100644 > --- a/src/ipa/vimc/vimc.cpp > +++ b/src/ipa/vimc/vimc.cpp > @@ -37,14 +37,14 @@ public: > int start() override; > void stop() override; > > - void configure(const CameraSensorInfo &sensorInfo, > - const std::map<unsigned int, IPAStream> &streamConfig, > - const std::map<unsigned int, const ControlInfoMap &> &entityControls, > - const IPAOperationData &ipaConfig, > - IPAOperationData *result) override {} > - void mapBuffers(const std::vector<IPABuffer> &buffers) override {} > - void unmapBuffers(const std::vector<unsigned int> &ids) override {} > - void processEvent(const IPAOperationData &event) override {} > + void configure([[maybe_unused]] const CameraSensorInfo &sensorInfo, > + [[maybe_unused]] const std::map<unsigned int, IPAStream> &streamConfig, > + [[maybe_unused]] const std::map<unsigned int, const ControlInfoMap &> &entityControls, > + [[maybe_unused]] const IPAOperationData &ipaConfig, > + [[maybe_unused]] IPAOperationData *result) override {} > + void mapBuffers([[maybe_unused]] const std::vector<IPABuffer> &buffers) override {} > + void unmapBuffers([[maybe_unused]] const std::vector<unsigned int> &ids) override {} > + void processEvent([[maybe_unused]] const IPAOperationData &event) override {} > > private: > void initTrace(); > diff --git a/src/libcamera/device_enumerator_udev.cpp b/src/libcamera/device_enumerator_udev.cpp > index 96689daa5dd1..c6e23a1a7a18 100644 > --- a/src/libcamera/device_enumerator_udev.cpp > +++ b/src/libcamera/device_enumerator_udev.cpp > @@ -327,7 +327,7 @@ int DeviceEnumeratorUdev::addV4L2Device(dev_t devnum) > return 0; > } > > -void DeviceEnumeratorUdev::udevNotify(EventNotifier *notifier) > +void DeviceEnumeratorUdev::udevNotify([[maybe_unused]] EventNotifier *notifier) > { > struct udev_device *dev = udev_monitor_receive_device(monitor_); > std::string action(udev_device_get_action(dev)); > diff --git a/src/libcamera/ipc_unixsocket.cpp b/src/libcamera/ipc_unixsocket.cpp > index 7df86e885f23..701b2c518217 100644 > --- a/src/libcamera/ipc_unixsocket.cpp > +++ b/src/libcamera/ipc_unixsocket.cpp > @@ -308,7 +308,7 @@ int IPCUnixSocket::recvData(void *buffer, size_t length, > return 0; > } > > -void IPCUnixSocket::dataNotifier(EventNotifier *notifier) > +void IPCUnixSocket::dataNotifier([[maybe_unused]] EventNotifier *notifier) > { > int ret; > > diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp > index b8f0549f0c60..42c9caa03e2e 100644 > --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp > +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp > @@ -758,7 +758,7 @@ int PipelineHandlerRPi::configure(Camera *camera, CameraConfiguration *config) > return ret; > } > > -int PipelineHandlerRPi::exportFrameBuffers(Camera *camera, Stream *stream, > +int PipelineHandlerRPi::exportFrameBuffers([[maybe_unused]] Camera *camera, Stream *stream, > std::vector<std::unique_ptr<FrameBuffer>> *buffers) > { > RPiStream *s = static_cast<RPiStream *>(stream); > @@ -1182,7 +1182,8 @@ int RPiCameraData::configureIPA() > return 0; > } > > -void RPiCameraData::queueFrameAction(unsigned int frame, const IPAOperationData &action) > +void RPiCameraData::queueFrameAction([[maybe_unused]] unsigned int frame, > + const IPAOperationData &action) > { > /* > * The following actions can be handled when the pipeline handler is in > diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp > index 32fdaed7c661..4d89aab3845d 100644 > --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp > +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp > @@ -700,7 +700,7 @@ int PipelineHandlerRkISP1::configure(Camera *camera, CameraConfiguration *c) > return 0; > } > > -int PipelineHandlerRkISP1::exportFrameBuffers(Camera *camera, Stream *stream, > +int PipelineHandlerRkISP1::exportFrameBuffers([[maybe_unused]] Camera *camera, Stream *stream, > std::vector<std::unique_ptr<FrameBuffer>> *buffers) > { > unsigned int count = stream->configuration().bufferCount; > diff --git a/src/libcamera/pipeline/rkisp1/timeline.cpp b/src/libcamera/pipeline/rkisp1/timeline.cpp > index f5194608ced7..6b83bbe5b589 100644 > --- a/src/libcamera/pipeline/rkisp1/timeline.cpp > +++ b/src/libcamera/pipeline/rkisp1/timeline.cpp > @@ -204,7 +204,7 @@ void Timeline::updateDeadline() > timer_.start(deadline); > } > > -void Timeline::timeout(Timer *timer) > +void Timeline::timeout([[maybe_unused]] Timer *timer) > { > utils::time_point now = std::chrono::steady_clock::now(); > > diff --git a/src/libcamera/process.cpp b/src/libcamera/process.cpp > index 8311d274a288..994190dc6f3d 100644 > --- a/src/libcamera/process.cpp > +++ b/src/libcamera/process.cpp > @@ -89,7 +89,7 @@ void sigact(int signal, siginfo_t *info, void *ucontext) > > } /* namespace */ > > -void ProcessManager::sighandler(EventNotifier *notifier) > +void ProcessManager::sighandler([[maybe_unused]] EventNotifier *notifier) > { > char data; > ssize_t ret = read(pipe_[0], &data, sizeof(data)); > diff --git a/src/libcamera/proxy/ipa_proxy_linux.cpp b/src/libcamera/proxy/ipa_proxy_linux.cpp > index 68eafb307b2a..b78a0e4535f5 100644 > --- a/src/libcamera/proxy/ipa_proxy_linux.cpp > +++ b/src/libcamera/proxy/ipa_proxy_linux.cpp > @@ -26,17 +26,20 @@ public: > IPAProxyLinux(IPAModule *ipam); > ~IPAProxyLinux(); > > - int init(const IPASettings &settings) override { return 0; } > + int init([[maybe_unused]] const IPASettings &settings) override > + { > + return 0; > + } > int start() override { return 0; } > void stop() override {} > - void configure(const CameraSensorInfo &sensorInfo, > - const std::map<unsigned int, IPAStream> &streamConfig, > - const std::map<unsigned int, const ControlInfoMap &> &entityControls, > - const IPAOperationData &ipaConfig, > - IPAOperationData *result) override {} > - void mapBuffers(const std::vector<IPABuffer> &buffers) override {} > - void unmapBuffers(const std::vector<unsigned int> &ids) override {} > - void processEvent(const IPAOperationData &event) override {} > + void configure([[maybe_unused]] const CameraSensorInfo &sensorInfo, > + [[maybe_unused]] const std::map<unsigned int, IPAStream> &streamConfig, > + [[maybe_unused]] const std::map<unsigned int, const ControlInfoMap &> &entityControls, > + [[maybe_unused]] const IPAOperationData &ipaConfig, > + [[maybe_unused]] IPAOperationData *result) override {} > + void mapBuffers([[maybe_unused]] const std::vector<IPABuffer> &buffers) override {} > + void unmapBuffers([[maybe_unused]] const std::vector<unsigned int> &ids) override {} > + void processEvent([[maybe_unused]] const IPAOperationData &event) override {} > > private: > void readyRead(IPCUnixSocket *ipc); > @@ -91,7 +94,7 @@ IPAProxyLinux::~IPAProxyLinux() > delete socket_; > } > > -void IPAProxyLinux::readyRead(IPCUnixSocket *ipc) > +void IPAProxyLinux::readyRead([[maybe_unused]] IPCUnixSocket *ipc) > { > } > > diff --git a/src/libcamera/v4l2_pixelformat.cpp b/src/libcamera/v4l2_pixelformat.cpp > index 8391ec48ac10..30c94bb98f44 100644 > --- a/src/libcamera/v4l2_pixelformat.cpp > +++ b/src/libcamera/v4l2_pixelformat.cpp > @@ -196,7 +196,7 @@ PixelFormat V4L2PixelFormat::toPixelFormat() const > * \return The V4L2PixelFormat corresponding to \a pixelFormat > */ > V4L2PixelFormat V4L2PixelFormat::fromPixelFormat(const PixelFormat &pixelFormat, > - bool multiplanar) > + [[maybe_unused]] bool multiplanar) > { > const PixelFormatInfo &info = PixelFormatInfo::info(pixelFormat); > if (!info.isValid()) > diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp > index 652677ff1d4d..508522ef42bb 100644 > --- a/src/libcamera/v4l2_videodevice.cpp > +++ b/src/libcamera/v4l2_videodevice.cpp > @@ -1462,7 +1462,7 @@ int V4L2VideoDevice::queueBuffer(FrameBuffer *buffer) > * For Capture video devices the FrameBuffer will contain valid data. > * For Output video devices the FrameBuffer can be considered empty. > */ > -void V4L2VideoDevice::bufferAvailable(EventNotifier *notifier) > +void V4L2VideoDevice::bufferAvailable([[maybe_unused]] EventNotifier *notifier) > { > FrameBuffer *buffer = dequeueBuffer(); > if (!buffer) > @@ -1539,7 +1539,7 @@ FrameBuffer *V4L2VideoDevice::dequeueBuffer() > * When this slot is called, a V4L2 event is available to be dequeued from the > * device. > */ > -void V4L2VideoDevice::eventAvailable(EventNotifier *notifier) > +void V4L2VideoDevice::eventAvailable([[maybe_unused]] EventNotifier *notifier) > { > struct v4l2_event event{}; > int ret = ioctl(VIDIOC_DQEVENT, &event); > diff --git a/src/qcam/dng_writer.cpp b/src/qcam/dng_writer.cpp > index b5b81f0637b5..030d1387118d 100644 > --- a/src/qcam/dng_writer.cpp > +++ b/src/qcam/dng_writer.cpp > @@ -215,7 +215,7 @@ void packScanlineIPU3(void *output, const void *input, unsigned int width) > } > } > > -void thumbScanlineIPU3(const FormatInfo &info, void *output, > +void thumbScanlineIPU3([[maybe_unused]] const FormatInfo &info, void *output, > const void *input, unsigned int width, > unsigned int stride) > { > @@ -350,7 +350,8 @@ static const std::map<PixelFormat, FormatInfo> formatInfo = { > int DNGWriter::write(const char *filename, const Camera *camera, > const StreamConfiguration &config, > const ControlList &metadata, > - const FrameBuffer *buffer, const void *data) > + [[maybe_unused]] const FrameBuffer *buffer, > + const void *data) > { > const auto it = formatInfo.find(config.pixelFormat); > if (it == formatInfo.cend()) { > diff --git a/src/qcam/main.cpp b/src/qcam/main.cpp > index b3468cbf47e2..bae358df0877 100644 > --- a/src/qcam/main.cpp > +++ b/src/qcam/main.cpp > @@ -17,7 +17,7 @@ > #include "../cam/stream_options.h" > #include "main_window.h" > > -void signalHandler(int signal) > +void signalHandler([[maybe_unused]] int signal) > { > qInfo() << "Exiting"; > qApp->quit(); > diff --git a/src/v4l2/v4l2_camera.cpp b/src/v4l2/v4l2_camera.cpp > index 61bca0732447..7a22f983ec0e 100644 > --- a/src/v4l2/v4l2_camera.cpp > +++ b/src/v4l2/v4l2_camera.cpp > @@ -158,7 +158,7 @@ int V4L2Camera::validateConfiguration(const PixelFormat &pixelFormat, > return 0; > } > > -int V4L2Camera::allocBuffers(unsigned int count) > +int V4L2Camera::allocBuffers([[maybe_unused]] unsigned int count) > { > Stream *stream = config_->at(0).stream(); > > diff --git a/test/camera/buffer_import.cpp b/test/camera/buffer_import.cpp > index 97a8582761a7..d57ffa75edeb 100644 > --- a/test/camera/buffer_import.cpp > +++ b/test/camera/buffer_import.cpp > @@ -33,7 +33,8 @@ public: > } > > protected: > - void bufferComplete(Request *request, FrameBuffer *buffer) > + void bufferComplete([[maybe_unused]] Request *request, > + FrameBuffer *buffer) > { > if (buffer->metadata().status != FrameMetadata::FrameSuccess) > return; > diff --git a/test/camera/capture.cpp b/test/camera/capture.cpp > index 0fe3bf9be7f1..eb67bf2da71f 100644 > --- a/test/camera/capture.cpp > +++ b/test/camera/capture.cpp > @@ -26,7 +26,8 @@ protected: > unsigned int completeBuffersCount_; > unsigned int completeRequestsCount_; > > - void bufferComplete(Request *request, FrameBuffer *buffer) > + void bufferComplete([[maybe_unused]] Request *request, > + FrameBuffer *buffer) > { > if (buffer->metadata().status != FrameMetadata::FrameSuccess) > return; > diff --git a/test/hotplug-cameras.cpp b/test/hotplug-cameras.cpp > index 6a94535fa315..7d551eeb900d 100644 > --- a/test/hotplug-cameras.cpp > +++ b/test/hotplug-cameras.cpp > @@ -26,12 +26,12 @@ using namespace libcamera; > class HotplugTest : public Test > { > protected: > - void cameraAddedHandler(std::shared_ptr<Camera> cam) > + void cameraAddedHandler([[maybe_unused]] std::shared_ptr<Camera> cam) > { > cameraAdded_ = true; > } > > - void cameraRemovedHandler(std::shared_ptr<Camera> cam) > + void cameraRemovedHandler([[maybe_unused]] std::shared_ptr<Camera> cam) > { > cameraRemoved_ = true; > } > diff --git a/test/ipa/ipa_wrappers_test.cpp b/test/ipa/ipa_wrappers_test.cpp > index 23c799da0663..59d991cbbf6a 100644 > --- a/test/ipa/ipa_wrappers_test.cpp > +++ b/test/ipa/ipa_wrappers_test.cpp > @@ -70,8 +70,8 @@ public: > void configure(const CameraSensorInfo &sensorInfo, > const std::map<unsigned int, IPAStream> &streamConfig, > const std::map<unsigned int, const ControlInfoMap &> &entityControls, > - const IPAOperationData &ipaConfig, > - IPAOperationData *result) override > + [[maybe_unused]] const IPAOperationData &ipaConfig, > + [[maybe_unused]] IPAOperationData *result) override > { > /* Verify sensorInfo. */ > if (sensorInfo.outputSize.width != 2560 || > diff --git a/test/libtest/test.h b/test/libtest/test.h > index 26d4b94bc12d..8ecf2bda950f 100644 > --- a/test/libtest/test.h > +++ b/test/libtest/test.h > @@ -30,7 +30,7 @@ protected: > }; > > #define TEST_REGISTER(klass) \ > -int main(int argc, char *argv[]) \ > +int main([[maybe_unused]] int argc, [[maybe_unused]] char *argv[]) \ > { \ > return klass().execute(); \ > } > diff --git a/test/log/log_process.cpp b/test/log/log_process.cpp > index d46d5e354727..b024f002843c 100644 > --- a/test/log/log_process.cpp > +++ b/test/log/log_process.cpp > @@ -125,7 +125,8 @@ protected: > } > > private: > - void procFinished(Process *proc, enum Process::ExitStatus exitStatus, int exitCode) > + void procFinished([[maybe_unused]] Process *proc, > + enum Process::ExitStatus exitStatus, int exitCode) > { > exitStatus_ = exitStatus; > exitCode_ = exitCode; > diff --git a/test/object-invoke.cpp b/test/object-invoke.cpp > index 1ae11bb11e16..f3fd23283239 100644 > --- a/test/object-invoke.cpp > +++ b/test/object-invoke.cpp > @@ -50,7 +50,7 @@ public: > value_ = value; > } > > - void methodWithReference(const int &value) > + void methodWithReference([[maybe_unused]] const int &value) > { > } > > diff --git a/test/process/process_test.cpp b/test/process/process_test.cpp > index 721a7c9d46ff..42a26749f5d9 100644 > --- a/test/process/process_test.cpp > +++ b/test/process/process_test.cpp > @@ -80,7 +80,8 @@ protected: > } > > private: > - void procFinished(Process *proc, enum Process::ExitStatus exitStatus, int exitCode) > + void procFinished([[maybe_unused]] Process *proc, > + enum Process::ExitStatus exitStatus, int exitCode) > { > exitStatus_ = exitStatus; > exitCode_ = exitCode; > diff --git a/test/timer-thread.cpp b/test/timer-thread.cpp > index 2f901787f5fb..f794d8e7dd4e 100644 > --- a/test/timer-thread.cpp > +++ b/test/timer-thread.cpp > @@ -40,7 +40,7 @@ public: > } > > private: > - void timeoutHandler(Timer *timer) > + void timeoutHandler([[maybe_unused]] Timer *timer) > { > timeout_ = true; > } > diff --git a/test/timer.cpp b/test/timer.cpp > index 7d5b93c37799..537489d736ad 100644 > --- a/test/timer.cpp > +++ b/test/timer.cpp > @@ -57,7 +57,7 @@ public: > } > > private: > - void timeoutHandler(Timer *timer) > + void timeoutHandler([[maybe_unused]] Timer *timer) > { > expiration_ = std::chrono::steady_clock::now(); > count_++; > -- > Regards, > > Laurent Pinchart > > _______________________________________________ > libcamera-devel mailing list > libcamera-devel@lists.libcamera.org > https://lists.libcamera.org/listinfo/libcamera-devel
Hi Laurent, Thanks for your patch. On 2020-08-22 23:00:36 +0300, Laurent Pinchart wrote: > 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. > > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> > --- > include/libcamera/bound_method.h | 2 +- > include/libcamera/signal.h | 2 +- > include/libcamera/span.h | 4 ++-- > meson.build | 1 - > src/android/camera3_hal.cpp | 11 +++++---- > src/android/camera_device.cpp | 5 ++-- > src/android/camera_ops.cpp | 5 ++-- > src/cam/main.cpp | 2 +- > src/gstreamer/gstlibcamerapool.cpp | 2 +- > src/gstreamer/gstlibcameraprovider.cpp | 2 +- > src/gstreamer/gstlibcamerasrc.cpp | 7 ++++-- > src/ipa/raspberrypi/controller/rpi/agc.cpp | 3 ++- > src/ipa/raspberrypi/raspberrypi.cpp | 2 +- > src/ipa/rkisp1/rkisp1.cpp | 13 +++++++---- > src/ipa/vimc/vimc.cpp | 16 ++++++------- > src/libcamera/device_enumerator_udev.cpp | 2 +- > src/libcamera/ipc_unixsocket.cpp | 2 +- > .../pipeline/raspberrypi/raspberrypi.cpp | 5 ++-- > src/libcamera/pipeline/rkisp1/rkisp1.cpp | 2 +- > src/libcamera/pipeline/rkisp1/timeline.cpp | 2 +- > src/libcamera/process.cpp | 2 +- > src/libcamera/proxy/ipa_proxy_linux.cpp | 23 +++++++++++-------- > src/libcamera/v4l2_pixelformat.cpp | 2 +- > src/libcamera/v4l2_videodevice.cpp | 4 ++-- > src/qcam/dng_writer.cpp | 5 ++-- > src/qcam/main.cpp | 2 +- > src/v4l2/v4l2_camera.cpp | 2 +- > test/camera/buffer_import.cpp | 3 ++- > test/camera/capture.cpp | 3 ++- > test/hotplug-cameras.cpp | 4 ++-- > test/ipa/ipa_wrappers_test.cpp | 4 ++-- > test/libtest/test.h | 2 +- > test/log/log_process.cpp | 3 ++- > test/object-invoke.cpp | 2 +- > test/process/process_test.cpp | 3 ++- > test/timer-thread.cpp | 2 +- > test/timer.cpp | 2 +- > 37 files changed, 89 insertions(+), 69 deletions(-) > > diff --git a/include/libcamera/bound_method.h b/include/libcamera/bound_method.h > index 983bb5cbbad0..d1e4448304a9 100644 > --- a/include/libcamera/bound_method.h > +++ b/include/libcamera/bound_method.h > @@ -214,7 +214,7 @@ public: > > bool match(R (*func)(Args...)) const { return func == func_; } > > - R activate(Args... args, bool deleteMethod = false) override > + R activate(Args... args, [[maybe_unused]] bool deleteMethod = false) override > { > return (*func_)(args...); > } > diff --git a/include/libcamera/signal.h b/include/libcamera/signal.h > index ed30eb559127..accb797e911c 100644 > --- a/include/libcamera/signal.h > +++ b/include/libcamera/signal.h > @@ -70,7 +70,7 @@ public: > > void disconnect() > { > - SignalBase::disconnect([](SlotList::iterator &iter) { > + SignalBase::disconnect([]([[maybe_unused]] SlotList::iterator &iter) { > return true; > }); > } > diff --git a/include/libcamera/span.h b/include/libcamera/span.h > index 513ddb432405..738af6aca871 100644 > --- a/include/libcamera/span.h > +++ b/include/libcamera/span.h > @@ -113,12 +113,12 @@ public: > { > } > > - constexpr Span(pointer ptr, size_type count) > + constexpr Span(pointer ptr, [[maybe_unused]] size_type count) > : data_(ptr) > { > } > > - constexpr Span(pointer first, pointer last) > + constexpr Span(pointer first, [[maybe_unused]] pointer last) > : data_(first) > { > } > diff --git a/meson.build b/meson.build > index ce1d1c63ddc6..d7e8122ccaa3 100644 > --- a/meson.build > +++ b/meson.build > @@ -37,7 +37,6 @@ if cc.has_header_symbol('stdlib.h', 'secure_getenv', prefix : '#define _GNU_SOUR > endif > > common_arguments = [ > - '-Wno-unused-parameter', > '-include', 'config.h', > ] > > diff --git a/src/android/camera3_hal.cpp b/src/android/camera3_hal.cpp > index decaf59e6915..ddcfea591ce6 100644 > --- a/src/android/camera3_hal.cpp > +++ b/src/android/camera3_hal.cpp > @@ -32,18 +32,21 @@ static int hal_get_camera_info(int id, struct camera_info *info) > return cameraManager.getCameraInfo(id, info); > } > > -static int hal_set_callbacks(const camera_module_callbacks_t *callbacks) > +static int hal_set_callbacks([[maybe_unused]] const camera_module_callbacks_t *callbacks) > { > return 0; > } > > -static int hal_open_legacy(const struct hw_module_t *module, const char *id, > - uint32_t halVersion, struct hw_device_t **device) > +static int hal_open_legacy([[maybe_unused]] const struct hw_module_t *module, > + [[maybe_unused]] const char *id, > + [[maybe_unused]] uint32_t halVersion, > + [[maybe_unused]] struct hw_device_t **device) > { > return -ENOSYS; > } > > -static int hal_set_torch_mode(const char *camera_id, bool enabled) > +static int hal_set_torch_mode([[maybe_unused]] const char *camera_id, > + [[maybe_unused]] bool enabled) > { > return -ENOSYS; > } > diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp > index 3419236a061c..8a39bee690a0 100644 > --- a/src/android/camera_device.cpp > +++ b/src/android/camera_device.cpp > @@ -1541,8 +1541,9 @@ void CameraDevice::notifyError(uint32_t frameNumber, camera3_stream_t *stream) > /* > * Produce a set of fixed result metadata. > */ > -std::unique_ptr<CameraMetadata> CameraDevice::getResultMetadata(int frame_number, > - int64_t timestamp) > +std::unique_ptr<CameraMetadata> > +CameraDevice::getResultMetadata([[maybe_unused]] int frame_number, > + int64_t timestamp) > { > /* > * \todo Keep this in sync with the actual number of entries. > diff --git a/src/android/camera_ops.cpp b/src/android/camera_ops.cpp > index 216ac285f964..696e80436821 100644 > --- a/src/android/camera_ops.cpp > +++ b/src/android/camera_ops.cpp > @@ -61,11 +61,12 @@ static int hal_dev_process_capture_request(const struct camera3_device *dev, > return camera->processCaptureRequest(request); > } > > -static void hal_dev_dump(const struct camera3_device *dev, int fd) > +static void hal_dev_dump([[maybe_unused]] const struct camera3_device *dev, > + [[maybe_unused]] int fd) > { > } > > -static int hal_dev_flush(const struct camera3_device *dev) > +static int hal_dev_flush([[maybe_unused]] const struct camera3_device *dev) > { > return 0; > } > diff --git a/src/cam/main.cpp b/src/cam/main.cpp > index cc3facd5a5b2..244720b491f5 100644 > --- a/src/cam/main.cpp > +++ b/src/cam/main.cpp > @@ -378,7 +378,7 @@ int CamApp::run() > return 0; > } > > -void signalHandler(int signal) > +void signalHandler([[maybe_unused]] int signal) > { > std::cout << "Exiting" << std::endl; > CamApp::instance()->quit(); > diff --git a/src/gstreamer/gstlibcamerapool.cpp b/src/gstreamer/gstlibcamerapool.cpp > index 8f536169455f..b756ee356d61 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 840e87a3d8da..cd850d813a6e 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 0c28ae3f2852..1bfc2e2f8cf3 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; > diff --git a/src/ipa/raspberrypi/controller/rpi/agc.cpp b/src/ipa/raspberrypi/controller/rpi/agc.cpp > index c02b5ece242f..3573f36be46a 100644 > --- a/src/ipa/raspberrypi/controller/rpi/agc.cpp > +++ b/src/ipa/raspberrypi/controller/rpi/agc.cpp > @@ -221,7 +221,8 @@ void Agc::SetConstraintMode(std::string const &constraint_mode_name) > constraint_mode_name_ = constraint_mode_name; > } > > -void Agc::SwitchMode(CameraMode const &camera_mode, Metadata *metadata) > +void Agc::SwitchMode([[maybe_unused]] CameraMode const &camera_mode, > + Metadata *metadata) > { > // On a mode switch, it's possible the exposure profile could change, > // so we run through the dividing up of exposure/gain again and > diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp > index 37472087f5a9..4557016c2dd4 100644 > --- a/src/ipa/raspberrypi/raspberrypi.cpp > +++ b/src/ipa/raspberrypi/raspberrypi.cpp > @@ -191,7 +191,7 @@ void IPARPi::setMode(const CameraSensorInfo &sensorInfo) > } > > void IPARPi::configure(const CameraSensorInfo &sensorInfo, > - const std::map<unsigned int, IPAStream> &streamConfig, > + [[maybe_unused]] const std::map<unsigned int, IPAStream> &streamConfig, > const std::map<unsigned int, const ControlInfoMap &> &entityControls, > const IPAOperationData &ipaConfig, > IPAOperationData *result) > diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp > index 3a1c50c4add0..d95d902adff3 100644 > --- a/src/ipa/rkisp1/rkisp1.cpp > +++ b/src/ipa/rkisp1/rkisp1.cpp > @@ -32,7 +32,10 @@ LOG_DEFINE_CATEGORY(IPARkISP1) > class IPARkISP1 : public IPAInterface > { > public: > - int init(const IPASettings &settings) override { return 0; } > + int init([[maybe_unused]] const IPASettings &settings) override > + { > + return 0; > + } > int start() override { return 0; } > void stop() override {} > > @@ -75,11 +78,11 @@ private: > * assemble one. Make sure the reported sensor information are relevant > * before accessing them. > */ > -void IPARkISP1::configure(const CameraSensorInfo &info, > - const std::map<unsigned int, IPAStream> &streamConfig, > +void IPARkISP1::configure([[maybe_unused]] const CameraSensorInfo &info, > + [[maybe_unused]] const std::map<unsigned int, IPAStream> &streamConfig, > const std::map<unsigned int, const ControlInfoMap &> &entityControls, > - const IPAOperationData &ipaConfig, > - IPAOperationData *result) > + [[maybe_unused]] const IPAOperationData &ipaConfig, > + [[maybe_unused]] IPAOperationData *result) > { > if (entityControls.empty()) > return; > diff --git a/src/ipa/vimc/vimc.cpp b/src/ipa/vimc/vimc.cpp > index 1593c92d80f3..ef257762a1d4 100644 > --- a/src/ipa/vimc/vimc.cpp > +++ b/src/ipa/vimc/vimc.cpp > @@ -37,14 +37,14 @@ public: > int start() override; > void stop() override; > > - void configure(const CameraSensorInfo &sensorInfo, > - const std::map<unsigned int, IPAStream> &streamConfig, > - const std::map<unsigned int, const ControlInfoMap &> &entityControls, > - const IPAOperationData &ipaConfig, > - IPAOperationData *result) override {} > - void mapBuffers(const std::vector<IPABuffer> &buffers) override {} > - void unmapBuffers(const std::vector<unsigned int> &ids) override {} > - void processEvent(const IPAOperationData &event) override {} > + void configure([[maybe_unused]] const CameraSensorInfo &sensorInfo, > + [[maybe_unused]] const std::map<unsigned int, IPAStream> &streamConfig, > + [[maybe_unused]] const std::map<unsigned int, const ControlInfoMap &> &entityControls, > + [[maybe_unused]] const IPAOperationData &ipaConfig, > + [[maybe_unused]] IPAOperationData *result) override {} > + void mapBuffers([[maybe_unused]] const std::vector<IPABuffer> &buffers) override {} > + void unmapBuffers([[maybe_unused]] const std::vector<unsigned int> &ids) override {} > + void processEvent([[maybe_unused]] const IPAOperationData &event) override {} > > private: > void initTrace(); > diff --git a/src/libcamera/device_enumerator_udev.cpp b/src/libcamera/device_enumerator_udev.cpp > index 96689daa5dd1..c6e23a1a7a18 100644 > --- a/src/libcamera/device_enumerator_udev.cpp > +++ b/src/libcamera/device_enumerator_udev.cpp > @@ -327,7 +327,7 @@ int DeviceEnumeratorUdev::addV4L2Device(dev_t devnum) > return 0; > } > > -void DeviceEnumeratorUdev::udevNotify(EventNotifier *notifier) > +void DeviceEnumeratorUdev::udevNotify([[maybe_unused]] EventNotifier *notifier) > { > struct udev_device *dev = udev_monitor_receive_device(monitor_); > std::string action(udev_device_get_action(dev)); > diff --git a/src/libcamera/ipc_unixsocket.cpp b/src/libcamera/ipc_unixsocket.cpp > index 7df86e885f23..701b2c518217 100644 > --- a/src/libcamera/ipc_unixsocket.cpp > +++ b/src/libcamera/ipc_unixsocket.cpp > @@ -308,7 +308,7 @@ int IPCUnixSocket::recvData(void *buffer, size_t length, > return 0; > } > > -void IPCUnixSocket::dataNotifier(EventNotifier *notifier) > +void IPCUnixSocket::dataNotifier([[maybe_unused]] EventNotifier *notifier) > { > int ret; > > diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp > index b8f0549f0c60..42c9caa03e2e 100644 > --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp > +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp > @@ -758,7 +758,7 @@ int PipelineHandlerRPi::configure(Camera *camera, CameraConfiguration *config) > return ret; > } > > -int PipelineHandlerRPi::exportFrameBuffers(Camera *camera, Stream *stream, > +int PipelineHandlerRPi::exportFrameBuffers([[maybe_unused]] Camera *camera, Stream *stream, > std::vector<std::unique_ptr<FrameBuffer>> *buffers) > { > RPiStream *s = static_cast<RPiStream *>(stream); > @@ -1182,7 +1182,8 @@ int RPiCameraData::configureIPA() > return 0; > } > > -void RPiCameraData::queueFrameAction(unsigned int frame, const IPAOperationData &action) > +void RPiCameraData::queueFrameAction([[maybe_unused]] unsigned int frame, > + const IPAOperationData &action) > { > /* > * The following actions can be handled when the pipeline handler is in > diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp > index 32fdaed7c661..4d89aab3845d 100644 > --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp > +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp > @@ -700,7 +700,7 @@ int PipelineHandlerRkISP1::configure(Camera *camera, CameraConfiguration *c) > return 0; > } > > -int PipelineHandlerRkISP1::exportFrameBuffers(Camera *camera, Stream *stream, > +int PipelineHandlerRkISP1::exportFrameBuffers([[maybe_unused]] Camera *camera, Stream *stream, > std::vector<std::unique_ptr<FrameBuffer>> *buffers) > { > unsigned int count = stream->configuration().bufferCount; > diff --git a/src/libcamera/pipeline/rkisp1/timeline.cpp b/src/libcamera/pipeline/rkisp1/timeline.cpp > index f5194608ced7..6b83bbe5b589 100644 > --- a/src/libcamera/pipeline/rkisp1/timeline.cpp > +++ b/src/libcamera/pipeline/rkisp1/timeline.cpp > @@ -204,7 +204,7 @@ void Timeline::updateDeadline() > timer_.start(deadline); > } > > -void Timeline::timeout(Timer *timer) > +void Timeline::timeout([[maybe_unused]] Timer *timer) > { > utils::time_point now = std::chrono::steady_clock::now(); > > diff --git a/src/libcamera/process.cpp b/src/libcamera/process.cpp > index 8311d274a288..994190dc6f3d 100644 > --- a/src/libcamera/process.cpp > +++ b/src/libcamera/process.cpp > @@ -89,7 +89,7 @@ void sigact(int signal, siginfo_t *info, void *ucontext) > > } /* namespace */ > > -void ProcessManager::sighandler(EventNotifier *notifier) > +void ProcessManager::sighandler([[maybe_unused]] EventNotifier *notifier) > { > char data; > ssize_t ret = read(pipe_[0], &data, sizeof(data)); > diff --git a/src/libcamera/proxy/ipa_proxy_linux.cpp b/src/libcamera/proxy/ipa_proxy_linux.cpp > index 68eafb307b2a..b78a0e4535f5 100644 > --- a/src/libcamera/proxy/ipa_proxy_linux.cpp > +++ b/src/libcamera/proxy/ipa_proxy_linux.cpp > @@ -26,17 +26,20 @@ public: > IPAProxyLinux(IPAModule *ipam); > ~IPAProxyLinux(); > > - int init(const IPASettings &settings) override { return 0; } > + int init([[maybe_unused]] const IPASettings &settings) override > + { > + return 0; > + } > int start() override { return 0; } > void stop() override {} > - void configure(const CameraSensorInfo &sensorInfo, > - const std::map<unsigned int, IPAStream> &streamConfig, > - const std::map<unsigned int, const ControlInfoMap &> &entityControls, > - const IPAOperationData &ipaConfig, > - IPAOperationData *result) override {} > - void mapBuffers(const std::vector<IPABuffer> &buffers) override {} > - void unmapBuffers(const std::vector<unsigned int> &ids) override {} > - void processEvent(const IPAOperationData &event) override {} > + void configure([[maybe_unused]] const CameraSensorInfo &sensorInfo, > + [[maybe_unused]] const std::map<unsigned int, IPAStream> &streamConfig, > + [[maybe_unused]] const std::map<unsigned int, const ControlInfoMap &> &entityControls, > + [[maybe_unused]] const IPAOperationData &ipaConfig, > + [[maybe_unused]] IPAOperationData *result) override {} > + void mapBuffers([[maybe_unused]] const std::vector<IPABuffer> &buffers) override {} > + void unmapBuffers([[maybe_unused]] const std::vector<unsigned int> &ids) override {} > + void processEvent([[maybe_unused]] const IPAOperationData &event) override {} > > private: > void readyRead(IPCUnixSocket *ipc); > @@ -91,7 +94,7 @@ IPAProxyLinux::~IPAProxyLinux() > delete socket_; > } > > -void IPAProxyLinux::readyRead(IPCUnixSocket *ipc) > +void IPAProxyLinux::readyRead([[maybe_unused]] IPCUnixSocket *ipc) > { > } > > diff --git a/src/libcamera/v4l2_pixelformat.cpp b/src/libcamera/v4l2_pixelformat.cpp > index 8391ec48ac10..30c94bb98f44 100644 > --- a/src/libcamera/v4l2_pixelformat.cpp > +++ b/src/libcamera/v4l2_pixelformat.cpp > @@ -196,7 +196,7 @@ PixelFormat V4L2PixelFormat::toPixelFormat() const > * \return The V4L2PixelFormat corresponding to \a pixelFormat > */ > V4L2PixelFormat V4L2PixelFormat::fromPixelFormat(const PixelFormat &pixelFormat, > - bool multiplanar) > + [[maybe_unused]] bool multiplanar) > { > const PixelFormatInfo &info = PixelFormatInfo::info(pixelFormat); > if (!info.isValid()) > diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp > index 652677ff1d4d..508522ef42bb 100644 > --- a/src/libcamera/v4l2_videodevice.cpp > +++ b/src/libcamera/v4l2_videodevice.cpp > @@ -1462,7 +1462,7 @@ int V4L2VideoDevice::queueBuffer(FrameBuffer *buffer) > * For Capture video devices the FrameBuffer will contain valid data. > * For Output video devices the FrameBuffer can be considered empty. > */ > -void V4L2VideoDevice::bufferAvailable(EventNotifier *notifier) > +void V4L2VideoDevice::bufferAvailable([[maybe_unused]] EventNotifier *notifier) > { > FrameBuffer *buffer = dequeueBuffer(); > if (!buffer) > @@ -1539,7 +1539,7 @@ FrameBuffer *V4L2VideoDevice::dequeueBuffer() > * When this slot is called, a V4L2 event is available to be dequeued from the > * device. > */ > -void V4L2VideoDevice::eventAvailable(EventNotifier *notifier) > +void V4L2VideoDevice::eventAvailable([[maybe_unused]] EventNotifier *notifier) > { > struct v4l2_event event{}; > int ret = ioctl(VIDIOC_DQEVENT, &event); > diff --git a/src/qcam/dng_writer.cpp b/src/qcam/dng_writer.cpp > index b5b81f0637b5..030d1387118d 100644 > --- a/src/qcam/dng_writer.cpp > +++ b/src/qcam/dng_writer.cpp > @@ -215,7 +215,7 @@ void packScanlineIPU3(void *output, const void *input, unsigned int width) > } > } > > -void thumbScanlineIPU3(const FormatInfo &info, void *output, > +void thumbScanlineIPU3([[maybe_unused]] const FormatInfo &info, void *output, > const void *input, unsigned int width, > unsigned int stride) > { > @@ -350,7 +350,8 @@ static const std::map<PixelFormat, FormatInfo> formatInfo = { > int DNGWriter::write(const char *filename, const Camera *camera, > const StreamConfiguration &config, > const ControlList &metadata, > - const FrameBuffer *buffer, const void *data) > + [[maybe_unused]] const FrameBuffer *buffer, > + const void *data) > { > const auto it = formatInfo.find(config.pixelFormat); > if (it == formatInfo.cend()) { > diff --git a/src/qcam/main.cpp b/src/qcam/main.cpp > index b3468cbf47e2..bae358df0877 100644 > --- a/src/qcam/main.cpp > +++ b/src/qcam/main.cpp > @@ -17,7 +17,7 @@ > #include "../cam/stream_options.h" > #include "main_window.h" > > -void signalHandler(int signal) > +void signalHandler([[maybe_unused]] int signal) > { > qInfo() << "Exiting"; > qApp->quit(); > diff --git a/src/v4l2/v4l2_camera.cpp b/src/v4l2/v4l2_camera.cpp > index 61bca0732447..7a22f983ec0e 100644 > --- a/src/v4l2/v4l2_camera.cpp > +++ b/src/v4l2/v4l2_camera.cpp > @@ -158,7 +158,7 @@ int V4L2Camera::validateConfiguration(const PixelFormat &pixelFormat, > return 0; > } > > -int V4L2Camera::allocBuffers(unsigned int count) > +int V4L2Camera::allocBuffers([[maybe_unused]] unsigned int count) > { > Stream *stream = config_->at(0).stream(); > > diff --git a/test/camera/buffer_import.cpp b/test/camera/buffer_import.cpp > index 97a8582761a7..d57ffa75edeb 100644 > --- a/test/camera/buffer_import.cpp > +++ b/test/camera/buffer_import.cpp > @@ -33,7 +33,8 @@ public: > } > > protected: > - void bufferComplete(Request *request, FrameBuffer *buffer) > + void bufferComplete([[maybe_unused]] Request *request, > + FrameBuffer *buffer) > { > if (buffer->metadata().status != FrameMetadata::FrameSuccess) > return; > diff --git a/test/camera/capture.cpp b/test/camera/capture.cpp > index 0fe3bf9be7f1..eb67bf2da71f 100644 > --- a/test/camera/capture.cpp > +++ b/test/camera/capture.cpp > @@ -26,7 +26,8 @@ protected: > unsigned int completeBuffersCount_; > unsigned int completeRequestsCount_; > > - void bufferComplete(Request *request, FrameBuffer *buffer) > + void bufferComplete([[maybe_unused]] Request *request, > + FrameBuffer *buffer) > { > if (buffer->metadata().status != FrameMetadata::FrameSuccess) > return; > diff --git a/test/hotplug-cameras.cpp b/test/hotplug-cameras.cpp > index 6a94535fa315..7d551eeb900d 100644 > --- a/test/hotplug-cameras.cpp > +++ b/test/hotplug-cameras.cpp > @@ -26,12 +26,12 @@ using namespace libcamera; > class HotplugTest : public Test > { > protected: > - void cameraAddedHandler(std::shared_ptr<Camera> cam) > + void cameraAddedHandler([[maybe_unused]] std::shared_ptr<Camera> cam) > { > cameraAdded_ = true; > } > > - void cameraRemovedHandler(std::shared_ptr<Camera> cam) > + void cameraRemovedHandler([[maybe_unused]] std::shared_ptr<Camera> cam) > { > cameraRemoved_ = true; > } > diff --git a/test/ipa/ipa_wrappers_test.cpp b/test/ipa/ipa_wrappers_test.cpp > index 23c799da0663..59d991cbbf6a 100644 > --- a/test/ipa/ipa_wrappers_test.cpp > +++ b/test/ipa/ipa_wrappers_test.cpp > @@ -70,8 +70,8 @@ public: > void configure(const CameraSensorInfo &sensorInfo, > const std::map<unsigned int, IPAStream> &streamConfig, > const std::map<unsigned int, const ControlInfoMap &> &entityControls, > - const IPAOperationData &ipaConfig, > - IPAOperationData *result) override > + [[maybe_unused]] const IPAOperationData &ipaConfig, > + [[maybe_unused]] IPAOperationData *result) override > { > /* Verify sensorInfo. */ > if (sensorInfo.outputSize.width != 2560 || > diff --git a/test/libtest/test.h b/test/libtest/test.h > index 26d4b94bc12d..8ecf2bda950f 100644 > --- a/test/libtest/test.h > +++ b/test/libtest/test.h > @@ -30,7 +30,7 @@ protected: > }; > > #define TEST_REGISTER(klass) \ > -int main(int argc, char *argv[]) \ > +int main([[maybe_unused]] int argc, [[maybe_unused]] char *argv[]) \ > { \ > return klass().execute(); \ > } > diff --git a/test/log/log_process.cpp b/test/log/log_process.cpp > index d46d5e354727..b024f002843c 100644 > --- a/test/log/log_process.cpp > +++ b/test/log/log_process.cpp > @@ -125,7 +125,8 @@ protected: > } > > private: > - void procFinished(Process *proc, enum Process::ExitStatus exitStatus, int exitCode) > + void procFinished([[maybe_unused]] Process *proc, > + enum Process::ExitStatus exitStatus, int exitCode) > { > exitStatus_ = exitStatus; > exitCode_ = exitCode; > diff --git a/test/object-invoke.cpp b/test/object-invoke.cpp > index 1ae11bb11e16..f3fd23283239 100644 > --- a/test/object-invoke.cpp > +++ b/test/object-invoke.cpp > @@ -50,7 +50,7 @@ public: > value_ = value; > } > > - void methodWithReference(const int &value) > + void methodWithReference([[maybe_unused]] const int &value) > { > } > > diff --git a/test/process/process_test.cpp b/test/process/process_test.cpp > index 721a7c9d46ff..42a26749f5d9 100644 > --- a/test/process/process_test.cpp > +++ b/test/process/process_test.cpp > @@ -80,7 +80,8 @@ protected: > } > > private: > - void procFinished(Process *proc, enum Process::ExitStatus exitStatus, int exitCode) > + void procFinished([[maybe_unused]] Process *proc, > + enum Process::ExitStatus exitStatus, int exitCode) > { > exitStatus_ = exitStatus; > exitCode_ = exitCode; > diff --git a/test/timer-thread.cpp b/test/timer-thread.cpp > index 2f901787f5fb..f794d8e7dd4e 100644 > --- a/test/timer-thread.cpp > +++ b/test/timer-thread.cpp > @@ -40,7 +40,7 @@ public: > } > > private: > - void timeoutHandler(Timer *timer) > + void timeoutHandler([[maybe_unused]] Timer *timer) > { > timeout_ = true; > } > diff --git a/test/timer.cpp b/test/timer.cpp > index 7d5b93c37799..537489d736ad 100644 > --- a/test/timer.cpp > +++ b/test/timer.cpp > @@ -57,7 +57,7 @@ public: > } > > private: > - void timeoutHandler(Timer *timer) > + void timeoutHandler([[maybe_unused]] Timer *timer) > { > expiration_ = std::chrono::steady_clock::now(); > count_++; > -- > Regards, > > Laurent Pinchart > > _______________________________________________ > libcamera-devel mailing list > libcamera-devel@lists.libcamera.org > https://lists.libcamera.org/listinfo/libcamera-devel
diff --git a/include/libcamera/bound_method.h b/include/libcamera/bound_method.h index 983bb5cbbad0..d1e4448304a9 100644 --- a/include/libcamera/bound_method.h +++ b/include/libcamera/bound_method.h @@ -214,7 +214,7 @@ public: bool match(R (*func)(Args...)) const { return func == func_; } - R activate(Args... args, bool deleteMethod = false) override + R activate(Args... args, [[maybe_unused]] bool deleteMethod = false) override { return (*func_)(args...); } diff --git a/include/libcamera/signal.h b/include/libcamera/signal.h index ed30eb559127..accb797e911c 100644 --- a/include/libcamera/signal.h +++ b/include/libcamera/signal.h @@ -70,7 +70,7 @@ public: void disconnect() { - SignalBase::disconnect([](SlotList::iterator &iter) { + SignalBase::disconnect([]([[maybe_unused]] SlotList::iterator &iter) { return true; }); } diff --git a/include/libcamera/span.h b/include/libcamera/span.h index 513ddb432405..738af6aca871 100644 --- a/include/libcamera/span.h +++ b/include/libcamera/span.h @@ -113,12 +113,12 @@ public: { } - constexpr Span(pointer ptr, size_type count) + constexpr Span(pointer ptr, [[maybe_unused]] size_type count) : data_(ptr) { } - constexpr Span(pointer first, pointer last) + constexpr Span(pointer first, [[maybe_unused]] pointer last) : data_(first) { } diff --git a/meson.build b/meson.build index ce1d1c63ddc6..d7e8122ccaa3 100644 --- a/meson.build +++ b/meson.build @@ -37,7 +37,6 @@ if cc.has_header_symbol('stdlib.h', 'secure_getenv', prefix : '#define _GNU_SOUR endif common_arguments = [ - '-Wno-unused-parameter', '-include', 'config.h', ] diff --git a/src/android/camera3_hal.cpp b/src/android/camera3_hal.cpp index decaf59e6915..ddcfea591ce6 100644 --- a/src/android/camera3_hal.cpp +++ b/src/android/camera3_hal.cpp @@ -32,18 +32,21 @@ static int hal_get_camera_info(int id, struct camera_info *info) return cameraManager.getCameraInfo(id, info); } -static int hal_set_callbacks(const camera_module_callbacks_t *callbacks) +static int hal_set_callbacks([[maybe_unused]] const camera_module_callbacks_t *callbacks) { return 0; } -static int hal_open_legacy(const struct hw_module_t *module, const char *id, - uint32_t halVersion, struct hw_device_t **device) +static int hal_open_legacy([[maybe_unused]] const struct hw_module_t *module, + [[maybe_unused]] const char *id, + [[maybe_unused]] uint32_t halVersion, + [[maybe_unused]] struct hw_device_t **device) { return -ENOSYS; } -static int hal_set_torch_mode(const char *camera_id, bool enabled) +static int hal_set_torch_mode([[maybe_unused]] const char *camera_id, + [[maybe_unused]] bool enabled) { return -ENOSYS; } diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp index 3419236a061c..8a39bee690a0 100644 --- a/src/android/camera_device.cpp +++ b/src/android/camera_device.cpp @@ -1541,8 +1541,9 @@ void CameraDevice::notifyError(uint32_t frameNumber, camera3_stream_t *stream) /* * Produce a set of fixed result metadata. */ -std::unique_ptr<CameraMetadata> CameraDevice::getResultMetadata(int frame_number, - int64_t timestamp) +std::unique_ptr<CameraMetadata> +CameraDevice::getResultMetadata([[maybe_unused]] int frame_number, + int64_t timestamp) { /* * \todo Keep this in sync with the actual number of entries. diff --git a/src/android/camera_ops.cpp b/src/android/camera_ops.cpp index 216ac285f964..696e80436821 100644 --- a/src/android/camera_ops.cpp +++ b/src/android/camera_ops.cpp @@ -61,11 +61,12 @@ static int hal_dev_process_capture_request(const struct camera3_device *dev, return camera->processCaptureRequest(request); } -static void hal_dev_dump(const struct camera3_device *dev, int fd) +static void hal_dev_dump([[maybe_unused]] const struct camera3_device *dev, + [[maybe_unused]] int fd) { } -static int hal_dev_flush(const struct camera3_device *dev) +static int hal_dev_flush([[maybe_unused]] const struct camera3_device *dev) { return 0; } diff --git a/src/cam/main.cpp b/src/cam/main.cpp index cc3facd5a5b2..244720b491f5 100644 --- a/src/cam/main.cpp +++ b/src/cam/main.cpp @@ -378,7 +378,7 @@ int CamApp::run() return 0; } -void signalHandler(int signal) +void signalHandler([[maybe_unused]] int signal) { std::cout << "Exiting" << std::endl; CamApp::instance()->quit(); diff --git a/src/gstreamer/gstlibcamerapool.cpp b/src/gstreamer/gstlibcamerapool.cpp index 8f536169455f..b756ee356d61 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 840e87a3d8da..cd850d813a6e 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 0c28ae3f2852..1bfc2e2f8cf3 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; diff --git a/src/ipa/raspberrypi/controller/rpi/agc.cpp b/src/ipa/raspberrypi/controller/rpi/agc.cpp index c02b5ece242f..3573f36be46a 100644 --- a/src/ipa/raspberrypi/controller/rpi/agc.cpp +++ b/src/ipa/raspberrypi/controller/rpi/agc.cpp @@ -221,7 +221,8 @@ void Agc::SetConstraintMode(std::string const &constraint_mode_name) constraint_mode_name_ = constraint_mode_name; } -void Agc::SwitchMode(CameraMode const &camera_mode, Metadata *metadata) +void Agc::SwitchMode([[maybe_unused]] CameraMode const &camera_mode, + Metadata *metadata) { // On a mode switch, it's possible the exposure profile could change, // so we run through the dividing up of exposure/gain again and diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp index 37472087f5a9..4557016c2dd4 100644 --- a/src/ipa/raspberrypi/raspberrypi.cpp +++ b/src/ipa/raspberrypi/raspberrypi.cpp @@ -191,7 +191,7 @@ void IPARPi::setMode(const CameraSensorInfo &sensorInfo) } void IPARPi::configure(const CameraSensorInfo &sensorInfo, - const std::map<unsigned int, IPAStream> &streamConfig, + [[maybe_unused]] const std::map<unsigned int, IPAStream> &streamConfig, const std::map<unsigned int, const ControlInfoMap &> &entityControls, const IPAOperationData &ipaConfig, IPAOperationData *result) diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp index 3a1c50c4add0..d95d902adff3 100644 --- a/src/ipa/rkisp1/rkisp1.cpp +++ b/src/ipa/rkisp1/rkisp1.cpp @@ -32,7 +32,10 @@ LOG_DEFINE_CATEGORY(IPARkISP1) class IPARkISP1 : public IPAInterface { public: - int init(const IPASettings &settings) override { return 0; } + int init([[maybe_unused]] const IPASettings &settings) override + { + return 0; + } int start() override { return 0; } void stop() override {} @@ -75,11 +78,11 @@ private: * assemble one. Make sure the reported sensor information are relevant * before accessing them. */ -void IPARkISP1::configure(const CameraSensorInfo &info, - const std::map<unsigned int, IPAStream> &streamConfig, +void IPARkISP1::configure([[maybe_unused]] const CameraSensorInfo &info, + [[maybe_unused]] const std::map<unsigned int, IPAStream> &streamConfig, const std::map<unsigned int, const ControlInfoMap &> &entityControls, - const IPAOperationData &ipaConfig, - IPAOperationData *result) + [[maybe_unused]] const IPAOperationData &ipaConfig, + [[maybe_unused]] IPAOperationData *result) { if (entityControls.empty()) return; diff --git a/src/ipa/vimc/vimc.cpp b/src/ipa/vimc/vimc.cpp index 1593c92d80f3..ef257762a1d4 100644 --- a/src/ipa/vimc/vimc.cpp +++ b/src/ipa/vimc/vimc.cpp @@ -37,14 +37,14 @@ public: int start() override; void stop() override; - void configure(const CameraSensorInfo &sensorInfo, - const std::map<unsigned int, IPAStream> &streamConfig, - const std::map<unsigned int, const ControlInfoMap &> &entityControls, - const IPAOperationData &ipaConfig, - IPAOperationData *result) override {} - void mapBuffers(const std::vector<IPABuffer> &buffers) override {} - void unmapBuffers(const std::vector<unsigned int> &ids) override {} - void processEvent(const IPAOperationData &event) override {} + void configure([[maybe_unused]] const CameraSensorInfo &sensorInfo, + [[maybe_unused]] const std::map<unsigned int, IPAStream> &streamConfig, + [[maybe_unused]] const std::map<unsigned int, const ControlInfoMap &> &entityControls, + [[maybe_unused]] const IPAOperationData &ipaConfig, + [[maybe_unused]] IPAOperationData *result) override {} + void mapBuffers([[maybe_unused]] const std::vector<IPABuffer> &buffers) override {} + void unmapBuffers([[maybe_unused]] const std::vector<unsigned int> &ids) override {} + void processEvent([[maybe_unused]] const IPAOperationData &event) override {} private: void initTrace(); diff --git a/src/libcamera/device_enumerator_udev.cpp b/src/libcamera/device_enumerator_udev.cpp index 96689daa5dd1..c6e23a1a7a18 100644 --- a/src/libcamera/device_enumerator_udev.cpp +++ b/src/libcamera/device_enumerator_udev.cpp @@ -327,7 +327,7 @@ int DeviceEnumeratorUdev::addV4L2Device(dev_t devnum) return 0; } -void DeviceEnumeratorUdev::udevNotify(EventNotifier *notifier) +void DeviceEnumeratorUdev::udevNotify([[maybe_unused]] EventNotifier *notifier) { struct udev_device *dev = udev_monitor_receive_device(monitor_); std::string action(udev_device_get_action(dev)); diff --git a/src/libcamera/ipc_unixsocket.cpp b/src/libcamera/ipc_unixsocket.cpp index 7df86e885f23..701b2c518217 100644 --- a/src/libcamera/ipc_unixsocket.cpp +++ b/src/libcamera/ipc_unixsocket.cpp @@ -308,7 +308,7 @@ int IPCUnixSocket::recvData(void *buffer, size_t length, return 0; } -void IPCUnixSocket::dataNotifier(EventNotifier *notifier) +void IPCUnixSocket::dataNotifier([[maybe_unused]] EventNotifier *notifier) { int ret; diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp index b8f0549f0c60..42c9caa03e2e 100644 --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp @@ -758,7 +758,7 @@ int PipelineHandlerRPi::configure(Camera *camera, CameraConfiguration *config) return ret; } -int PipelineHandlerRPi::exportFrameBuffers(Camera *camera, Stream *stream, +int PipelineHandlerRPi::exportFrameBuffers([[maybe_unused]] Camera *camera, Stream *stream, std::vector<std::unique_ptr<FrameBuffer>> *buffers) { RPiStream *s = static_cast<RPiStream *>(stream); @@ -1182,7 +1182,8 @@ int RPiCameraData::configureIPA() return 0; } -void RPiCameraData::queueFrameAction(unsigned int frame, const IPAOperationData &action) +void RPiCameraData::queueFrameAction([[maybe_unused]] unsigned int frame, + const IPAOperationData &action) { /* * The following actions can be handled when the pipeline handler is in diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp index 32fdaed7c661..4d89aab3845d 100644 --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp @@ -700,7 +700,7 @@ int PipelineHandlerRkISP1::configure(Camera *camera, CameraConfiguration *c) return 0; } -int PipelineHandlerRkISP1::exportFrameBuffers(Camera *camera, Stream *stream, +int PipelineHandlerRkISP1::exportFrameBuffers([[maybe_unused]] Camera *camera, Stream *stream, std::vector<std::unique_ptr<FrameBuffer>> *buffers) { unsigned int count = stream->configuration().bufferCount; diff --git a/src/libcamera/pipeline/rkisp1/timeline.cpp b/src/libcamera/pipeline/rkisp1/timeline.cpp index f5194608ced7..6b83bbe5b589 100644 --- a/src/libcamera/pipeline/rkisp1/timeline.cpp +++ b/src/libcamera/pipeline/rkisp1/timeline.cpp @@ -204,7 +204,7 @@ void Timeline::updateDeadline() timer_.start(deadline); } -void Timeline::timeout(Timer *timer) +void Timeline::timeout([[maybe_unused]] Timer *timer) { utils::time_point now = std::chrono::steady_clock::now(); diff --git a/src/libcamera/process.cpp b/src/libcamera/process.cpp index 8311d274a288..994190dc6f3d 100644 --- a/src/libcamera/process.cpp +++ b/src/libcamera/process.cpp @@ -89,7 +89,7 @@ void sigact(int signal, siginfo_t *info, void *ucontext) } /* namespace */ -void ProcessManager::sighandler(EventNotifier *notifier) +void ProcessManager::sighandler([[maybe_unused]] EventNotifier *notifier) { char data; ssize_t ret = read(pipe_[0], &data, sizeof(data)); diff --git a/src/libcamera/proxy/ipa_proxy_linux.cpp b/src/libcamera/proxy/ipa_proxy_linux.cpp index 68eafb307b2a..b78a0e4535f5 100644 --- a/src/libcamera/proxy/ipa_proxy_linux.cpp +++ b/src/libcamera/proxy/ipa_proxy_linux.cpp @@ -26,17 +26,20 @@ public: IPAProxyLinux(IPAModule *ipam); ~IPAProxyLinux(); - int init(const IPASettings &settings) override { return 0; } + int init([[maybe_unused]] const IPASettings &settings) override + { + return 0; + } int start() override { return 0; } void stop() override {} - void configure(const CameraSensorInfo &sensorInfo, - const std::map<unsigned int, IPAStream> &streamConfig, - const std::map<unsigned int, const ControlInfoMap &> &entityControls, - const IPAOperationData &ipaConfig, - IPAOperationData *result) override {} - void mapBuffers(const std::vector<IPABuffer> &buffers) override {} - void unmapBuffers(const std::vector<unsigned int> &ids) override {} - void processEvent(const IPAOperationData &event) override {} + void configure([[maybe_unused]] const CameraSensorInfo &sensorInfo, + [[maybe_unused]] const std::map<unsigned int, IPAStream> &streamConfig, + [[maybe_unused]] const std::map<unsigned int, const ControlInfoMap &> &entityControls, + [[maybe_unused]] const IPAOperationData &ipaConfig, + [[maybe_unused]] IPAOperationData *result) override {} + void mapBuffers([[maybe_unused]] const std::vector<IPABuffer> &buffers) override {} + void unmapBuffers([[maybe_unused]] const std::vector<unsigned int> &ids) override {} + void processEvent([[maybe_unused]] const IPAOperationData &event) override {} private: void readyRead(IPCUnixSocket *ipc); @@ -91,7 +94,7 @@ IPAProxyLinux::~IPAProxyLinux() delete socket_; } -void IPAProxyLinux::readyRead(IPCUnixSocket *ipc) +void IPAProxyLinux::readyRead([[maybe_unused]] IPCUnixSocket *ipc) { } diff --git a/src/libcamera/v4l2_pixelformat.cpp b/src/libcamera/v4l2_pixelformat.cpp index 8391ec48ac10..30c94bb98f44 100644 --- a/src/libcamera/v4l2_pixelformat.cpp +++ b/src/libcamera/v4l2_pixelformat.cpp @@ -196,7 +196,7 @@ PixelFormat V4L2PixelFormat::toPixelFormat() const * \return The V4L2PixelFormat corresponding to \a pixelFormat */ V4L2PixelFormat V4L2PixelFormat::fromPixelFormat(const PixelFormat &pixelFormat, - bool multiplanar) + [[maybe_unused]] bool multiplanar) { const PixelFormatInfo &info = PixelFormatInfo::info(pixelFormat); if (!info.isValid()) diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp index 652677ff1d4d..508522ef42bb 100644 --- a/src/libcamera/v4l2_videodevice.cpp +++ b/src/libcamera/v4l2_videodevice.cpp @@ -1462,7 +1462,7 @@ int V4L2VideoDevice::queueBuffer(FrameBuffer *buffer) * For Capture video devices the FrameBuffer will contain valid data. * For Output video devices the FrameBuffer can be considered empty. */ -void V4L2VideoDevice::bufferAvailable(EventNotifier *notifier) +void V4L2VideoDevice::bufferAvailable([[maybe_unused]] EventNotifier *notifier) { FrameBuffer *buffer = dequeueBuffer(); if (!buffer) @@ -1539,7 +1539,7 @@ FrameBuffer *V4L2VideoDevice::dequeueBuffer() * When this slot is called, a V4L2 event is available to be dequeued from the * device. */ -void V4L2VideoDevice::eventAvailable(EventNotifier *notifier) +void V4L2VideoDevice::eventAvailable([[maybe_unused]] EventNotifier *notifier) { struct v4l2_event event{}; int ret = ioctl(VIDIOC_DQEVENT, &event); diff --git a/src/qcam/dng_writer.cpp b/src/qcam/dng_writer.cpp index b5b81f0637b5..030d1387118d 100644 --- a/src/qcam/dng_writer.cpp +++ b/src/qcam/dng_writer.cpp @@ -215,7 +215,7 @@ void packScanlineIPU3(void *output, const void *input, unsigned int width) } } -void thumbScanlineIPU3(const FormatInfo &info, void *output, +void thumbScanlineIPU3([[maybe_unused]] const FormatInfo &info, void *output, const void *input, unsigned int width, unsigned int stride) { @@ -350,7 +350,8 @@ static const std::map<PixelFormat, FormatInfo> formatInfo = { int DNGWriter::write(const char *filename, const Camera *camera, const StreamConfiguration &config, const ControlList &metadata, - const FrameBuffer *buffer, const void *data) + [[maybe_unused]] const FrameBuffer *buffer, + const void *data) { const auto it = formatInfo.find(config.pixelFormat); if (it == formatInfo.cend()) { diff --git a/src/qcam/main.cpp b/src/qcam/main.cpp index b3468cbf47e2..bae358df0877 100644 --- a/src/qcam/main.cpp +++ b/src/qcam/main.cpp @@ -17,7 +17,7 @@ #include "../cam/stream_options.h" #include "main_window.h" -void signalHandler(int signal) +void signalHandler([[maybe_unused]] int signal) { qInfo() << "Exiting"; qApp->quit(); diff --git a/src/v4l2/v4l2_camera.cpp b/src/v4l2/v4l2_camera.cpp index 61bca0732447..7a22f983ec0e 100644 --- a/src/v4l2/v4l2_camera.cpp +++ b/src/v4l2/v4l2_camera.cpp @@ -158,7 +158,7 @@ int V4L2Camera::validateConfiguration(const PixelFormat &pixelFormat, return 0; } -int V4L2Camera::allocBuffers(unsigned int count) +int V4L2Camera::allocBuffers([[maybe_unused]] unsigned int count) { Stream *stream = config_->at(0).stream(); diff --git a/test/camera/buffer_import.cpp b/test/camera/buffer_import.cpp index 97a8582761a7..d57ffa75edeb 100644 --- a/test/camera/buffer_import.cpp +++ b/test/camera/buffer_import.cpp @@ -33,7 +33,8 @@ public: } protected: - void bufferComplete(Request *request, FrameBuffer *buffer) + void bufferComplete([[maybe_unused]] Request *request, + FrameBuffer *buffer) { if (buffer->metadata().status != FrameMetadata::FrameSuccess) return; diff --git a/test/camera/capture.cpp b/test/camera/capture.cpp index 0fe3bf9be7f1..eb67bf2da71f 100644 --- a/test/camera/capture.cpp +++ b/test/camera/capture.cpp @@ -26,7 +26,8 @@ protected: unsigned int completeBuffersCount_; unsigned int completeRequestsCount_; - void bufferComplete(Request *request, FrameBuffer *buffer) + void bufferComplete([[maybe_unused]] Request *request, + FrameBuffer *buffer) { if (buffer->metadata().status != FrameMetadata::FrameSuccess) return; diff --git a/test/hotplug-cameras.cpp b/test/hotplug-cameras.cpp index 6a94535fa315..7d551eeb900d 100644 --- a/test/hotplug-cameras.cpp +++ b/test/hotplug-cameras.cpp @@ -26,12 +26,12 @@ using namespace libcamera; class HotplugTest : public Test { protected: - void cameraAddedHandler(std::shared_ptr<Camera> cam) + void cameraAddedHandler([[maybe_unused]] std::shared_ptr<Camera> cam) { cameraAdded_ = true; } - void cameraRemovedHandler(std::shared_ptr<Camera> cam) + void cameraRemovedHandler([[maybe_unused]] std::shared_ptr<Camera> cam) { cameraRemoved_ = true; } diff --git a/test/ipa/ipa_wrappers_test.cpp b/test/ipa/ipa_wrappers_test.cpp index 23c799da0663..59d991cbbf6a 100644 --- a/test/ipa/ipa_wrappers_test.cpp +++ b/test/ipa/ipa_wrappers_test.cpp @@ -70,8 +70,8 @@ public: void configure(const CameraSensorInfo &sensorInfo, const std::map<unsigned int, IPAStream> &streamConfig, const std::map<unsigned int, const ControlInfoMap &> &entityControls, - const IPAOperationData &ipaConfig, - IPAOperationData *result) override + [[maybe_unused]] const IPAOperationData &ipaConfig, + [[maybe_unused]] IPAOperationData *result) override { /* Verify sensorInfo. */ if (sensorInfo.outputSize.width != 2560 || diff --git a/test/libtest/test.h b/test/libtest/test.h index 26d4b94bc12d..8ecf2bda950f 100644 --- a/test/libtest/test.h +++ b/test/libtest/test.h @@ -30,7 +30,7 @@ protected: }; #define TEST_REGISTER(klass) \ -int main(int argc, char *argv[]) \ +int main([[maybe_unused]] int argc, [[maybe_unused]] char *argv[]) \ { \ return klass().execute(); \ } diff --git a/test/log/log_process.cpp b/test/log/log_process.cpp index d46d5e354727..b024f002843c 100644 --- a/test/log/log_process.cpp +++ b/test/log/log_process.cpp @@ -125,7 +125,8 @@ protected: } private: - void procFinished(Process *proc, enum Process::ExitStatus exitStatus, int exitCode) + void procFinished([[maybe_unused]] Process *proc, + enum Process::ExitStatus exitStatus, int exitCode) { exitStatus_ = exitStatus; exitCode_ = exitCode; diff --git a/test/object-invoke.cpp b/test/object-invoke.cpp index 1ae11bb11e16..f3fd23283239 100644 --- a/test/object-invoke.cpp +++ b/test/object-invoke.cpp @@ -50,7 +50,7 @@ public: value_ = value; } - void methodWithReference(const int &value) + void methodWithReference([[maybe_unused]] const int &value) { } diff --git a/test/process/process_test.cpp b/test/process/process_test.cpp index 721a7c9d46ff..42a26749f5d9 100644 --- a/test/process/process_test.cpp +++ b/test/process/process_test.cpp @@ -80,7 +80,8 @@ protected: } private: - void procFinished(Process *proc, enum Process::ExitStatus exitStatus, int exitCode) + void procFinished([[maybe_unused]] Process *proc, + enum Process::ExitStatus exitStatus, int exitCode) { exitStatus_ = exitStatus; exitCode_ = exitCode; diff --git a/test/timer-thread.cpp b/test/timer-thread.cpp index 2f901787f5fb..f794d8e7dd4e 100644 --- a/test/timer-thread.cpp +++ b/test/timer-thread.cpp @@ -40,7 +40,7 @@ public: } private: - void timeoutHandler(Timer *timer) + void timeoutHandler([[maybe_unused]] Timer *timer) { timeout_ = true; } diff --git a/test/timer.cpp b/test/timer.cpp index 7d5b93c37799..537489d736ad 100644 --- a/test/timer.cpp +++ b/test/timer.cpp @@ -57,7 +57,7 @@ public: } private: - void timeoutHandler(Timer *timer) + void timeoutHandler([[maybe_unused]] Timer *timer) { expiration_ = std::chrono::steady_clock::now(); count_++;
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. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> --- include/libcamera/bound_method.h | 2 +- include/libcamera/signal.h | 2 +- include/libcamera/span.h | 4 ++-- meson.build | 1 - src/android/camera3_hal.cpp | 11 +++++---- src/android/camera_device.cpp | 5 ++-- src/android/camera_ops.cpp | 5 ++-- src/cam/main.cpp | 2 +- src/gstreamer/gstlibcamerapool.cpp | 2 +- src/gstreamer/gstlibcameraprovider.cpp | 2 +- src/gstreamer/gstlibcamerasrc.cpp | 7 ++++-- src/ipa/raspberrypi/controller/rpi/agc.cpp | 3 ++- src/ipa/raspberrypi/raspberrypi.cpp | 2 +- src/ipa/rkisp1/rkisp1.cpp | 13 +++++++---- src/ipa/vimc/vimc.cpp | 16 ++++++------- src/libcamera/device_enumerator_udev.cpp | 2 +- src/libcamera/ipc_unixsocket.cpp | 2 +- .../pipeline/raspberrypi/raspberrypi.cpp | 5 ++-- src/libcamera/pipeline/rkisp1/rkisp1.cpp | 2 +- src/libcamera/pipeline/rkisp1/timeline.cpp | 2 +- src/libcamera/process.cpp | 2 +- src/libcamera/proxy/ipa_proxy_linux.cpp | 23 +++++++++++-------- src/libcamera/v4l2_pixelformat.cpp | 2 +- src/libcamera/v4l2_videodevice.cpp | 4 ++-- src/qcam/dng_writer.cpp | 5 ++-- src/qcam/main.cpp | 2 +- src/v4l2/v4l2_camera.cpp | 2 +- test/camera/buffer_import.cpp | 3 ++- test/camera/capture.cpp | 3 ++- test/hotplug-cameras.cpp | 4 ++-- test/ipa/ipa_wrappers_test.cpp | 4 ++-- test/libtest/test.h | 2 +- test/log/log_process.cpp | 3 ++- test/object-invoke.cpp | 2 +- test/process/process_test.cpp | 3 ++- test/timer-thread.cpp | 2 +- test/timer.cpp | 2 +- 37 files changed, 89 insertions(+), 69 deletions(-)