[{"id":2972,"web_url":"https://patchwork.libcamera.org/comment/2972/","msgid":"<34810c55-0226-253c-56ff-9a756ee5f997@ideasonboard.com>","date":"2019-10-28T09:32:14","subject":"Re: [libcamera-devel] [PATCH/RFC] meson: Remove\n\t-Wno-unused-parameter","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Hi Laurent,\n\nOn 26/10/2019 22:38, Laurent Pinchart wrote:\n> We build libcamera with -Wno-unused-parameter and this doesn't cause\n> much issue internally. However, it prevents catching unused parameters\n> in inline functions defined in public headers. This can lead to\n> compilation warnings for applications compiled without\n> -Wno-unused-parameter.\n> \n> To catch those issues, remove -Wno-unused-parameter and fix all the\n> related warnings.\n\nWhat's your opinion on defining an unused(variable) (named otherwise if\nrequired) macro so that we can declare unused variables in the code\nbase, and keep the function prototypes clean?\n\ni.e.\n\n#define unused(_x) (void)(_x)\n\n ControlValue ControlValue::load(ByteStreamBuffer &b, ControlType type,\n                                unsigned int count)\n {\n+       unused(count);\n+\n        switch (type) {\n        case ControlTypeBool: {\n                bool value;\n  ...\n }\n\nI think something like that would allow cleaner function declarations,\nthat do not need to be modified once someone actually uses the variable\nin question. Simply remove the 'unused' declaration ?\n\n--\nKieran\n\n\n> Fix an additional checkstyle.py error while at it.\n> \n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> ---\n>  meson.build                                |  1 -\n>  src/android/camera3_hal.cpp                |  9 +++++----\n>  src/android/camera_device.cpp              |  4 ++--\n>  src/android/camera_proxy.cpp               |  4 ++--\n>  src/cam/main.cpp                           |  2 +-\n>  src/ipa/ipa_vimc.cpp                       | 10 +++++-----\n>  src/ipa/rkisp1/rkisp1.cpp                  |  2 +-\n>  src/libcamera/device_enumerator_udev.cpp   |  2 +-\n>  src/libcamera/ipc_unixsocket.cpp           |  2 +-\n>  src/libcamera/pipeline/ipu3/ipu3.cpp       |  2 +-\n>  src/libcamera/pipeline/rkisp1/rkisp1.cpp   |  2 +-\n>  src/libcamera/pipeline/rkisp1/timeline.cpp |  2 +-\n>  src/libcamera/pipeline/uvcvideo.cpp        |  2 +-\n>  src/libcamera/pipeline/vimc.cpp            |  4 ++--\n>  src/libcamera/process.cpp                  |  2 +-\n>  src/libcamera/proxy/ipa_proxy_linux.cpp    | 12 ++++++------\n>  src/libcamera/v4l2_videodevice.cpp         |  2 +-\n>  src/qcam/main.cpp                          |  2 +-\n>  test/camera/capture.cpp                    |  2 +-\n>  test/libtest/test.h                        |  4 ++--\n>  test/log/log_process.cpp                   |  3 ++-\n>  test/message.cpp                           |  2 +-\n>  test/process/process_test.cpp              |  3 ++-\n>  test/timer-thread.cpp                      |  2 +-\n>  test/timer.cpp                             |  2 +-\n>  25 files changed, 43 insertions(+), 41 deletions(-)\n> \n> diff --git a/meson.build b/meson.build\n> index 72ad7c8b493b..19a921a8ba6a 100644\n> --- a/meson.build\n> +++ b/meson.build\n> @@ -31,7 +31,6 @@ if cc.has_header_symbol('stdlib.h', 'secure_getenv', prefix : '#define _GNU_SOUR\n>  endif\n>  \n>  common_arguments = [\n> -    '-Wno-unused-parameter',\n>      '-include', 'config.h',\n>  ]\n>  \n> diff --git a/src/android/camera3_hal.cpp b/src/android/camera3_hal.cpp\n> index 8d2629ca356c..a7f470172583 100644\n> --- a/src/android/camera3_hal.cpp\n> +++ b/src/android/camera3_hal.cpp\n> @@ -31,18 +31,19 @@ static int hal_get_camera_info(int id, struct camera_info *info)\n>  \treturn cameraManager.getCameraInfo(id, info);\n>  }\n>  \n> -static int hal_set_callbacks(const camera_module_callbacks_t *callbacks)\n> +static int hal_set_callbacks(const camera_module_callbacks_t * /*callbacks*/)\n>  {\n>  \treturn 0;\n>  }\n>  \n> -static int hal_open_legacy(const struct hw_module_t *module, const char *id,\n> -\t\t\t   uint32_t halVersion, struct hw_device_t **device)\n> +static int hal_open_legacy(const struct hw_module_t * /*module*/,\n> +\t\t\t   const char * /*id*/, uint32_t /*halVersion*/,\n> +\t\t\t   struct hw_device_t ** /*device*/)\n>  {\n>  \treturn -ENOSYS;\n>  }\n>  \n> -static int hal_set_torch_mode(const char *camera_id, bool enabled)\n> +static int hal_set_torch_mode(const char * /*camera_id*/, bool /*enabled*/)\n>  {\n>  \treturn -ENOSYS;\n>  }\n> diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\n> index c7c9b3fd1724..b0ba1cf0a921 100644\n> --- a/src/android/camera_device.cpp\n> +++ b/src/android/camera_device.cpp\n> @@ -49,7 +49,7 @@ CameraDevice::Camera3RequestDescriptor::~Camera3RequestDescriptor()\n>   * to the framework using the designated callbacks.\n>   */\n>  \n> -CameraDevice::CameraDevice(unsigned int id, const std::shared_ptr<Camera> &camera)\n> +CameraDevice::CameraDevice(unsigned int /*id*/, const std::shared_ptr<Camera> &camera)\n>  \t: running_(false), camera_(camera), staticMetadata_(nullptr)\n>  {\n>  \tcamera_->requestCompleted.connect(this, &CameraDevice::requestComplete);\n> @@ -875,7 +875,7 @@ void CameraDevice::notifyError(uint32_t frameNumber, camera3_stream_t *stream)\n>  /*\n>   * Produce a set of fixed result metadata.\n>   */\n> -std::unique_ptr<CameraMetadata> CameraDevice::getResultMetadata(int frame_number,\n> +std::unique_ptr<CameraMetadata> CameraDevice::getResultMetadata(int /*frame_number*/,\n>  \t\t\t\t\t\t\t\tint64_t timestamp)\n>  {\n>  \t/*\n> diff --git a/src/android/camera_proxy.cpp b/src/android/camera_proxy.cpp\n> index 4f5c0a024903..c9f98c784eec 100644\n> --- a/src/android/camera_proxy.cpp\n> +++ b/src/android/camera_proxy.cpp\n> @@ -79,11 +79,11 @@ static int hal_dev_process_capture_request(const struct camera3_device *dev,\n>  \treturn proxy->processCaptureRequest(request);\n>  }\n>  \n> -static void hal_dev_dump(const struct camera3_device *dev, int fd)\n> +static void hal_dev_dump(const struct camera3_device * /*dev*/, int /*fd*/)\n>  {\n>  }\n>  \n> -static int hal_dev_flush(const struct camera3_device *dev)\n> +static int hal_dev_flush(const struct camera3_device * /*dev*/)\n>  {\n>  \treturn 0;\n>  }\n> diff --git a/src/cam/main.cpp b/src/cam/main.cpp\n> index 9d99f5587cbb..ceb0efeff045 100644\n> --- a/src/cam/main.cpp\n> +++ b/src/cam/main.cpp\n> @@ -326,7 +326,7 @@ int CamApp::run()\n>  \treturn 0;\n>  }\n>  \n> -void signalHandler(int signal)\n> +void signalHandler(int /*signal*/)\n>  {\n>  \tstd::cout << \"Exiting\" << std::endl;\n>  \tCamApp::instance()->quit();\n> diff --git a/src/ipa/ipa_vimc.cpp b/src/ipa/ipa_vimc.cpp\n> index 63d578b4e2aa..16c7e0732d40 100644\n> --- a/src/ipa/ipa_vimc.cpp\n> +++ b/src/ipa/ipa_vimc.cpp\n> @@ -30,11 +30,11 @@ public:\n>  \t~IPAVimc();\n>  \n>  \tint init() override;\n> -\tvoid configure(const std::map<unsigned int, IPAStream> &streamConfig,\n> -\t\t       const std::map<unsigned int, ControlInfoMap> &entityControls) override {}\n> -\tvoid mapBuffers(const std::vector<IPABuffer> &buffers) override {}\n> -\tvoid unmapBuffers(const std::vector<unsigned int> &ids) override {}\n> -\tvoid processEvent(const IPAOperationData &event) override {}\n> +\tvoid configure(const std::map<unsigned int, IPAStream> & /*streamConfig*/,\n> +\t\t       const std::map<unsigned int, ControlInfoMap> & /*entityControls*/) override {}\n> +\tvoid mapBuffers(const std::vector<IPABuffer> & /*buffers*/) override {}\n> +\tvoid unmapBuffers(const std::vector<unsigned int> & /*ids*/) override {}\n> +\tvoid processEvent(const IPAOperationData & /*event*/) override {}\n>  \n>  private:\n>  \tvoid initTrace();\n> diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp\n> index 9a13f5c7df17..84f270791340 100644\n> --- a/src/ipa/rkisp1/rkisp1.cpp\n> +++ b/src/ipa/rkisp1/rkisp1.cpp\n> @@ -61,7 +61,7 @@ private:\n>  \tuint32_t maxGain_;\n>  };\n>  \n> -void IPARkISP1::configure(const std::map<unsigned int, IPAStream> &streamConfig,\n> +void IPARkISP1::configure(const std::map<unsigned int, IPAStream> & /*streamConfig*/,\n>  \t\t\t  const std::map<unsigned int, ControlInfoMap> &entityControls)\n>  {\n>  \tif (entityControls.empty())\n> diff --git a/src/libcamera/device_enumerator_udev.cpp b/src/libcamera/device_enumerator_udev.cpp\n> index b2c5fd221dcd..6e0fbbd8c70c 100644\n> --- a/src/libcamera/device_enumerator_udev.cpp\n> +++ b/src/libcamera/device_enumerator_udev.cpp\n> @@ -309,7 +309,7 @@ int DeviceEnumeratorUdev::addV4L2Device(dev_t devnum)\n>  \treturn 0;\n>  }\n>  \n> -void DeviceEnumeratorUdev::udevNotify(EventNotifier *notifier)\n> +void DeviceEnumeratorUdev::udevNotify(EventNotifier * /*notifier*/)\n>  {\n>  \tstruct udev_device *dev = udev_monitor_receive_device(monitor_);\n>  \tstd::string action(udev_device_get_action(dev));\n> diff --git a/src/libcamera/ipc_unixsocket.cpp b/src/libcamera/ipc_unixsocket.cpp\n> index def08eef00f8..eb594268dd6c 100644\n> --- a/src/libcamera/ipc_unixsocket.cpp\n> +++ b/src/libcamera/ipc_unixsocket.cpp\n> @@ -306,7 +306,7 @@ int IPCUnixSocket::recvData(void *buffer, size_t length,\n>  \treturn 0;\n>  }\n>  \n> -void IPCUnixSocket::dataNotifier(EventNotifier *notifier)\n> +void IPCUnixSocket::dataNotifier(EventNotifier * /*notifier*/)\n>  {\n>  \tint ret;\n>  \n> diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> index 8d3ad568d16e..84356646b736 100644\n> --- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n> +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> @@ -700,7 +700,7 @@ error:\n>  }\n>  \n>  int PipelineHandlerIPU3::freeBuffers(Camera *camera,\n> -\t\t\t\t     const std::set<Stream *> &streams)\n> +\t\t\t\t     const std::set<Stream *> & /*streams*/)\n>  {\n>  \tIPU3CameraData *data = cameraData(camera);\n>  \n> diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> index 7a28b03b8d38..aed060bada70 100644\n> --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> @@ -703,7 +703,7 @@ int PipelineHandlerRkISP1::allocateBuffers(Camera *camera,\n>  }\n>  \n>  int PipelineHandlerRkISP1::freeBuffers(Camera *camera,\n> -\t\t\t\t       const std::set<Stream *> &streams)\n> +\t\t\t\t       const std::set<Stream *> & /*streams*/)\n>  {\n>  \tRkISP1CameraData *data = cameraData(camera);\n>  \n> diff --git a/src/libcamera/pipeline/rkisp1/timeline.cpp b/src/libcamera/pipeline/rkisp1/timeline.cpp\n> index f6c6434d7b53..59e6de78c79d 100644\n> --- a/src/libcamera/pipeline/rkisp1/timeline.cpp\n> +++ b/src/libcamera/pipeline/rkisp1/timeline.cpp\n> @@ -204,7 +204,7 @@ void Timeline::updateDeadline()\n>  \ttimer_.start(deadline);\n>  }\n>  \n> -void Timeline::timeout(Timer *timer)\n> +void Timeline::timeout(Timer * /*timer*/)\n>  {\n>  \tutils::time_point now = std::chrono::steady_clock::now();\n>  \n> diff --git a/src/libcamera/pipeline/uvcvideo.cpp b/src/libcamera/pipeline/uvcvideo.cpp\n> index fae0ffc4de30..94464c7c7f0c 100644\n> --- a/src/libcamera/pipeline/uvcvideo.cpp\n> +++ b/src/libcamera/pipeline/uvcvideo.cpp\n> @@ -208,7 +208,7 @@ int PipelineHandlerUVC::allocateBuffers(Camera *camera,\n>  }\n>  \n>  int PipelineHandlerUVC::freeBuffers(Camera *camera,\n> -\t\t\t\t    const std::set<Stream *> &streams)\n> +\t\t\t\t    const std::set<Stream *> & /*streams*/)\n>  {\n>  \tUVCCameraData *data = cameraData(camera);\n>  \treturn data->video_->releaseBuffers();\n> diff --git a/src/libcamera/pipeline/vimc.cpp b/src/libcamera/pipeline/vimc.cpp\n> index c16ae4cb76b5..7e325469f178 100644\n> --- a/src/libcamera/pipeline/vimc.cpp\n> +++ b/src/libcamera/pipeline/vimc.cpp\n> @@ -166,7 +166,7 @@ PipelineHandlerVimc::PipelineHandlerVimc(CameraManager *manager)\n>  {\n>  }\n>  \n> -CameraConfiguration *PipelineHandlerVimc::generateConfiguration(Camera *camera,\n> +CameraConfiguration *PipelineHandlerVimc::generateConfiguration(Camera * /*camera*/,\n>  \tconst StreamRoles &roles)\n>  {\n>  \tCameraConfiguration *config = new VimcCameraConfiguration();\n> @@ -274,7 +274,7 @@ int PipelineHandlerVimc::allocateBuffers(Camera *camera,\n>  }\n>  \n>  int PipelineHandlerVimc::freeBuffers(Camera *camera,\n> -\t\t\t\t     const std::set<Stream *> &streams)\n> +\t\t\t\t     const std::set<Stream *> & /*streams*/)\n>  {\n>  \tVimcCameraData *data = cameraData(camera);\n>  \treturn data->video_->releaseBuffers();\n> diff --git a/src/libcamera/process.cpp b/src/libcamera/process.cpp\n> index 3b4d0f10da67..44ebfec178fe 100644\n> --- a/src/libcamera/process.cpp\n> +++ b/src/libcamera/process.cpp\n> @@ -89,7 +89,7 @@ void sigact(int signal, siginfo_t *info, void *ucontext)\n>  \n>  } /* namespace */\n>  \n> -void ProcessManager::sighandler(EventNotifier *notifier)\n> +void ProcessManager::sighandler(EventNotifier * /*notifier*/)\n>  {\n>  \tchar data;\n>  \tssize_t ret = read(pipe_[0], &data, sizeof(data));\n> diff --git a/src/libcamera/proxy/ipa_proxy_linux.cpp b/src/libcamera/proxy/ipa_proxy_linux.cpp\n> index 4e6fa6899e07..d4ccf5112cd7 100644\n> --- a/src/libcamera/proxy/ipa_proxy_linux.cpp\n> +++ b/src/libcamera/proxy/ipa_proxy_linux.cpp\n> @@ -27,11 +27,11 @@ public:\n>  \t~IPAProxyLinux();\n>  \n>  \tint init() override { return 0; }\n> -\tvoid configure(const std::map<unsigned int, IPAStream> &streamConfig,\n> -\t\t       const std::map<unsigned int, ControlInfoMap> &entityControls) override {}\n> -\tvoid mapBuffers(const std::vector<IPABuffer> &buffers) override {}\n> -\tvoid unmapBuffers(const std::vector<unsigned int> &ids) override {}\n> -\tvoid processEvent(const IPAOperationData &event) override {}\n> +\tvoid configure(const std::map<unsigned int, IPAStream> & /*streamConfig*/,\n> +\t\t       const std::map<unsigned int, ControlInfoMap> & /*entityControls*/) override {}\n> +\tvoid mapBuffers(const std::vector<IPABuffer> & /*buffers*/) override {}\n> +\tvoid unmapBuffers(const std::vector<unsigned int> & /*ids*/) override {}\n> +\tvoid processEvent(const IPAOperationData & /*event*/) override {}\n>  \n>  private:\n>  \tvoid readyRead(IPCUnixSocket *ipc);\n> @@ -86,7 +86,7 @@ IPAProxyLinux::~IPAProxyLinux()\n>  \tdelete socket_;\n>  }\n>  \n> -void IPAProxyLinux::readyRead(IPCUnixSocket *ipc)\n> +void IPAProxyLinux::readyRead(IPCUnixSocket * /*ipc*/)\n>  {\n>  }\n>  \n> diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp\n> index 208ab54199b1..87d810d7cfa4 100644\n> --- a/src/libcamera/v4l2_videodevice.cpp\n> +++ b/src/libcamera/v4l2_videodevice.cpp\n> @@ -1141,7 +1141,7 @@ Buffer *V4L2VideoDevice::dequeueBuffer()\n>   * For Capture video devices the Buffer will contain valid data.\n>   * For Output video devices the Buffer can be considered empty.\n>   */\n> -void V4L2VideoDevice::bufferAvailable(EventNotifier *notifier)\n> +void V4L2VideoDevice::bufferAvailable(EventNotifier * /*notifier*/)\n>  {\n>  \tBuffer *buffer = dequeueBuffer();\n>  \tif (!buffer)\n> diff --git a/src/qcam/main.cpp b/src/qcam/main.cpp\n> index a7ff5c52663b..d8cfc1c3d76b 100644\n> --- a/src/qcam/main.cpp\n> +++ b/src/qcam/main.cpp\n> @@ -17,7 +17,7 @@\n>  #include \"../cam/options.h\"\n>  #include \"qt_event_dispatcher.h\"\n>  \n> -void signalHandler(int signal)\n> +void signalHandler(int /*signal*/)\n>  {\n>  \tstd::cout << \"Exiting\" << std::endl;\n>  \tqApp->quit();\n> diff --git a/test/camera/capture.cpp b/test/camera/capture.cpp\n> index 791ccad15f70..a5fd0a641705 100644\n> --- a/test/camera/capture.cpp\n> +++ b/test/camera/capture.cpp\n> @@ -19,7 +19,7 @@ protected:\n>  \tunsigned int completeBuffersCount_;\n>  \tunsigned int completeRequestsCount_;\n>  \n> -\tvoid bufferComplete(Request *request, Buffer *buffer)\n> +\tvoid bufferComplete(Request * /*request*/, Buffer *buffer)\n>  \t{\n>  \t\tif (buffer->status() != Buffer::BufferSuccess)\n>  \t\t\treturn;\n> diff --git a/test/libtest/test.h b/test/libtest/test.h\n> index ec08bf97c03d..193d7aa99f38 100644\n> --- a/test/libtest/test.h\n> +++ b/test/libtest/test.h\n> @@ -26,11 +26,11 @@ public:\n>  protected:\n>  \tvirtual int init() { return 0; }\n>  \tvirtual int run() = 0;\n> -\tvirtual void cleanup() { }\n> +\tvirtual void cleanup() {}\n>  };\n>  \n>  #define TEST_REGISTER(klass)\t\t\t\t\t\t\\\n> -int main(int argc, char *argv[])\t\t\t\t\t\\\n> +int main(int /*argc*/, char * /*argv*/[])\t\t\t\t\\\n>  {\t\t\t\t\t\t\t\t\t\\\n>  \treturn klass().execute();\t\t\t\t\t\\\n>  }\n> diff --git a/test/log/log_process.cpp b/test/log/log_process.cpp\n> index 2df4aa43713c..fa5639dde7cb 100644\n> --- a/test/log/log_process.cpp\n> +++ b/test/log/log_process.cpp\n> @@ -123,7 +123,8 @@ protected:\n>  \t}\n>  \n>  private:\n> -\tvoid procFinished(Process *proc, enum Process::ExitStatus exitStatus, int exitCode)\n> +\tvoid procFinished(Process * /*proc*/,\n> +\t\t\t  enum Process::ExitStatus exitStatus, int exitCode)\n>  \t{\n>  \t\texitStatus_ = exitStatus;\n>  \t\texitCode_ = exitCode;\n> diff --git a/test/message.cpp b/test/message.cpp\n> index 3775c30a20b3..3e2659c836e3 100644\n> --- a/test/message.cpp\n> +++ b/test/message.cpp\n> @@ -35,7 +35,7 @@ public:\n>  \tvoid reset() { status_ = NoMessage; }\n>  \n>  protected:\n> -\tvoid message(Message *msg)\n> +\tvoid message(Message * /*msg*/)\n>  \t{\n>  \t\tif (thread() != Thread::current())\n>  \t\t\tstatus_ = InvalidThread;\n> diff --git a/test/process/process_test.cpp b/test/process/process_test.cpp\n> index 7e7b3c2c8bf3..2ba3efd08457 100644\n> --- a/test/process/process_test.cpp\n> +++ b/test/process/process_test.cpp\n> @@ -75,7 +75,8 @@ protected:\n>  \t}\n>  \n>  private:\n> -\tvoid procFinished(Process *proc, enum Process::ExitStatus exitStatus, int exitCode)\n> +\tvoid procFinished(Process * /*proc*/,\n> +\t\t\t  enum Process::ExitStatus exitStatus, int exitCode)\n>  \t{\n>  \t\texitStatus_ = exitStatus;\n>  \t\texitCode_ = exitCode;\n> diff --git a/test/timer-thread.cpp b/test/timer-thread.cpp\n> index 32853b4e80ef..55b7abcbbeab 100644\n> --- a/test/timer-thread.cpp\n> +++ b/test/timer-thread.cpp\n> @@ -39,7 +39,7 @@ public:\n>  \t}\n>  \n>  private:\n> -\tvoid timeoutHandler(Timer *timer)\n> +\tvoid timeoutHandler(Timer * /*timer*/)\n>  \t{\n>  \t\ttimeout_ = true;\n>  \t}\n> diff --git a/test/timer.cpp b/test/timer.cpp\n> index 2bdb006edccb..03df03aa8d69 100644\n> --- a/test/timer.cpp\n> +++ b/test/timer.cpp\n> @@ -56,7 +56,7 @@ public:\n>  \t}\n>  \n>  private:\n> -\tvoid timeoutHandler(Timer *timer)\n> +\tvoid timeoutHandler(Timer * /*timer*/)\n>  \t{\n>  \t\texpiration_ = std::chrono::steady_clock::now();\n>  \t\tcount_++;\n>","headers":{"Return-Path":"<kieran.bingham@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id CF57D6017E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 28 Oct 2019 10:32:17 +0100 (CET)","from [192.168.0.20]\n\t(cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 2083D325;\n\tMon, 28 Oct 2019 10:32:17 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1572255137;\n\tbh=IBJFmdRGHOODuBxa/zicHWaDlw20fh1LmPMtOC6XOT8=;\n\th=Reply-To:Subject:To:References:From:Date:In-Reply-To:From;\n\tb=e2Sl/cRb3qPzyI2ueuCOa4t1x0wC1Unj2zH8JnPgH68HpbRtDu36GVzPnjUzqDPzB\n\tyaOJeepxLkd2vot4diG8r0HXfhj8u2rv7Nsjf323GuyGKq2CSyvrq7MMfMesf+I3mj\n\t2myFgZemp9juvdR+3/bl0RuxhVgjV/Weio5FKlps=","Reply-To":"kieran.bingham@ideasonboard.com","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20191026213835.15110-1-laurent.pinchart@ideasonboard.com>","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Openpgp":"preference=signencrypt","Autocrypt":"addr=kieran.bingham@ideasonboard.com; keydata=\n\tmQINBFYE/WYBEACs1PwjMD9rgCu1hlIiUA1AXR4rv2v+BCLUq//vrX5S5bjzxKAryRf0uHat\n\tV/zwz6hiDrZuHUACDB7X8OaQcwhLaVlq6byfoBr25+hbZG7G3+5EUl9cQ7dQEdvNj6V6y/SC\n\trRanWfelwQThCHckbobWiQJfK9n7rYNcPMq9B8e9F020LFH7Kj6YmO95ewJGgLm+idg1Kb3C\n\tpotzWkXc1xmPzcQ1fvQMOfMwdS+4SNw4rY9f07Xb2K99rjMwZVDgESKIzhsDB5GY465sCsiQ\n\tcSAZRxqE49RTBq2+EQsbrQpIc8XiffAB8qexh5/QPzCmR4kJgCGeHIXBtgRj+nIkCJPZvZtf\n\tKr2EAbc6tgg6DkAEHJb+1okosV09+0+TXywYvtEop/WUOWQ+zo+Y/OBd+8Ptgt1pDRyOBzL8\n\tRXa8ZqRf0Mwg75D+dKntZeJHzPRJyrlfQokngAAs4PaFt6UfS+ypMAF37T6CeDArQC41V3ko\n\tlPn1yMsVD0p+6i3DPvA/GPIksDC4owjnzVX9kM8Zc5Cx+XoAN0w5Eqo4t6qEVbuettxx55gq\n\t8K8FieAjgjMSxngo/HST8TpFeqI5nVeq0/lqtBRQKumuIqDg+Bkr4L1V/PSB6XgQcOdhtd36\n\tOe9X9dXB8YSNt7VjOcO7BTmFn/Z8r92mSAfHXpb07YJWJosQOQARAQABtDBLaWVyYW4gQmlu\n\tZ2hhbSA8a2llcmFuLmJpbmdoYW1AaWRlYXNvbmJvYXJkLmNvbT6JAlcEEwEKAEECGwMFCwkI\n\tBwIGFQgJCgsCBBYCAwECHgECF4ACGQEWIQSQLdeYP70o/eNy1HqhHkZyEKRh/QUCXWTtygUJ\n\tCyJXZAAKCRChHkZyEKRh/f8dEACTDsbLN2nioNZMwyLuQRUAFcXNolDX48xcUXsWS2QjxaPm\n\tVsJx8Uy8aYkS85mdPBh0C83OovQR/OVbr8AxhGvYqBs3nQvbWuTl/+4od7DfK2VZOoKBAu5S\n\tQK2FYuUcikDqYcFWJ8DQnubxfE8dvzojHEkXw0sA4igINHDDFX3HJGZtLio+WpEFQtCbfTAG\n\tYZslasz1YZRbwEdSsmO3/kqy5eMnczlm8a21A3fKUo3g8oAZEFM+f4DUNzqIltg31OAB/kZS\n\tenKZQ/SWC8PmLg/ZXBrReYakxXtkP6w3FwMlzOlhGxqhIRNiAJfXJBaRhuUWzPOpEDE9q5YJ\n\tBmqQL2WJm1VSNNVxbXJHpaWMH1sA2R00vmvRrPXGwyIO0IPYeUYQa3gsy6k+En/aMQJd27dp\n\taScf9am9PFICPY5T4ppneeJLif2lyLojo0mcHOV+uyrds9XkLpp14GfTkeKPdPMrLLTsHRfH\n\tfA4I4OBpRrEPiGIZB/0im98MkGY/Mu6qxeZmYLCcgD6qz4idOvfgVOrNh+aA8HzIVR+RMW8H\n\tQGBN9f0E3kfwxuhl3omo6V7lDw8XOdmuWZNC9zPq1UfryVHANYbLGz9KJ4Aw6M+OgBC2JpkD\n\thXMdHUkC+d20dwXrwHTlrJi1YNp6rBc+xald3wsUPOZ5z8moTHUX/uPA/qhGsbkCDQRWBP1m\n\tARAAzijkb+Sau4hAncr1JjOY+KyFEdUNxRy+hqTJdJfaYihxyaj0Ee0P0zEi35CbE6lgU0Uz\n\ttih9fiUbSV3wfsWqg1Ut3/5rTKu7kLFp15kF7eqvV4uezXRD3Qu4yjv/rMmEJbbD4cTvGCYI\n\td6MDC417f7vK3hCbCVIZSp3GXxyC1LU+UQr3fFcOyCwmP9vDUR9JV0BSqHHxRDdpUXE26Dk6\n\tmhf0V1YkspE5St814ETXpEus2urZE5yJIUROlWPIL+hm3NEWfAP06vsQUyLvr/GtbOT79vXl\n\tEn1aulcYyu20dRRxhkQ6iILaURcxIAVJJKPi8dsoMnS8pB0QW12AHWuirPF0g6DiuUfPmrA5\n\tPKe56IGlpkjc8cO51lIxHkWTpCMWigRdPDexKX+Sb+W9QWK/0JjIc4t3KBaiG8O4yRX8ml2R\n\t+rxfAVKM6V769P/hWoRGdgUMgYHFpHGSgEt80OKK5HeUPy2cngDUXzwrqiM5Sz6Od0qw5pCk\n\tNlXqI0W/who0iSVM+8+RmyY0OEkxEcci7rRLsGnM15B5PjLJjh1f2ULYkv8s4SnDwMZ/kE04\n\t/UqCMK/KnX8pwXEMCjz0h6qWNpGwJ0/tYIgQJZh6bqkvBrDogAvuhf60Sogw+mH8b+PBlx1L\n\toeTK396wc+4c3BfiC6pNtUS5GpsPMMjYMk7kVvEAEQEAAYkCPAQYAQoAJgIbDBYhBJAt15g/\n\tvSj943LUeqEeRnIQpGH9BQJdizzIBQkLSKZiAAoJEKEeRnIQpGH9eYgQAJpjaWNgqNOnMTmD\n\tMJggbwjIotypzIXfhHNCeTkG7+qCDlSaBPclcPGYrTwCt0YWPU2TgGgJrVhYT20ierN8LUvj\n\t6qOPTd+Uk7NFzL65qkh80ZKNBFddx1AabQpSVQKbdcLb8OFs85kuSvFdgqZwgxA1vl4TFhNz\n\tPZ79NAmXLackAx3sOVFhk4WQaKRshCB7cSl+RIng5S/ThOBlwNlcKG7j7W2MC06BlTbdEkUp\n\tECzuuRBv8wX4OQl+hbWbB/VKIx5HKlLu1eypen/5lNVzSqMMIYkkZcjV2SWQyUGxSwq0O/sx\n\tS0A8/atCHUXOboUsn54qdxrVDaK+6jIAuo8JiRWctP16KjzUM7MO0/+4zllM8EY57rXrj48j\n\tsbEYX0YQnzaj+jO6kJtoZsIaYR7rMMq9aUAjyiaEZpmP1qF/2sYenDx0Fg2BSlLvLvXM0vU8\n\tpQk3kgDu7kb/7PRYrZvBsr21EIQoIjXbZxDz/o7z95frkP71EaICttZ6k9q5oxxA5WC6sTXc\n\tMW8zs8avFNuA9VpXt0YupJd2ijtZy2mpZNG02fFVXhIn4G807G7+9mhuC4XG5rKlBBUXTvPU\n\tAfYnB4JBDLmLzBFavQfvonSfbitgXwCG3vS+9HEwAjU30Bar1PEOmIbiAoMzuKeRm2LVpmq4\n\tWZw01QYHU/GUV/zHJSFk","Organization":"Ideas on Board","Message-ID":"<34810c55-0226-253c-56ff-9a756ee5f997@ideasonboard.com>","Date":"Mon, 28 Oct 2019 09:32:14 +0000","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101\n\tThunderbird/60.8.0","MIME-Version":"1.0","In-Reply-To":"<20191026213835.15110-1-laurent.pinchart@ideasonboard.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-GB","Content-Transfer-Encoding":"8bit","Subject":"Re: [libcamera-devel] [PATCH/RFC] meson: Remove\n\t-Wno-unused-parameter","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Mon, 28 Oct 2019 09:32:18 -0000"}},{"id":2973,"web_url":"https://patchwork.libcamera.org/comment/2973/","msgid":"<20191028103544.GA14017@pendragon.ideasonboard.com>","date":"2019-10-28T10:35:44","subject":"Re: [libcamera-devel] [PATCH/RFC] meson: Remove\n\t-Wno-unused-parameter","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Kieran,\n\nOn Mon, Oct 28, 2019 at 09:32:14AM +0000, Kieran Bingham wrote:\n> On 26/10/2019 22:38, Laurent Pinchart wrote:\n> > We build libcamera with -Wno-unused-parameter and this doesn't cause\n> > much issue internally. However, it prevents catching unused parameters\n> > in inline functions defined in public headers. This can lead to\n> > compilation warnings for applications compiled without\n> > -Wno-unused-parameter.\n> > \n> > To catch those issues, remove -Wno-unused-parameter and fix all the\n> > related warnings.\n> \n> What's your opinion on defining an unused(variable) (named otherwise if\n> required) macro so that we can declare unused variables in the code\n> base, and keep the function prototypes clean?\n> \n> i.e.\n> \n> #define unused(_x) (void)(_x)\n> \n>  ControlValue ControlValue::load(ByteStreamBuffer &b, ControlType type,\n>                                 unsigned int count)\n>  {\n> +       unused(count);\n> +\n>         switch (type) {\n>         case ControlTypeBool: {\n>                 bool value;\n>   ...\n>  }\n> \n> I think something like that would allow cleaner function declarations,\n> that do not need to be modified once someone actually uses the variable\n> in question. Simply remove the 'unused' declaration ?\n\nI'm afraid I don't like that :-) First of all, compilers may not always\nbe fooled by that particular implementation, and we'll play a game of\nwhack-a-mole as new compiler versions are released. Then, removing the\nvariable name is specified by the C++ standard as the official way to\nnote that a variable is unused. I don't think we should use a different,\nnon-standard implementation.\n\nThis patch stems from a warning generated when compiling a small test\ncode against libcamera out of the libcamera source tree, without\n-Wno-unused-parameter. It turns out we had a single issue in public\nheaders, so we will likely not introduce other such issues in the\nheaders very often. We could thus decide not to care about it and catch\nthe issues when they are reported. I however think there's value in\ndropping the compiler option though (otherwise I wouldn't have sent this\npatch in the first place :-)).\n\n> > Fix an additional checkstyle.py error while at it.\n> > \n> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > ---\n> >  meson.build                                |  1 -\n> >  src/android/camera3_hal.cpp                |  9 +++++----\n> >  src/android/camera_device.cpp              |  4 ++--\n> >  src/android/camera_proxy.cpp               |  4 ++--\n> >  src/cam/main.cpp                           |  2 +-\n> >  src/ipa/ipa_vimc.cpp                       | 10 +++++-----\n> >  src/ipa/rkisp1/rkisp1.cpp                  |  2 +-\n> >  src/libcamera/device_enumerator_udev.cpp   |  2 +-\n> >  src/libcamera/ipc_unixsocket.cpp           |  2 +-\n> >  src/libcamera/pipeline/ipu3/ipu3.cpp       |  2 +-\n> >  src/libcamera/pipeline/rkisp1/rkisp1.cpp   |  2 +-\n> >  src/libcamera/pipeline/rkisp1/timeline.cpp |  2 +-\n> >  src/libcamera/pipeline/uvcvideo.cpp        |  2 +-\n> >  src/libcamera/pipeline/vimc.cpp            |  4 ++--\n> >  src/libcamera/process.cpp                  |  2 +-\n> >  src/libcamera/proxy/ipa_proxy_linux.cpp    | 12 ++++++------\n> >  src/libcamera/v4l2_videodevice.cpp         |  2 +-\n> >  src/qcam/main.cpp                          |  2 +-\n> >  test/camera/capture.cpp                    |  2 +-\n> >  test/libtest/test.h                        |  4 ++--\n> >  test/log/log_process.cpp                   |  3 ++-\n> >  test/message.cpp                           |  2 +-\n> >  test/process/process_test.cpp              |  3 ++-\n> >  test/timer-thread.cpp                      |  2 +-\n> >  test/timer.cpp                             |  2 +-\n> >  25 files changed, 43 insertions(+), 41 deletions(-)\n> > \n> > diff --git a/meson.build b/meson.build\n> > index 72ad7c8b493b..19a921a8ba6a 100644\n> > --- a/meson.build\n> > +++ b/meson.build\n> > @@ -31,7 +31,6 @@ if cc.has_header_symbol('stdlib.h', 'secure_getenv', prefix : '#define _GNU_SOUR\n> >  endif\n> >  \n> >  common_arguments = [\n> > -    '-Wno-unused-parameter',\n> >      '-include', 'config.h',\n> >  ]\n> >  \n> > diff --git a/src/android/camera3_hal.cpp b/src/android/camera3_hal.cpp\n> > index 8d2629ca356c..a7f470172583 100644\n> > --- a/src/android/camera3_hal.cpp\n> > +++ b/src/android/camera3_hal.cpp\n> > @@ -31,18 +31,19 @@ static int hal_get_camera_info(int id, struct camera_info *info)\n> >  \treturn cameraManager.getCameraInfo(id, info);\n> >  }\n> >  \n> > -static int hal_set_callbacks(const camera_module_callbacks_t *callbacks)\n> > +static int hal_set_callbacks(const camera_module_callbacks_t * /*callbacks*/)\n> >  {\n> >  \treturn 0;\n> >  }\n> >  \n> > -static int hal_open_legacy(const struct hw_module_t *module, const char *id,\n> > -\t\t\t   uint32_t halVersion, struct hw_device_t **device)\n> > +static int hal_open_legacy(const struct hw_module_t * /*module*/,\n> > +\t\t\t   const char * /*id*/, uint32_t /*halVersion*/,\n> > +\t\t\t   struct hw_device_t ** /*device*/)\n> >  {\n> >  \treturn -ENOSYS;\n> >  }\n> >  \n> > -static int hal_set_torch_mode(const char *camera_id, bool enabled)\n> > +static int hal_set_torch_mode(const char * /*camera_id*/, bool /*enabled*/)\n> >  {\n> >  \treturn -ENOSYS;\n> >  }\n> > diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\n> > index c7c9b3fd1724..b0ba1cf0a921 100644\n> > --- a/src/android/camera_device.cpp\n> > +++ b/src/android/camera_device.cpp\n> > @@ -49,7 +49,7 @@ CameraDevice::Camera3RequestDescriptor::~Camera3RequestDescriptor()\n> >   * to the framework using the designated callbacks.\n> >   */\n> >  \n> > -CameraDevice::CameraDevice(unsigned int id, const std::shared_ptr<Camera> &camera)\n> > +CameraDevice::CameraDevice(unsigned int /*id*/, const std::shared_ptr<Camera> &camera)\n> >  \t: running_(false), camera_(camera), staticMetadata_(nullptr)\n> >  {\n> >  \tcamera_->requestCompleted.connect(this, &CameraDevice::requestComplete);\n> > @@ -875,7 +875,7 @@ void CameraDevice::notifyError(uint32_t frameNumber, camera3_stream_t *stream)\n> >  /*\n> >   * Produce a set of fixed result metadata.\n> >   */\n> > -std::unique_ptr<CameraMetadata> CameraDevice::getResultMetadata(int frame_number,\n> > +std::unique_ptr<CameraMetadata> CameraDevice::getResultMetadata(int /*frame_number*/,\n> >  \t\t\t\t\t\t\t\tint64_t timestamp)\n> >  {\n> >  \t/*\n> > diff --git a/src/android/camera_proxy.cpp b/src/android/camera_proxy.cpp\n> > index 4f5c0a024903..c9f98c784eec 100644\n> > --- a/src/android/camera_proxy.cpp\n> > +++ b/src/android/camera_proxy.cpp\n> > @@ -79,11 +79,11 @@ static int hal_dev_process_capture_request(const struct camera3_device *dev,\n> >  \treturn proxy->processCaptureRequest(request);\n> >  }\n> >  \n> > -static void hal_dev_dump(const struct camera3_device *dev, int fd)\n> > +static void hal_dev_dump(const struct camera3_device * /*dev*/, int /*fd*/)\n> >  {\n> >  }\n> >  \n> > -static int hal_dev_flush(const struct camera3_device *dev)\n> > +static int hal_dev_flush(const struct camera3_device * /*dev*/)\n> >  {\n> >  \treturn 0;\n> >  }\n> > diff --git a/src/cam/main.cpp b/src/cam/main.cpp\n> > index 9d99f5587cbb..ceb0efeff045 100644\n> > --- a/src/cam/main.cpp\n> > +++ b/src/cam/main.cpp\n> > @@ -326,7 +326,7 @@ int CamApp::run()\n> >  \treturn 0;\n> >  }\n> >  \n> > -void signalHandler(int signal)\n> > +void signalHandler(int /*signal*/)\n> >  {\n> >  \tstd::cout << \"Exiting\" << std::endl;\n> >  \tCamApp::instance()->quit();\n> > diff --git a/src/ipa/ipa_vimc.cpp b/src/ipa/ipa_vimc.cpp\n> > index 63d578b4e2aa..16c7e0732d40 100644\n> > --- a/src/ipa/ipa_vimc.cpp\n> > +++ b/src/ipa/ipa_vimc.cpp\n> > @@ -30,11 +30,11 @@ public:\n> >  \t~IPAVimc();\n> >  \n> >  \tint init() override;\n> > -\tvoid configure(const std::map<unsigned int, IPAStream> &streamConfig,\n> > -\t\t       const std::map<unsigned int, ControlInfoMap> &entityControls) override {}\n> > -\tvoid mapBuffers(const std::vector<IPABuffer> &buffers) override {}\n> > -\tvoid unmapBuffers(const std::vector<unsigned int> &ids) override {}\n> > -\tvoid processEvent(const IPAOperationData &event) override {}\n> > +\tvoid configure(const std::map<unsigned int, IPAStream> & /*streamConfig*/,\n> > +\t\t       const std::map<unsigned int, ControlInfoMap> & /*entityControls*/) override {}\n> > +\tvoid mapBuffers(const std::vector<IPABuffer> & /*buffers*/) override {}\n> > +\tvoid unmapBuffers(const std::vector<unsigned int> & /*ids*/) override {}\n> > +\tvoid processEvent(const IPAOperationData & /*event*/) override {}\n> >  \n> >  private:\n> >  \tvoid initTrace();\n> > diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp\n> > index 9a13f5c7df17..84f270791340 100644\n> > --- a/src/ipa/rkisp1/rkisp1.cpp\n> > +++ b/src/ipa/rkisp1/rkisp1.cpp\n> > @@ -61,7 +61,7 @@ private:\n> >  \tuint32_t maxGain_;\n> >  };\n> >  \n> > -void IPARkISP1::configure(const std::map<unsigned int, IPAStream> &streamConfig,\n> > +void IPARkISP1::configure(const std::map<unsigned int, IPAStream> & /*streamConfig*/,\n> >  \t\t\t  const std::map<unsigned int, ControlInfoMap> &entityControls)\n> >  {\n> >  \tif (entityControls.empty())\n> > diff --git a/src/libcamera/device_enumerator_udev.cpp b/src/libcamera/device_enumerator_udev.cpp\n> > index b2c5fd221dcd..6e0fbbd8c70c 100644\n> > --- a/src/libcamera/device_enumerator_udev.cpp\n> > +++ b/src/libcamera/device_enumerator_udev.cpp\n> > @@ -309,7 +309,7 @@ int DeviceEnumeratorUdev::addV4L2Device(dev_t devnum)\n> >  \treturn 0;\n> >  }\n> >  \n> > -void DeviceEnumeratorUdev::udevNotify(EventNotifier *notifier)\n> > +void DeviceEnumeratorUdev::udevNotify(EventNotifier * /*notifier*/)\n> >  {\n> >  \tstruct udev_device *dev = udev_monitor_receive_device(monitor_);\n> >  \tstd::string action(udev_device_get_action(dev));\n> > diff --git a/src/libcamera/ipc_unixsocket.cpp b/src/libcamera/ipc_unixsocket.cpp\n> > index def08eef00f8..eb594268dd6c 100644\n> > --- a/src/libcamera/ipc_unixsocket.cpp\n> > +++ b/src/libcamera/ipc_unixsocket.cpp\n> > @@ -306,7 +306,7 @@ int IPCUnixSocket::recvData(void *buffer, size_t length,\n> >  \treturn 0;\n> >  }\n> >  \n> > -void IPCUnixSocket::dataNotifier(EventNotifier *notifier)\n> > +void IPCUnixSocket::dataNotifier(EventNotifier * /*notifier*/)\n> >  {\n> >  \tint ret;\n> >  \n> > diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> > index 8d3ad568d16e..84356646b736 100644\n> > --- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n> > +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> > @@ -700,7 +700,7 @@ error:\n> >  }\n> >  \n> >  int PipelineHandlerIPU3::freeBuffers(Camera *camera,\n> > -\t\t\t\t     const std::set<Stream *> &streams)\n> > +\t\t\t\t     const std::set<Stream *> & /*streams*/)\n> >  {\n> >  \tIPU3CameraData *data = cameraData(camera);\n> >  \n> > diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> > index 7a28b03b8d38..aed060bada70 100644\n> > --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> > +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> > @@ -703,7 +703,7 @@ int PipelineHandlerRkISP1::allocateBuffers(Camera *camera,\n> >  }\n> >  \n> >  int PipelineHandlerRkISP1::freeBuffers(Camera *camera,\n> > -\t\t\t\t       const std::set<Stream *> &streams)\n> > +\t\t\t\t       const std::set<Stream *> & /*streams*/)\n> >  {\n> >  \tRkISP1CameraData *data = cameraData(camera);\n> >  \n> > diff --git a/src/libcamera/pipeline/rkisp1/timeline.cpp b/src/libcamera/pipeline/rkisp1/timeline.cpp\n> > index f6c6434d7b53..59e6de78c79d 100644\n> > --- a/src/libcamera/pipeline/rkisp1/timeline.cpp\n> > +++ b/src/libcamera/pipeline/rkisp1/timeline.cpp\n> > @@ -204,7 +204,7 @@ void Timeline::updateDeadline()\n> >  \ttimer_.start(deadline);\n> >  }\n> >  \n> > -void Timeline::timeout(Timer *timer)\n> > +void Timeline::timeout(Timer * /*timer*/)\n> >  {\n> >  \tutils::time_point now = std::chrono::steady_clock::now();\n> >  \n> > diff --git a/src/libcamera/pipeline/uvcvideo.cpp b/src/libcamera/pipeline/uvcvideo.cpp\n> > index fae0ffc4de30..94464c7c7f0c 100644\n> > --- a/src/libcamera/pipeline/uvcvideo.cpp\n> > +++ b/src/libcamera/pipeline/uvcvideo.cpp\n> > @@ -208,7 +208,7 @@ int PipelineHandlerUVC::allocateBuffers(Camera *camera,\n> >  }\n> >  \n> >  int PipelineHandlerUVC::freeBuffers(Camera *camera,\n> > -\t\t\t\t    const std::set<Stream *> &streams)\n> > +\t\t\t\t    const std::set<Stream *> & /*streams*/)\n> >  {\n> >  \tUVCCameraData *data = cameraData(camera);\n> >  \treturn data->video_->releaseBuffers();\n> > diff --git a/src/libcamera/pipeline/vimc.cpp b/src/libcamera/pipeline/vimc.cpp\n> > index c16ae4cb76b5..7e325469f178 100644\n> > --- a/src/libcamera/pipeline/vimc.cpp\n> > +++ b/src/libcamera/pipeline/vimc.cpp\n> > @@ -166,7 +166,7 @@ PipelineHandlerVimc::PipelineHandlerVimc(CameraManager *manager)\n> >  {\n> >  }\n> >  \n> > -CameraConfiguration *PipelineHandlerVimc::generateConfiguration(Camera *camera,\n> > +CameraConfiguration *PipelineHandlerVimc::generateConfiguration(Camera * /*camera*/,\n> >  \tconst StreamRoles &roles)\n> >  {\n> >  \tCameraConfiguration *config = new VimcCameraConfiguration();\n> > @@ -274,7 +274,7 @@ int PipelineHandlerVimc::allocateBuffers(Camera *camera,\n> >  }\n> >  \n> >  int PipelineHandlerVimc::freeBuffers(Camera *camera,\n> > -\t\t\t\t     const std::set<Stream *> &streams)\n> > +\t\t\t\t     const std::set<Stream *> & /*streams*/)\n> >  {\n> >  \tVimcCameraData *data = cameraData(camera);\n> >  \treturn data->video_->releaseBuffers();\n> > diff --git a/src/libcamera/process.cpp b/src/libcamera/process.cpp\n> > index 3b4d0f10da67..44ebfec178fe 100644\n> > --- a/src/libcamera/process.cpp\n> > +++ b/src/libcamera/process.cpp\n> > @@ -89,7 +89,7 @@ void sigact(int signal, siginfo_t *info, void *ucontext)\n> >  \n> >  } /* namespace */\n> >  \n> > -void ProcessManager::sighandler(EventNotifier *notifier)\n> > +void ProcessManager::sighandler(EventNotifier * /*notifier*/)\n> >  {\n> >  \tchar data;\n> >  \tssize_t ret = read(pipe_[0], &data, sizeof(data));\n> > diff --git a/src/libcamera/proxy/ipa_proxy_linux.cpp b/src/libcamera/proxy/ipa_proxy_linux.cpp\n> > index 4e6fa6899e07..d4ccf5112cd7 100644\n> > --- a/src/libcamera/proxy/ipa_proxy_linux.cpp\n> > +++ b/src/libcamera/proxy/ipa_proxy_linux.cpp\n> > @@ -27,11 +27,11 @@ public:\n> >  \t~IPAProxyLinux();\n> >  \n> >  \tint init() override { return 0; }\n> > -\tvoid configure(const std::map<unsigned int, IPAStream> &streamConfig,\n> > -\t\t       const std::map<unsigned int, ControlInfoMap> &entityControls) override {}\n> > -\tvoid mapBuffers(const std::vector<IPABuffer> &buffers) override {}\n> > -\tvoid unmapBuffers(const std::vector<unsigned int> &ids) override {}\n> > -\tvoid processEvent(const IPAOperationData &event) override {}\n> > +\tvoid configure(const std::map<unsigned int, IPAStream> & /*streamConfig*/,\n> > +\t\t       const std::map<unsigned int, ControlInfoMap> & /*entityControls*/) override {}\n> > +\tvoid mapBuffers(const std::vector<IPABuffer> & /*buffers*/) override {}\n> > +\tvoid unmapBuffers(const std::vector<unsigned int> & /*ids*/) override {}\n> > +\tvoid processEvent(const IPAOperationData & /*event*/) override {}\n> >  \n> >  private:\n> >  \tvoid readyRead(IPCUnixSocket *ipc);\n> > @@ -86,7 +86,7 @@ IPAProxyLinux::~IPAProxyLinux()\n> >  \tdelete socket_;\n> >  }\n> >  \n> > -void IPAProxyLinux::readyRead(IPCUnixSocket *ipc)\n> > +void IPAProxyLinux::readyRead(IPCUnixSocket * /*ipc*/)\n> >  {\n> >  }\n> >  \n> > diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp\n> > index 208ab54199b1..87d810d7cfa4 100644\n> > --- a/src/libcamera/v4l2_videodevice.cpp\n> > +++ b/src/libcamera/v4l2_videodevice.cpp\n> > @@ -1141,7 +1141,7 @@ Buffer *V4L2VideoDevice::dequeueBuffer()\n> >   * For Capture video devices the Buffer will contain valid data.\n> >   * For Output video devices the Buffer can be considered empty.\n> >   */\n> > -void V4L2VideoDevice::bufferAvailable(EventNotifier *notifier)\n> > +void V4L2VideoDevice::bufferAvailable(EventNotifier * /*notifier*/)\n> >  {\n> >  \tBuffer *buffer = dequeueBuffer();\n> >  \tif (!buffer)\n> > diff --git a/src/qcam/main.cpp b/src/qcam/main.cpp\n> > index a7ff5c52663b..d8cfc1c3d76b 100644\n> > --- a/src/qcam/main.cpp\n> > +++ b/src/qcam/main.cpp\n> > @@ -17,7 +17,7 @@\n> >  #include \"../cam/options.h\"\n> >  #include \"qt_event_dispatcher.h\"\n> >  \n> > -void signalHandler(int signal)\n> > +void signalHandler(int /*signal*/)\n> >  {\n> >  \tstd::cout << \"Exiting\" << std::endl;\n> >  \tqApp->quit();\n> > diff --git a/test/camera/capture.cpp b/test/camera/capture.cpp\n> > index 791ccad15f70..a5fd0a641705 100644\n> > --- a/test/camera/capture.cpp\n> > +++ b/test/camera/capture.cpp\n> > @@ -19,7 +19,7 @@ protected:\n> >  \tunsigned int completeBuffersCount_;\n> >  \tunsigned int completeRequestsCount_;\n> >  \n> > -\tvoid bufferComplete(Request *request, Buffer *buffer)\n> > +\tvoid bufferComplete(Request * /*request*/, Buffer *buffer)\n> >  \t{\n> >  \t\tif (buffer->status() != Buffer::BufferSuccess)\n> >  \t\t\treturn;\n> > diff --git a/test/libtest/test.h b/test/libtest/test.h\n> > index ec08bf97c03d..193d7aa99f38 100644\n> > --- a/test/libtest/test.h\n> > +++ b/test/libtest/test.h\n> > @@ -26,11 +26,11 @@ public:\n> >  protected:\n> >  \tvirtual int init() { return 0; }\n> >  \tvirtual int run() = 0;\n> > -\tvirtual void cleanup() { }\n> > +\tvirtual void cleanup() {}\n> >  };\n> >  \n> >  #define TEST_REGISTER(klass)\t\t\t\t\t\t\\\n> > -int main(int argc, char *argv[])\t\t\t\t\t\\\n> > +int main(int /*argc*/, char * /*argv*/[])\t\t\t\t\\\n> >  {\t\t\t\t\t\t\t\t\t\\\n> >  \treturn klass().execute();\t\t\t\t\t\\\n> >  }\n> > diff --git a/test/log/log_process.cpp b/test/log/log_process.cpp\n> > index 2df4aa43713c..fa5639dde7cb 100644\n> > --- a/test/log/log_process.cpp\n> > +++ b/test/log/log_process.cpp\n> > @@ -123,7 +123,8 @@ protected:\n> >  \t}\n> >  \n> >  private:\n> > -\tvoid procFinished(Process *proc, enum Process::ExitStatus exitStatus, int exitCode)\n> > +\tvoid procFinished(Process * /*proc*/,\n> > +\t\t\t  enum Process::ExitStatus exitStatus, int exitCode)\n> >  \t{\n> >  \t\texitStatus_ = exitStatus;\n> >  \t\texitCode_ = exitCode;\n> > diff --git a/test/message.cpp b/test/message.cpp\n> > index 3775c30a20b3..3e2659c836e3 100644\n> > --- a/test/message.cpp\n> > +++ b/test/message.cpp\n> > @@ -35,7 +35,7 @@ public:\n> >  \tvoid reset() { status_ = NoMessage; }\n> >  \n> >  protected:\n> > -\tvoid message(Message *msg)\n> > +\tvoid message(Message * /*msg*/)\n> >  \t{\n> >  \t\tif (thread() != Thread::current())\n> >  \t\t\tstatus_ = InvalidThread;\n> > diff --git a/test/process/process_test.cpp b/test/process/process_test.cpp\n> > index 7e7b3c2c8bf3..2ba3efd08457 100644\n> > --- a/test/process/process_test.cpp\n> > +++ b/test/process/process_test.cpp\n> > @@ -75,7 +75,8 @@ protected:\n> >  \t}\n> >  \n> >  private:\n> > -\tvoid procFinished(Process *proc, enum Process::ExitStatus exitStatus, int exitCode)\n> > +\tvoid procFinished(Process * /*proc*/,\n> > +\t\t\t  enum Process::ExitStatus exitStatus, int exitCode)\n> >  \t{\n> >  \t\texitStatus_ = exitStatus;\n> >  \t\texitCode_ = exitCode;\n> > diff --git a/test/timer-thread.cpp b/test/timer-thread.cpp\n> > index 32853b4e80ef..55b7abcbbeab 100644\n> > --- a/test/timer-thread.cpp\n> > +++ b/test/timer-thread.cpp\n> > @@ -39,7 +39,7 @@ public:\n> >  \t}\n> >  \n> >  private:\n> > -\tvoid timeoutHandler(Timer *timer)\n> > +\tvoid timeoutHandler(Timer * /*timer*/)\n> >  \t{\n> >  \t\ttimeout_ = true;\n> >  \t}\n> > diff --git a/test/timer.cpp b/test/timer.cpp\n> > index 2bdb006edccb..03df03aa8d69 100644\n> > --- a/test/timer.cpp\n> > +++ b/test/timer.cpp\n> > @@ -56,7 +56,7 @@ public:\n> >  \t}\n> >  \n> >  private:\n> > -\tvoid timeoutHandler(Timer *timer)\n> > +\tvoid timeoutHandler(Timer * /*timer*/)\n> >  \t{\n> >  \t\texpiration_ = std::chrono::steady_clock::now();\n> >  \t\tcount_++;\n> >","headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id EFC0D6017E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 28 Oct 2019 11:35:52 +0100 (CET)","from pendragon.ideasonboard.com (unknown [91.217.168.176])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 5EFBB325;\n\tMon, 28 Oct 2019 11:35:52 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1572258952;\n\tbh=pOh3XGNhG8LHGT1L40nysyGh+1t+D8SGa/aSjONjk1U=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=M8cv2Pzfkcz3Zf6XPBQzFC7/Fr98Xrecyzp5AGqeRL2HaJKkB7LLCkHmLZUOPIq2Y\n\ts03Am7mLYpALwc0D/5JycviXzrMupgGwIr3Qra6P07dXtfoNjvlV2qumJcdynHK8FX\n\t1Cbh1ytbTBafhwX6sdRRf7CpaxZhcnAENby0J97c=","Date":"Mon, 28 Oct 2019 12:35:44 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20191028103544.GA14017@pendragon.ideasonboard.com>","References":"<20191026213835.15110-1-laurent.pinchart@ideasonboard.com>\n\t<34810c55-0226-253c-56ff-9a756ee5f997@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<34810c55-0226-253c-56ff-9a756ee5f997@ideasonboard.com>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH/RFC] meson: Remove\n\t-Wno-unused-parameter","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Mon, 28 Oct 2019 10:35:53 -0000"}},{"id":3004,"web_url":"https://patchwork.libcamera.org/comment/3004/","msgid":"<20191108194227.GA1058@pendragon.ideasonboard.com>","date":"2019-11-08T19:42:27","subject":"Re: [libcamera-devel] [PATCH/RFC] meson: Remove\n\t-Wno-unused-parameter","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hello everybody,\n\nOn Mon, Oct 28, 2019 at 12:35:44PM +0200, Laurent Pinchart wrote:\n> On Mon, Oct 28, 2019 at 09:32:14AM +0000, Kieran Bingham wrote:\n> > On 26/10/2019 22:38, Laurent Pinchart wrote:\n> > > We build libcamera with -Wno-unused-parameter and this doesn't cause\n> > > much issue internally. However, it prevents catching unused parameters\n> > > in inline functions defined in public headers. This can lead to\n> > > compilation warnings for applications compiled without\n> > > -Wno-unused-parameter.\n> > > \n> > > To catch those issues, remove -Wno-unused-parameter and fix all the\n> > > related warnings.\n> > \n> > What's your opinion on defining an unused(variable) (named otherwise if\n> > required) macro so that we can declare unused variables in the code\n> > base, and keep the function prototypes clean?\n> > \n> > i.e.\n> > \n> > #define unused(_x) (void)(_x)\n> > \n> >  ControlValue ControlValue::load(ByteStreamBuffer &b, ControlType type,\n> >                                 unsigned int count)\n> >  {\n> > +       unused(count);\n> > +\n> >         switch (type) {\n> >         case ControlTypeBool: {\n> >                 bool value;\n> >   ...\n> >  }\n> > \n> > I think something like that would allow cleaner function declarations,\n> > that do not need to be modified once someone actually uses the variable\n> > in question. Simply remove the 'unused' declaration ?\n> \n> I'm afraid I don't like that :-) First of all, compilers may not always\n> be fooled by that particular implementation, and we'll play a game of\n> whack-a-mole as new compiler versions are released. Then, removing the\n> variable name is specified by the C++ standard as the official way to\n> note that a variable is unused. I don't think we should use a different,\n> non-standard implementation.\n> \n> This patch stems from a warning generated when compiling a small test\n> code against libcamera out of the libcamera source tree, without\n> -Wno-unused-parameter. It turns out we had a single issue in public\n> headers, so we will likely not introduce other such issues in the\n> headers very often. We could thus decide not to care about it and catch\n> the issues when they are reported. I however think there's value in\n> dropping the compiler option though (otherwise I wouldn't have sent this\n> patch in the first place :-)).\n\nPing ? I'd like to reach a consensus on this and decide if we should\ndrop the patch (and thus live with the small but real risk that\napplications that use -Wunused-parameters would get a build warning) or\nkeep it, in this form or another.\n\n> > > Fix an additional checkstyle.py error while at it.\n> > > \n> > > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > > ---\n> > >  meson.build                                |  1 -\n> > >  src/android/camera3_hal.cpp                |  9 +++++----\n> > >  src/android/camera_device.cpp              |  4 ++--\n> > >  src/android/camera_proxy.cpp               |  4 ++--\n> > >  src/cam/main.cpp                           |  2 +-\n> > >  src/ipa/ipa_vimc.cpp                       | 10 +++++-----\n> > >  src/ipa/rkisp1/rkisp1.cpp                  |  2 +-\n> > >  src/libcamera/device_enumerator_udev.cpp   |  2 +-\n> > >  src/libcamera/ipc_unixsocket.cpp           |  2 +-\n> > >  src/libcamera/pipeline/ipu3/ipu3.cpp       |  2 +-\n> > >  src/libcamera/pipeline/rkisp1/rkisp1.cpp   |  2 +-\n> > >  src/libcamera/pipeline/rkisp1/timeline.cpp |  2 +-\n> > >  src/libcamera/pipeline/uvcvideo.cpp        |  2 +-\n> > >  src/libcamera/pipeline/vimc.cpp            |  4 ++--\n> > >  src/libcamera/process.cpp                  |  2 +-\n> > >  src/libcamera/proxy/ipa_proxy_linux.cpp    | 12 ++++++------\n> > >  src/libcamera/v4l2_videodevice.cpp         |  2 +-\n> > >  src/qcam/main.cpp                          |  2 +-\n> > >  test/camera/capture.cpp                    |  2 +-\n> > >  test/libtest/test.h                        |  4 ++--\n> > >  test/log/log_process.cpp                   |  3 ++-\n> > >  test/message.cpp                           |  2 +-\n> > >  test/process/process_test.cpp              |  3 ++-\n> > >  test/timer-thread.cpp                      |  2 +-\n> > >  test/timer.cpp                             |  2 +-\n> > >  25 files changed, 43 insertions(+), 41 deletions(-)\n> > > \n> > > diff --git a/meson.build b/meson.build\n> > > index 72ad7c8b493b..19a921a8ba6a 100644\n> > > --- a/meson.build\n> > > +++ b/meson.build\n> > > @@ -31,7 +31,6 @@ if cc.has_header_symbol('stdlib.h', 'secure_getenv', prefix : '#define _GNU_SOUR\n> > >  endif\n> > >  \n> > >  common_arguments = [\n> > > -    '-Wno-unused-parameter',\n> > >      '-include', 'config.h',\n> > >  ]\n> > >  \n> > > diff --git a/src/android/camera3_hal.cpp b/src/android/camera3_hal.cpp\n> > > index 8d2629ca356c..a7f470172583 100644\n> > > --- a/src/android/camera3_hal.cpp\n> > > +++ b/src/android/camera3_hal.cpp\n> > > @@ -31,18 +31,19 @@ static int hal_get_camera_info(int id, struct camera_info *info)\n> > >  \treturn cameraManager.getCameraInfo(id, info);\n> > >  }\n> > >  \n> > > -static int hal_set_callbacks(const camera_module_callbacks_t *callbacks)\n> > > +static int hal_set_callbacks(const camera_module_callbacks_t * /*callbacks*/)\n> > >  {\n> > >  \treturn 0;\n> > >  }\n> > >  \n> > > -static int hal_open_legacy(const struct hw_module_t *module, const char *id,\n> > > -\t\t\t   uint32_t halVersion, struct hw_device_t **device)\n> > > +static int hal_open_legacy(const struct hw_module_t * /*module*/,\n> > > +\t\t\t   const char * /*id*/, uint32_t /*halVersion*/,\n> > > +\t\t\t   struct hw_device_t ** /*device*/)\n> > >  {\n> > >  \treturn -ENOSYS;\n> > >  }\n> > >  \n> > > -static int hal_set_torch_mode(const char *camera_id, bool enabled)\n> > > +static int hal_set_torch_mode(const char * /*camera_id*/, bool /*enabled*/)\n> > >  {\n> > >  \treturn -ENOSYS;\n> > >  }\n> > > diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\n> > > index c7c9b3fd1724..b0ba1cf0a921 100644\n> > > --- a/src/android/camera_device.cpp\n> > > +++ b/src/android/camera_device.cpp\n> > > @@ -49,7 +49,7 @@ CameraDevice::Camera3RequestDescriptor::~Camera3RequestDescriptor()\n> > >   * to the framework using the designated callbacks.\n> > >   */\n> > >  \n> > > -CameraDevice::CameraDevice(unsigned int id, const std::shared_ptr<Camera> &camera)\n> > > +CameraDevice::CameraDevice(unsigned int /*id*/, const std::shared_ptr<Camera> &camera)\n> > >  \t: running_(false), camera_(camera), staticMetadata_(nullptr)\n> > >  {\n> > >  \tcamera_->requestCompleted.connect(this, &CameraDevice::requestComplete);\n> > > @@ -875,7 +875,7 @@ void CameraDevice::notifyError(uint32_t frameNumber, camera3_stream_t *stream)\n> > >  /*\n> > >   * Produce a set of fixed result metadata.\n> > >   */\n> > > -std::unique_ptr<CameraMetadata> CameraDevice::getResultMetadata(int frame_number,\n> > > +std::unique_ptr<CameraMetadata> CameraDevice::getResultMetadata(int /*frame_number*/,\n> > >  \t\t\t\t\t\t\t\tint64_t timestamp)\n> > >  {\n> > >  \t/*\n> > > diff --git a/src/android/camera_proxy.cpp b/src/android/camera_proxy.cpp\n> > > index 4f5c0a024903..c9f98c784eec 100644\n> > > --- a/src/android/camera_proxy.cpp\n> > > +++ b/src/android/camera_proxy.cpp\n> > > @@ -79,11 +79,11 @@ static int hal_dev_process_capture_request(const struct camera3_device *dev,\n> > >  \treturn proxy->processCaptureRequest(request);\n> > >  }\n> > >  \n> > > -static void hal_dev_dump(const struct camera3_device *dev, int fd)\n> > > +static void hal_dev_dump(const struct camera3_device * /*dev*/, int /*fd*/)\n> > >  {\n> > >  }\n> > >  \n> > > -static int hal_dev_flush(const struct camera3_device *dev)\n> > > +static int hal_dev_flush(const struct camera3_device * /*dev*/)\n> > >  {\n> > >  \treturn 0;\n> > >  }\n> > > diff --git a/src/cam/main.cpp b/src/cam/main.cpp\n> > > index 9d99f5587cbb..ceb0efeff045 100644\n> > > --- a/src/cam/main.cpp\n> > > +++ b/src/cam/main.cpp\n> > > @@ -326,7 +326,7 @@ int CamApp::run()\n> > >  \treturn 0;\n> > >  }\n> > >  \n> > > -void signalHandler(int signal)\n> > > +void signalHandler(int /*signal*/)\n> > >  {\n> > >  \tstd::cout << \"Exiting\" << std::endl;\n> > >  \tCamApp::instance()->quit();\n> > > diff --git a/src/ipa/ipa_vimc.cpp b/src/ipa/ipa_vimc.cpp\n> > > index 63d578b4e2aa..16c7e0732d40 100644\n> > > --- a/src/ipa/ipa_vimc.cpp\n> > > +++ b/src/ipa/ipa_vimc.cpp\n> > > @@ -30,11 +30,11 @@ public:\n> > >  \t~IPAVimc();\n> > >  \n> > >  \tint init() override;\n> > > -\tvoid configure(const std::map<unsigned int, IPAStream> &streamConfig,\n> > > -\t\t       const std::map<unsigned int, ControlInfoMap> &entityControls) override {}\n> > > -\tvoid mapBuffers(const std::vector<IPABuffer> &buffers) override {}\n> > > -\tvoid unmapBuffers(const std::vector<unsigned int> &ids) override {}\n> > > -\tvoid processEvent(const IPAOperationData &event) override {}\n> > > +\tvoid configure(const std::map<unsigned int, IPAStream> & /*streamConfig*/,\n> > > +\t\t       const std::map<unsigned int, ControlInfoMap> & /*entityControls*/) override {}\n> > > +\tvoid mapBuffers(const std::vector<IPABuffer> & /*buffers*/) override {}\n> > > +\tvoid unmapBuffers(const std::vector<unsigned int> & /*ids*/) override {}\n> > > +\tvoid processEvent(const IPAOperationData & /*event*/) override {}\n> > >  \n> > >  private:\n> > >  \tvoid initTrace();\n> > > diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp\n> > > index 9a13f5c7df17..84f270791340 100644\n> > > --- a/src/ipa/rkisp1/rkisp1.cpp\n> > > +++ b/src/ipa/rkisp1/rkisp1.cpp\n> > > @@ -61,7 +61,7 @@ private:\n> > >  \tuint32_t maxGain_;\n> > >  };\n> > >  \n> > > -void IPARkISP1::configure(const std::map<unsigned int, IPAStream> &streamConfig,\n> > > +void IPARkISP1::configure(const std::map<unsigned int, IPAStream> & /*streamConfig*/,\n> > >  \t\t\t  const std::map<unsigned int, ControlInfoMap> &entityControls)\n> > >  {\n> > >  \tif (entityControls.empty())\n> > > diff --git a/src/libcamera/device_enumerator_udev.cpp b/src/libcamera/device_enumerator_udev.cpp\n> > > index b2c5fd221dcd..6e0fbbd8c70c 100644\n> > > --- a/src/libcamera/device_enumerator_udev.cpp\n> > > +++ b/src/libcamera/device_enumerator_udev.cpp\n> > > @@ -309,7 +309,7 @@ int DeviceEnumeratorUdev::addV4L2Device(dev_t devnum)\n> > >  \treturn 0;\n> > >  }\n> > >  \n> > > -void DeviceEnumeratorUdev::udevNotify(EventNotifier *notifier)\n> > > +void DeviceEnumeratorUdev::udevNotify(EventNotifier * /*notifier*/)\n> > >  {\n> > >  \tstruct udev_device *dev = udev_monitor_receive_device(monitor_);\n> > >  \tstd::string action(udev_device_get_action(dev));\n> > > diff --git a/src/libcamera/ipc_unixsocket.cpp b/src/libcamera/ipc_unixsocket.cpp\n> > > index def08eef00f8..eb594268dd6c 100644\n> > > --- a/src/libcamera/ipc_unixsocket.cpp\n> > > +++ b/src/libcamera/ipc_unixsocket.cpp\n> > > @@ -306,7 +306,7 @@ int IPCUnixSocket::recvData(void *buffer, size_t length,\n> > >  \treturn 0;\n> > >  }\n> > >  \n> > > -void IPCUnixSocket::dataNotifier(EventNotifier *notifier)\n> > > +void IPCUnixSocket::dataNotifier(EventNotifier * /*notifier*/)\n> > >  {\n> > >  \tint ret;\n> > >  \n> > > diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> > > index 8d3ad568d16e..84356646b736 100644\n> > > --- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n> > > +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> > > @@ -700,7 +700,7 @@ error:\n> > >  }\n> > >  \n> > >  int PipelineHandlerIPU3::freeBuffers(Camera *camera,\n> > > -\t\t\t\t     const std::set<Stream *> &streams)\n> > > +\t\t\t\t     const std::set<Stream *> & /*streams*/)\n> > >  {\n> > >  \tIPU3CameraData *data = cameraData(camera);\n> > >  \n> > > diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> > > index 7a28b03b8d38..aed060bada70 100644\n> > > --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> > > +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> > > @@ -703,7 +703,7 @@ int PipelineHandlerRkISP1::allocateBuffers(Camera *camera,\n> > >  }\n> > >  \n> > >  int PipelineHandlerRkISP1::freeBuffers(Camera *camera,\n> > > -\t\t\t\t       const std::set<Stream *> &streams)\n> > > +\t\t\t\t       const std::set<Stream *> & /*streams*/)\n> > >  {\n> > >  \tRkISP1CameraData *data = cameraData(camera);\n> > >  \n> > > diff --git a/src/libcamera/pipeline/rkisp1/timeline.cpp b/src/libcamera/pipeline/rkisp1/timeline.cpp\n> > > index f6c6434d7b53..59e6de78c79d 100644\n> > > --- a/src/libcamera/pipeline/rkisp1/timeline.cpp\n> > > +++ b/src/libcamera/pipeline/rkisp1/timeline.cpp\n> > > @@ -204,7 +204,7 @@ void Timeline::updateDeadline()\n> > >  \ttimer_.start(deadline);\n> > >  }\n> > >  \n> > > -void Timeline::timeout(Timer *timer)\n> > > +void Timeline::timeout(Timer * /*timer*/)\n> > >  {\n> > >  \tutils::time_point now = std::chrono::steady_clock::now();\n> > >  \n> > > diff --git a/src/libcamera/pipeline/uvcvideo.cpp b/src/libcamera/pipeline/uvcvideo.cpp\n> > > index fae0ffc4de30..94464c7c7f0c 100644\n> > > --- a/src/libcamera/pipeline/uvcvideo.cpp\n> > > +++ b/src/libcamera/pipeline/uvcvideo.cpp\n> > > @@ -208,7 +208,7 @@ int PipelineHandlerUVC::allocateBuffers(Camera *camera,\n> > >  }\n> > >  \n> > >  int PipelineHandlerUVC::freeBuffers(Camera *camera,\n> > > -\t\t\t\t    const std::set<Stream *> &streams)\n> > > +\t\t\t\t    const std::set<Stream *> & /*streams*/)\n> > >  {\n> > >  \tUVCCameraData *data = cameraData(camera);\n> > >  \treturn data->video_->releaseBuffers();\n> > > diff --git a/src/libcamera/pipeline/vimc.cpp b/src/libcamera/pipeline/vimc.cpp\n> > > index c16ae4cb76b5..7e325469f178 100644\n> > > --- a/src/libcamera/pipeline/vimc.cpp\n> > > +++ b/src/libcamera/pipeline/vimc.cpp\n> > > @@ -166,7 +166,7 @@ PipelineHandlerVimc::PipelineHandlerVimc(CameraManager *manager)\n> > >  {\n> > >  }\n> > >  \n> > > -CameraConfiguration *PipelineHandlerVimc::generateConfiguration(Camera *camera,\n> > > +CameraConfiguration *PipelineHandlerVimc::generateConfiguration(Camera * /*camera*/,\n> > >  \tconst StreamRoles &roles)\n> > >  {\n> > >  \tCameraConfiguration *config = new VimcCameraConfiguration();\n> > > @@ -274,7 +274,7 @@ int PipelineHandlerVimc::allocateBuffers(Camera *camera,\n> > >  }\n> > >  \n> > >  int PipelineHandlerVimc::freeBuffers(Camera *camera,\n> > > -\t\t\t\t     const std::set<Stream *> &streams)\n> > > +\t\t\t\t     const std::set<Stream *> & /*streams*/)\n> > >  {\n> > >  \tVimcCameraData *data = cameraData(camera);\n> > >  \treturn data->video_->releaseBuffers();\n> > > diff --git a/src/libcamera/process.cpp b/src/libcamera/process.cpp\n> > > index 3b4d0f10da67..44ebfec178fe 100644\n> > > --- a/src/libcamera/process.cpp\n> > > +++ b/src/libcamera/process.cpp\n> > > @@ -89,7 +89,7 @@ void sigact(int signal, siginfo_t *info, void *ucontext)\n> > >  \n> > >  } /* namespace */\n> > >  \n> > > -void ProcessManager::sighandler(EventNotifier *notifier)\n> > > +void ProcessManager::sighandler(EventNotifier * /*notifier*/)\n> > >  {\n> > >  \tchar data;\n> > >  \tssize_t ret = read(pipe_[0], &data, sizeof(data));\n> > > diff --git a/src/libcamera/proxy/ipa_proxy_linux.cpp b/src/libcamera/proxy/ipa_proxy_linux.cpp\n> > > index 4e6fa6899e07..d4ccf5112cd7 100644\n> > > --- a/src/libcamera/proxy/ipa_proxy_linux.cpp\n> > > +++ b/src/libcamera/proxy/ipa_proxy_linux.cpp\n> > > @@ -27,11 +27,11 @@ public:\n> > >  \t~IPAProxyLinux();\n> > >  \n> > >  \tint init() override { return 0; }\n> > > -\tvoid configure(const std::map<unsigned int, IPAStream> &streamConfig,\n> > > -\t\t       const std::map<unsigned int, ControlInfoMap> &entityControls) override {}\n> > > -\tvoid mapBuffers(const std::vector<IPABuffer> &buffers) override {}\n> > > -\tvoid unmapBuffers(const std::vector<unsigned int> &ids) override {}\n> > > -\tvoid processEvent(const IPAOperationData &event) override {}\n> > > +\tvoid configure(const std::map<unsigned int, IPAStream> & /*streamConfig*/,\n> > > +\t\t       const std::map<unsigned int, ControlInfoMap> & /*entityControls*/) override {}\n> > > +\tvoid mapBuffers(const std::vector<IPABuffer> & /*buffers*/) override {}\n> > > +\tvoid unmapBuffers(const std::vector<unsigned int> & /*ids*/) override {}\n> > > +\tvoid processEvent(const IPAOperationData & /*event*/) override {}\n> > >  \n> > >  private:\n> > >  \tvoid readyRead(IPCUnixSocket *ipc);\n> > > @@ -86,7 +86,7 @@ IPAProxyLinux::~IPAProxyLinux()\n> > >  \tdelete socket_;\n> > >  }\n> > >  \n> > > -void IPAProxyLinux::readyRead(IPCUnixSocket *ipc)\n> > > +void IPAProxyLinux::readyRead(IPCUnixSocket * /*ipc*/)\n> > >  {\n> > >  }\n> > >  \n> > > diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp\n> > > index 208ab54199b1..87d810d7cfa4 100644\n> > > --- a/src/libcamera/v4l2_videodevice.cpp\n> > > +++ b/src/libcamera/v4l2_videodevice.cpp\n> > > @@ -1141,7 +1141,7 @@ Buffer *V4L2VideoDevice::dequeueBuffer()\n> > >   * For Capture video devices the Buffer will contain valid data.\n> > >   * For Output video devices the Buffer can be considered empty.\n> > >   */\n> > > -void V4L2VideoDevice::bufferAvailable(EventNotifier *notifier)\n> > > +void V4L2VideoDevice::bufferAvailable(EventNotifier * /*notifier*/)\n> > >  {\n> > >  \tBuffer *buffer = dequeueBuffer();\n> > >  \tif (!buffer)\n> > > diff --git a/src/qcam/main.cpp b/src/qcam/main.cpp\n> > > index a7ff5c52663b..d8cfc1c3d76b 100644\n> > > --- a/src/qcam/main.cpp\n> > > +++ b/src/qcam/main.cpp\n> > > @@ -17,7 +17,7 @@\n> > >  #include \"../cam/options.h\"\n> > >  #include \"qt_event_dispatcher.h\"\n> > >  \n> > > -void signalHandler(int signal)\n> > > +void signalHandler(int /*signal*/)\n> > >  {\n> > >  \tstd::cout << \"Exiting\" << std::endl;\n> > >  \tqApp->quit();\n> > > diff --git a/test/camera/capture.cpp b/test/camera/capture.cpp\n> > > index 791ccad15f70..a5fd0a641705 100644\n> > > --- a/test/camera/capture.cpp\n> > > +++ b/test/camera/capture.cpp\n> > > @@ -19,7 +19,7 @@ protected:\n> > >  \tunsigned int completeBuffersCount_;\n> > >  \tunsigned int completeRequestsCount_;\n> > >  \n> > > -\tvoid bufferComplete(Request *request, Buffer *buffer)\n> > > +\tvoid bufferComplete(Request * /*request*/, Buffer *buffer)\n> > >  \t{\n> > >  \t\tif (buffer->status() != Buffer::BufferSuccess)\n> > >  \t\t\treturn;\n> > > diff --git a/test/libtest/test.h b/test/libtest/test.h\n> > > index ec08bf97c03d..193d7aa99f38 100644\n> > > --- a/test/libtest/test.h\n> > > +++ b/test/libtest/test.h\n> > > @@ -26,11 +26,11 @@ public:\n> > >  protected:\n> > >  \tvirtual int init() { return 0; }\n> > >  \tvirtual int run() = 0;\n> > > -\tvirtual void cleanup() { }\n> > > +\tvirtual void cleanup() {}\n> > >  };\n> > >  \n> > >  #define TEST_REGISTER(klass)\t\t\t\t\t\t\\\n> > > -int main(int argc, char *argv[])\t\t\t\t\t\\\n> > > +int main(int /*argc*/, char * /*argv*/[])\t\t\t\t\\\n> > >  {\t\t\t\t\t\t\t\t\t\\\n> > >  \treturn klass().execute();\t\t\t\t\t\\\n> > >  }\n> > > diff --git a/test/log/log_process.cpp b/test/log/log_process.cpp\n> > > index 2df4aa43713c..fa5639dde7cb 100644\n> > > --- a/test/log/log_process.cpp\n> > > +++ b/test/log/log_process.cpp\n> > > @@ -123,7 +123,8 @@ protected:\n> > >  \t}\n> > >  \n> > >  private:\n> > > -\tvoid procFinished(Process *proc, enum Process::ExitStatus exitStatus, int exitCode)\n> > > +\tvoid procFinished(Process * /*proc*/,\n> > > +\t\t\t  enum Process::ExitStatus exitStatus, int exitCode)\n> > >  \t{\n> > >  \t\texitStatus_ = exitStatus;\n> > >  \t\texitCode_ = exitCode;\n> > > diff --git a/test/message.cpp b/test/message.cpp\n> > > index 3775c30a20b3..3e2659c836e3 100644\n> > > --- a/test/message.cpp\n> > > +++ b/test/message.cpp\n> > > @@ -35,7 +35,7 @@ public:\n> > >  \tvoid reset() { status_ = NoMessage; }\n> > >  \n> > >  protected:\n> > > -\tvoid message(Message *msg)\n> > > +\tvoid message(Message * /*msg*/)\n> > >  \t{\n> > >  \t\tif (thread() != Thread::current())\n> > >  \t\t\tstatus_ = InvalidThread;\n> > > diff --git a/test/process/process_test.cpp b/test/process/process_test.cpp\n> > > index 7e7b3c2c8bf3..2ba3efd08457 100644\n> > > --- a/test/process/process_test.cpp\n> > > +++ b/test/process/process_test.cpp\n> > > @@ -75,7 +75,8 @@ protected:\n> > >  \t}\n> > >  \n> > >  private:\n> > > -\tvoid procFinished(Process *proc, enum Process::ExitStatus exitStatus, int exitCode)\n> > > +\tvoid procFinished(Process * /*proc*/,\n> > > +\t\t\t  enum Process::ExitStatus exitStatus, int exitCode)\n> > >  \t{\n> > >  \t\texitStatus_ = exitStatus;\n> > >  \t\texitCode_ = exitCode;\n> > > diff --git a/test/timer-thread.cpp b/test/timer-thread.cpp\n> > > index 32853b4e80ef..55b7abcbbeab 100644\n> > > --- a/test/timer-thread.cpp\n> > > +++ b/test/timer-thread.cpp\n> > > @@ -39,7 +39,7 @@ public:\n> > >  \t}\n> > >  \n> > >  private:\n> > > -\tvoid timeoutHandler(Timer *timer)\n> > > +\tvoid timeoutHandler(Timer * /*timer*/)\n> > >  \t{\n> > >  \t\ttimeout_ = true;\n> > >  \t}\n> > > diff --git a/test/timer.cpp b/test/timer.cpp\n> > > index 2bdb006edccb..03df03aa8d69 100644\n> > > --- a/test/timer.cpp\n> > > +++ b/test/timer.cpp\n> > > @@ -56,7 +56,7 @@ public:\n> > >  \t}\n> > >  \n> > >  private:\n> > > -\tvoid timeoutHandler(Timer *timer)\n> > > +\tvoid timeoutHandler(Timer * /*timer*/)\n> > >  \t{\n> > >  \t\texpiration_ = std::chrono::steady_clock::now();\n> > >  \t\tcount_++;\n> > >","headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8E39E60180\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  8 Nov 2019 20:42:37 +0100 (CET)","from pendragon.ideasonboard.com (81-175-216-236.bb.dnainternet.fi\n\t[81.175.216.236])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 85E832D1;\n\tFri,  8 Nov 2019 20:42:36 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1573242156;\n\tbh=oz/W4LVabdDnjl1mtBS82LeN4B0gRbtD4lKyXzylmi0=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=UtyWvR8dEA7F3lEMJVA1bsQJhfNNGFx2POzVbqC27N9IgqKHbyUTcbn11jZL5NkpM\n\tQPtmqiNi03V0jT83MIVA8C5fdQsQ/6zcbQz9qdEwhaEG8/pCaKUZrz7IEQmvrwUAST\n\tI502QVubV/QZAJGckUydcd9HGQB3nk38lvJcBHp8=","Date":"Fri, 8 Nov 2019 21:42:27 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20191108194227.GA1058@pendragon.ideasonboard.com>","References":"<20191026213835.15110-1-laurent.pinchart@ideasonboard.com>\n\t<34810c55-0226-253c-56ff-9a756ee5f997@ideasonboard.com>\n\t<20191028103544.GA14017@pendragon.ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20191028103544.GA14017@pendragon.ideasonboard.com>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH/RFC] meson: Remove\n\t-Wno-unused-parameter","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Fri, 08 Nov 2019 19:42:37 -0000"}},{"id":3005,"web_url":"https://patchwork.libcamera.org/comment/3005/","msgid":"<20191109103135.s326tbuehyx4mnng@uno.localdomain>","date":"2019-11-09T10:31:35","subject":"Re: [libcamera-devel] [PATCH/RFC] meson: Remove\n\t-Wno-unused-parameter","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Laurent,\n\nOn Fri, Nov 08, 2019 at 09:42:27PM +0200, Laurent Pinchart wrote:\n> Hello everybody,\n>\n> On Mon, Oct 28, 2019 at 12:35:44PM +0200, Laurent Pinchart wrote:\n> > On Mon, Oct 28, 2019 at 09:32:14AM +0000, Kieran Bingham wrote:\n> > > On 26/10/2019 22:38, Laurent Pinchart wrote:\n> > > > We build libcamera with -Wno-unused-parameter and this doesn't cause\n> > > > much issue internally. However, it prevents catching unused parameters\n> > > > in inline functions defined in public headers. This can lead to\n> > > > compilation warnings for applications compiled without\n> > > > -Wno-unused-parameter.\n> > > >\n> > > > To catch those issues, remove -Wno-unused-parameter and fix all the\n> > > > related warnings.\n> > >\n> > > What's your opinion on defining an unused(variable) (named otherwise if\n> > > required) macro so that we can declare unused variables in the code\n> > > base, and keep the function prototypes clean?\n> > >\n> > > i.e.\n> > >\n> > > #define unused(_x) (void)(_x)\n> > >\n> > >  ControlValue ControlValue::load(ByteStreamBuffer &b, ControlType type,\n> > >                                 unsigned int count)\n> > >  {\n> > > +       unused(count);\n> > > +\n> > >         switch (type) {\n> > >         case ControlTypeBool: {\n> > >                 bool value;\n> > >   ...\n> > >  }\n> > >\n> > > I think something like that would allow cleaner function declarations,\n> > > that do not need to be modified once someone actually uses the variable\n> > > in question. Simply remove the 'unused' declaration ?\n> >\n> > I'm afraid I don't like that :-) First of all, compilers may not always\n> > be fooled by that particular implementation, and we'll play a game of\n> > whack-a-mole as new compiler versions are released. Then, removing the\n> > variable name is specified by the C++ standard as the official way to\n> > note that a variable is unused. I don't think we should use a different,\n> > non-standard implementation.\n> >\n> > This patch stems from a warning generated when compiling a small test\n> > code against libcamera out of the libcamera source tree, without\n> > -Wno-unused-parameter. It turns out we had a single issue in public\n> > headers, so we will likely not introduce other such issues in the\n> > headers very often. We could thus decide not to care about it and catch\n> > the issues when they are reported. I however think there's value in\n> > dropping the compiler option though (otherwise I wouldn't have sent this\n> > patch in the first place :-)).\n>\n> Ping ? I'd like to reach a consensus on this and decide if we should\n> drop the patch (and thus live with the small but real risk that\n> applications that use -Wunused-parameters would get a build warning) or\n> keep it, in this form or another.\n>\n\nI think the priority here is to make sure applications do not get\nwarnings when building with -Wunused-parameters, so I'm finw with\neither removing the parameter's name completely from the function\ndefinition or commenting it out, which I like less but mostly because\nof how it looks, so I'm fine with both, as long as we make sure\napplications do not get warnings...\n\nThanks\n  j\n\n> > > > Fix an additional checkstyle.py error while at it.\n> > > >\n> > > > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > > > ---\n> > > >  meson.build                                |  1 -\n> > > >  src/android/camera3_hal.cpp                |  9 +++++----\n> > > >  src/android/camera_device.cpp              |  4 ++--\n> > > >  src/android/camera_proxy.cpp               |  4 ++--\n> > > >  src/cam/main.cpp                           |  2 +-\n> > > >  src/ipa/ipa_vimc.cpp                       | 10 +++++-----\n> > > >  src/ipa/rkisp1/rkisp1.cpp                  |  2 +-\n> > > >  src/libcamera/device_enumerator_udev.cpp   |  2 +-\n> > > >  src/libcamera/ipc_unixsocket.cpp           |  2 +-\n> > > >  src/libcamera/pipeline/ipu3/ipu3.cpp       |  2 +-\n> > > >  src/libcamera/pipeline/rkisp1/rkisp1.cpp   |  2 +-\n> > > >  src/libcamera/pipeline/rkisp1/timeline.cpp |  2 +-\n> > > >  src/libcamera/pipeline/uvcvideo.cpp        |  2 +-\n> > > >  src/libcamera/pipeline/vimc.cpp            |  4 ++--\n> > > >  src/libcamera/process.cpp                  |  2 +-\n> > > >  src/libcamera/proxy/ipa_proxy_linux.cpp    | 12 ++++++------\n> > > >  src/libcamera/v4l2_videodevice.cpp         |  2 +-\n> > > >  src/qcam/main.cpp                          |  2 +-\n> > > >  test/camera/capture.cpp                    |  2 +-\n> > > >  test/libtest/test.h                        |  4 ++--\n> > > >  test/log/log_process.cpp                   |  3 ++-\n> > > >  test/message.cpp                           |  2 +-\n> > > >  test/process/process_test.cpp              |  3 ++-\n> > > >  test/timer-thread.cpp                      |  2 +-\n> > > >  test/timer.cpp                             |  2 +-\n> > > >  25 files changed, 43 insertions(+), 41 deletions(-)\n> > > >\n> > > > diff --git a/meson.build b/meson.build\n> > > > index 72ad7c8b493b..19a921a8ba6a 100644\n> > > > --- a/meson.build\n> > > > +++ b/meson.build\n> > > > @@ -31,7 +31,6 @@ if cc.has_header_symbol('stdlib.h', 'secure_getenv', prefix : '#define _GNU_SOUR\n> > > >  endif\n> > > >\n> > > >  common_arguments = [\n> > > > -    '-Wno-unused-parameter',\n> > > >      '-include', 'config.h',\n> > > >  ]\n> > > >\n> > > > diff --git a/src/android/camera3_hal.cpp b/src/android/camera3_hal.cpp\n> > > > index 8d2629ca356c..a7f470172583 100644\n> > > > --- a/src/android/camera3_hal.cpp\n> > > > +++ b/src/android/camera3_hal.cpp\n> > > > @@ -31,18 +31,19 @@ static int hal_get_camera_info(int id, struct camera_info *info)\n> > > >  \treturn cameraManager.getCameraInfo(id, info);\n> > > >  }\n> > > >\n> > > > -static int hal_set_callbacks(const camera_module_callbacks_t *callbacks)\n> > > > +static int hal_set_callbacks(const camera_module_callbacks_t * /*callbacks*/)\n> > > >  {\n> > > >  \treturn 0;\n> > > >  }\n> > > >\n> > > > -static int hal_open_legacy(const struct hw_module_t *module, const char *id,\n> > > > -\t\t\t   uint32_t halVersion, struct hw_device_t **device)\n> > > > +static int hal_open_legacy(const struct hw_module_t * /*module*/,\n> > > > +\t\t\t   const char * /*id*/, uint32_t /*halVersion*/,\n> > > > +\t\t\t   struct hw_device_t ** /*device*/)\n> > > >  {\n> > > >  \treturn -ENOSYS;\n> > > >  }\n> > > >\n> > > > -static int hal_set_torch_mode(const char *camera_id, bool enabled)\n> > > > +static int hal_set_torch_mode(const char * /*camera_id*/, bool /*enabled*/)\n> > > >  {\n> > > >  \treturn -ENOSYS;\n> > > >  }\n> > > > diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\n> > > > index c7c9b3fd1724..b0ba1cf0a921 100644\n> > > > --- a/src/android/camera_device.cpp\n> > > > +++ b/src/android/camera_device.cpp\n> > > > @@ -49,7 +49,7 @@ CameraDevice::Camera3RequestDescriptor::~Camera3RequestDescriptor()\n> > > >   * to the framework using the designated callbacks.\n> > > >   */\n> > > >\n> > > > -CameraDevice::CameraDevice(unsigned int id, const std::shared_ptr<Camera> &camera)\n> > > > +CameraDevice::CameraDevice(unsigned int /*id*/, const std::shared_ptr<Camera> &camera)\n> > > >  \t: running_(false), camera_(camera), staticMetadata_(nullptr)\n> > > >  {\n> > > >  \tcamera_->requestCompleted.connect(this, &CameraDevice::requestComplete);\n> > > > @@ -875,7 +875,7 @@ void CameraDevice::notifyError(uint32_t frameNumber, camera3_stream_t *stream)\n> > > >  /*\n> > > >   * Produce a set of fixed result metadata.\n> > > >   */\n> > > > -std::unique_ptr<CameraMetadata> CameraDevice::getResultMetadata(int frame_number,\n> > > > +std::unique_ptr<CameraMetadata> CameraDevice::getResultMetadata(int /*frame_number*/,\n> > > >  \t\t\t\t\t\t\t\tint64_t timestamp)\n> > > >  {\n> > > >  \t/*\n> > > > diff --git a/src/android/camera_proxy.cpp b/src/android/camera_proxy.cpp\n> > > > index 4f5c0a024903..c9f98c784eec 100644\n> > > > --- a/src/android/camera_proxy.cpp\n> > > > +++ b/src/android/camera_proxy.cpp\n> > > > @@ -79,11 +79,11 @@ static int hal_dev_process_capture_request(const struct camera3_device *dev,\n> > > >  \treturn proxy->processCaptureRequest(request);\n> > > >  }\n> > > >\n> > > > -static void hal_dev_dump(const struct camera3_device *dev, int fd)\n> > > > +static void hal_dev_dump(const struct camera3_device * /*dev*/, int /*fd*/)\n> > > >  {\n> > > >  }\n> > > >\n> > > > -static int hal_dev_flush(const struct camera3_device *dev)\n> > > > +static int hal_dev_flush(const struct camera3_device * /*dev*/)\n> > > >  {\n> > > >  \treturn 0;\n> > > >  }\n> > > > diff --git a/src/cam/main.cpp b/src/cam/main.cpp\n> > > > index 9d99f5587cbb..ceb0efeff045 100644\n> > > > --- a/src/cam/main.cpp\n> > > > +++ b/src/cam/main.cpp\n> > > > @@ -326,7 +326,7 @@ int CamApp::run()\n> > > >  \treturn 0;\n> > > >  }\n> > > >\n> > > > -void signalHandler(int signal)\n> > > > +void signalHandler(int /*signal*/)\n> > > >  {\n> > > >  \tstd::cout << \"Exiting\" << std::endl;\n> > > >  \tCamApp::instance()->quit();\n> > > > diff --git a/src/ipa/ipa_vimc.cpp b/src/ipa/ipa_vimc.cpp\n> > > > index 63d578b4e2aa..16c7e0732d40 100644\n> > > > --- a/src/ipa/ipa_vimc.cpp\n> > > > +++ b/src/ipa/ipa_vimc.cpp\n> > > > @@ -30,11 +30,11 @@ public:\n> > > >  \t~IPAVimc();\n> > > >\n> > > >  \tint init() override;\n> > > > -\tvoid configure(const std::map<unsigned int, IPAStream> &streamConfig,\n> > > > -\t\t       const std::map<unsigned int, ControlInfoMap> &entityControls) override {}\n> > > > -\tvoid mapBuffers(const std::vector<IPABuffer> &buffers) override {}\n> > > > -\tvoid unmapBuffers(const std::vector<unsigned int> &ids) override {}\n> > > > -\tvoid processEvent(const IPAOperationData &event) override {}\n> > > > +\tvoid configure(const std::map<unsigned int, IPAStream> & /*streamConfig*/,\n> > > > +\t\t       const std::map<unsigned int, ControlInfoMap> & /*entityControls*/) override {}\n> > > > +\tvoid mapBuffers(const std::vector<IPABuffer> & /*buffers*/) override {}\n> > > > +\tvoid unmapBuffers(const std::vector<unsigned int> & /*ids*/) override {}\n> > > > +\tvoid processEvent(const IPAOperationData & /*event*/) override {}\n> > > >\n> > > >  private:\n> > > >  \tvoid initTrace();\n> > > > diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp\n> > > > index 9a13f5c7df17..84f270791340 100644\n> > > > --- a/src/ipa/rkisp1/rkisp1.cpp\n> > > > +++ b/src/ipa/rkisp1/rkisp1.cpp\n> > > > @@ -61,7 +61,7 @@ private:\n> > > >  \tuint32_t maxGain_;\n> > > >  };\n> > > >\n> > > > -void IPARkISP1::configure(const std::map<unsigned int, IPAStream> &streamConfig,\n> > > > +void IPARkISP1::configure(const std::map<unsigned int, IPAStream> & /*streamConfig*/,\n> > > >  \t\t\t  const std::map<unsigned int, ControlInfoMap> &entityControls)\n> > > >  {\n> > > >  \tif (entityControls.empty())\n> > > > diff --git a/src/libcamera/device_enumerator_udev.cpp b/src/libcamera/device_enumerator_udev.cpp\n> > > > index b2c5fd221dcd..6e0fbbd8c70c 100644\n> > > > --- a/src/libcamera/device_enumerator_udev.cpp\n> > > > +++ b/src/libcamera/device_enumerator_udev.cpp\n> > > > @@ -309,7 +309,7 @@ int DeviceEnumeratorUdev::addV4L2Device(dev_t devnum)\n> > > >  \treturn 0;\n> > > >  }\n> > > >\n> > > > -void DeviceEnumeratorUdev::udevNotify(EventNotifier *notifier)\n> > > > +void DeviceEnumeratorUdev::udevNotify(EventNotifier * /*notifier*/)\n> > > >  {\n> > > >  \tstruct udev_device *dev = udev_monitor_receive_device(monitor_);\n> > > >  \tstd::string action(udev_device_get_action(dev));\n> > > > diff --git a/src/libcamera/ipc_unixsocket.cpp b/src/libcamera/ipc_unixsocket.cpp\n> > > > index def08eef00f8..eb594268dd6c 100644\n> > > > --- a/src/libcamera/ipc_unixsocket.cpp\n> > > > +++ b/src/libcamera/ipc_unixsocket.cpp\n> > > > @@ -306,7 +306,7 @@ int IPCUnixSocket::recvData(void *buffer, size_t length,\n> > > >  \treturn 0;\n> > > >  }\n> > > >\n> > > > -void IPCUnixSocket::dataNotifier(EventNotifier *notifier)\n> > > > +void IPCUnixSocket::dataNotifier(EventNotifier * /*notifier*/)\n> > > >  {\n> > > >  \tint ret;\n> > > >\n> > > > diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> > > > index 8d3ad568d16e..84356646b736 100644\n> > > > --- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n> > > > +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> > > > @@ -700,7 +700,7 @@ error:\n> > > >  }\n> > > >\n> > > >  int PipelineHandlerIPU3::freeBuffers(Camera *camera,\n> > > > -\t\t\t\t     const std::set<Stream *> &streams)\n> > > > +\t\t\t\t     const std::set<Stream *> & /*streams*/)\n> > > >  {\n> > > >  \tIPU3CameraData *data = cameraData(camera);\n> > > >\n> > > > diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> > > > index 7a28b03b8d38..aed060bada70 100644\n> > > > --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> > > > +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> > > > @@ -703,7 +703,7 @@ int PipelineHandlerRkISP1::allocateBuffers(Camera *camera,\n> > > >  }\n> > > >\n> > > >  int PipelineHandlerRkISP1::freeBuffers(Camera *camera,\n> > > > -\t\t\t\t       const std::set<Stream *> &streams)\n> > > > +\t\t\t\t       const std::set<Stream *> & /*streams*/)\n> > > >  {\n> > > >  \tRkISP1CameraData *data = cameraData(camera);\n> > > >\n> > > > diff --git a/src/libcamera/pipeline/rkisp1/timeline.cpp b/src/libcamera/pipeline/rkisp1/timeline.cpp\n> > > > index f6c6434d7b53..59e6de78c79d 100644\n> > > > --- a/src/libcamera/pipeline/rkisp1/timeline.cpp\n> > > > +++ b/src/libcamera/pipeline/rkisp1/timeline.cpp\n> > > > @@ -204,7 +204,7 @@ void Timeline::updateDeadline()\n> > > >  \ttimer_.start(deadline);\n> > > >  }\n> > > >\n> > > > -void Timeline::timeout(Timer *timer)\n> > > > +void Timeline::timeout(Timer * /*timer*/)\n> > > >  {\n> > > >  \tutils::time_point now = std::chrono::steady_clock::now();\n> > > >\n> > > > diff --git a/src/libcamera/pipeline/uvcvideo.cpp b/src/libcamera/pipeline/uvcvideo.cpp\n> > > > index fae0ffc4de30..94464c7c7f0c 100644\n> > > > --- a/src/libcamera/pipeline/uvcvideo.cpp\n> > > > +++ b/src/libcamera/pipeline/uvcvideo.cpp\n> > > > @@ -208,7 +208,7 @@ int PipelineHandlerUVC::allocateBuffers(Camera *camera,\n> > > >  }\n> > > >\n> > > >  int PipelineHandlerUVC::freeBuffers(Camera *camera,\n> > > > -\t\t\t\t    const std::set<Stream *> &streams)\n> > > > +\t\t\t\t    const std::set<Stream *> & /*streams*/)\n> > > >  {\n> > > >  \tUVCCameraData *data = cameraData(camera);\n> > > >  \treturn data->video_->releaseBuffers();\n> > > > diff --git a/src/libcamera/pipeline/vimc.cpp b/src/libcamera/pipeline/vimc.cpp\n> > > > index c16ae4cb76b5..7e325469f178 100644\n> > > > --- a/src/libcamera/pipeline/vimc.cpp\n> > > > +++ b/src/libcamera/pipeline/vimc.cpp\n> > > > @@ -166,7 +166,7 @@ PipelineHandlerVimc::PipelineHandlerVimc(CameraManager *manager)\n> > > >  {\n> > > >  }\n> > > >\n> > > > -CameraConfiguration *PipelineHandlerVimc::generateConfiguration(Camera *camera,\n> > > > +CameraConfiguration *PipelineHandlerVimc::generateConfiguration(Camera * /*camera*/,\n> > > >  \tconst StreamRoles &roles)\n> > > >  {\n> > > >  \tCameraConfiguration *config = new VimcCameraConfiguration();\n> > > > @@ -274,7 +274,7 @@ int PipelineHandlerVimc::allocateBuffers(Camera *camera,\n> > > >  }\n> > > >\n> > > >  int PipelineHandlerVimc::freeBuffers(Camera *camera,\n> > > > -\t\t\t\t     const std::set<Stream *> &streams)\n> > > > +\t\t\t\t     const std::set<Stream *> & /*streams*/)\n> > > >  {\n> > > >  \tVimcCameraData *data = cameraData(camera);\n> > > >  \treturn data->video_->releaseBuffers();\n> > > > diff --git a/src/libcamera/process.cpp b/src/libcamera/process.cpp\n> > > > index 3b4d0f10da67..44ebfec178fe 100644\n> > > > --- a/src/libcamera/process.cpp\n> > > > +++ b/src/libcamera/process.cpp\n> > > > @@ -89,7 +89,7 @@ void sigact(int signal, siginfo_t *info, void *ucontext)\n> > > >\n> > > >  } /* namespace */\n> > > >\n> > > > -void ProcessManager::sighandler(EventNotifier *notifier)\n> > > > +void ProcessManager::sighandler(EventNotifier * /*notifier*/)\n> > > >  {\n> > > >  \tchar data;\n> > > >  \tssize_t ret = read(pipe_[0], &data, sizeof(data));\n> > > > diff --git a/src/libcamera/proxy/ipa_proxy_linux.cpp b/src/libcamera/proxy/ipa_proxy_linux.cpp\n> > > > index 4e6fa6899e07..d4ccf5112cd7 100644\n> > > > --- a/src/libcamera/proxy/ipa_proxy_linux.cpp\n> > > > +++ b/src/libcamera/proxy/ipa_proxy_linux.cpp\n> > > > @@ -27,11 +27,11 @@ public:\n> > > >  \t~IPAProxyLinux();\n> > > >\n> > > >  \tint init() override { return 0; }\n> > > > -\tvoid configure(const std::map<unsigned int, IPAStream> &streamConfig,\n> > > > -\t\t       const std::map<unsigned int, ControlInfoMap> &entityControls) override {}\n> > > > -\tvoid mapBuffers(const std::vector<IPABuffer> &buffers) override {}\n> > > > -\tvoid unmapBuffers(const std::vector<unsigned int> &ids) override {}\n> > > > -\tvoid processEvent(const IPAOperationData &event) override {}\n> > > > +\tvoid configure(const std::map<unsigned int, IPAStream> & /*streamConfig*/,\n> > > > +\t\t       const std::map<unsigned int, ControlInfoMap> & /*entityControls*/) override {}\n> > > > +\tvoid mapBuffers(const std::vector<IPABuffer> & /*buffers*/) override {}\n> > > > +\tvoid unmapBuffers(const std::vector<unsigned int> & /*ids*/) override {}\n> > > > +\tvoid processEvent(const IPAOperationData & /*event*/) override {}\n> > > >\n> > > >  private:\n> > > >  \tvoid readyRead(IPCUnixSocket *ipc);\n> > > > @@ -86,7 +86,7 @@ IPAProxyLinux::~IPAProxyLinux()\n> > > >  \tdelete socket_;\n> > > >  }\n> > > >\n> > > > -void IPAProxyLinux::readyRead(IPCUnixSocket *ipc)\n> > > > +void IPAProxyLinux::readyRead(IPCUnixSocket * /*ipc*/)\n> > > >  {\n> > > >  }\n> > > >\n> > > > diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp\n> > > > index 208ab54199b1..87d810d7cfa4 100644\n> > > > --- a/src/libcamera/v4l2_videodevice.cpp\n> > > > +++ b/src/libcamera/v4l2_videodevice.cpp\n> > > > @@ -1141,7 +1141,7 @@ Buffer *V4L2VideoDevice::dequeueBuffer()\n> > > >   * For Capture video devices the Buffer will contain valid data.\n> > > >   * For Output video devices the Buffer can be considered empty.\n> > > >   */\n> > > > -void V4L2VideoDevice::bufferAvailable(EventNotifier *notifier)\n> > > > +void V4L2VideoDevice::bufferAvailable(EventNotifier * /*notifier*/)\n> > > >  {\n> > > >  \tBuffer *buffer = dequeueBuffer();\n> > > >  \tif (!buffer)\n> > > > diff --git a/src/qcam/main.cpp b/src/qcam/main.cpp\n> > > > index a7ff5c52663b..d8cfc1c3d76b 100644\n> > > > --- a/src/qcam/main.cpp\n> > > > +++ b/src/qcam/main.cpp\n> > > > @@ -17,7 +17,7 @@\n> > > >  #include \"../cam/options.h\"\n> > > >  #include \"qt_event_dispatcher.h\"\n> > > >\n> > > > -void signalHandler(int signal)\n> > > > +void signalHandler(int /*signal*/)\n> > > >  {\n> > > >  \tstd::cout << \"Exiting\" << std::endl;\n> > > >  \tqApp->quit();\n> > > > diff --git a/test/camera/capture.cpp b/test/camera/capture.cpp\n> > > > index 791ccad15f70..a5fd0a641705 100644\n> > > > --- a/test/camera/capture.cpp\n> > > > +++ b/test/camera/capture.cpp\n> > > > @@ -19,7 +19,7 @@ protected:\n> > > >  \tunsigned int completeBuffersCount_;\n> > > >  \tunsigned int completeRequestsCount_;\n> > > >\n> > > > -\tvoid bufferComplete(Request *request, Buffer *buffer)\n> > > > +\tvoid bufferComplete(Request * /*request*/, Buffer *buffer)\n> > > >  \t{\n> > > >  \t\tif (buffer->status() != Buffer::BufferSuccess)\n> > > >  \t\t\treturn;\n> > > > diff --git a/test/libtest/test.h b/test/libtest/test.h\n> > > > index ec08bf97c03d..193d7aa99f38 100644\n> > > > --- a/test/libtest/test.h\n> > > > +++ b/test/libtest/test.h\n> > > > @@ -26,11 +26,11 @@ public:\n> > > >  protected:\n> > > >  \tvirtual int init() { return 0; }\n> > > >  \tvirtual int run() = 0;\n> > > > -\tvirtual void cleanup() { }\n> > > > +\tvirtual void cleanup() {}\n> > > >  };\n> > > >\n> > > >  #define TEST_REGISTER(klass)\t\t\t\t\t\t\\\n> > > > -int main(int argc, char *argv[])\t\t\t\t\t\\\n> > > > +int main(int /*argc*/, char * /*argv*/[])\t\t\t\t\\\n> > > >  {\t\t\t\t\t\t\t\t\t\\\n> > > >  \treturn klass().execute();\t\t\t\t\t\\\n> > > >  }\n> > > > diff --git a/test/log/log_process.cpp b/test/log/log_process.cpp\n> > > > index 2df4aa43713c..fa5639dde7cb 100644\n> > > > --- a/test/log/log_process.cpp\n> > > > +++ b/test/log/log_process.cpp\n> > > > @@ -123,7 +123,8 @@ protected:\n> > > >  \t}\n> > > >\n> > > >  private:\n> > > > -\tvoid procFinished(Process *proc, enum Process::ExitStatus exitStatus, int exitCode)\n> > > > +\tvoid procFinished(Process * /*proc*/,\n> > > > +\t\t\t  enum Process::ExitStatus exitStatus, int exitCode)\n> > > >  \t{\n> > > >  \t\texitStatus_ = exitStatus;\n> > > >  \t\texitCode_ = exitCode;\n> > > > diff --git a/test/message.cpp b/test/message.cpp\n> > > > index 3775c30a20b3..3e2659c836e3 100644\n> > > > --- a/test/message.cpp\n> > > > +++ b/test/message.cpp\n> > > > @@ -35,7 +35,7 @@ public:\n> > > >  \tvoid reset() { status_ = NoMessage; }\n> > > >\n> > > >  protected:\n> > > > -\tvoid message(Message *msg)\n> > > > +\tvoid message(Message * /*msg*/)\n> > > >  \t{\n> > > >  \t\tif (thread() != Thread::current())\n> > > >  \t\t\tstatus_ = InvalidThread;\n> > > > diff --git a/test/process/process_test.cpp b/test/process/process_test.cpp\n> > > > index 7e7b3c2c8bf3..2ba3efd08457 100644\n> > > > --- a/test/process/process_test.cpp\n> > > > +++ b/test/process/process_test.cpp\n> > > > @@ -75,7 +75,8 @@ protected:\n> > > >  \t}\n> > > >\n> > > >  private:\n> > > > -\tvoid procFinished(Process *proc, enum Process::ExitStatus exitStatus, int exitCode)\n> > > > +\tvoid procFinished(Process * /*proc*/,\n> > > > +\t\t\t  enum Process::ExitStatus exitStatus, int exitCode)\n> > > >  \t{\n> > > >  \t\texitStatus_ = exitStatus;\n> > > >  \t\texitCode_ = exitCode;\n> > > > diff --git a/test/timer-thread.cpp b/test/timer-thread.cpp\n> > > > index 32853b4e80ef..55b7abcbbeab 100644\n> > > > --- a/test/timer-thread.cpp\n> > > > +++ b/test/timer-thread.cpp\n> > > > @@ -39,7 +39,7 @@ public:\n> > > >  \t}\n> > > >\n> > > >  private:\n> > > > -\tvoid timeoutHandler(Timer *timer)\n> > > > +\tvoid timeoutHandler(Timer * /*timer*/)\n> > > >  \t{\n> > > >  \t\ttimeout_ = true;\n> > > >  \t}\n> > > > diff --git a/test/timer.cpp b/test/timer.cpp\n> > > > index 2bdb006edccb..03df03aa8d69 100644\n> > > > --- a/test/timer.cpp\n> > > > +++ b/test/timer.cpp\n> > > > @@ -56,7 +56,7 @@ public:\n> > > >  \t}\n> > > >\n> > > >  private:\n> > > > -\tvoid timeoutHandler(Timer *timer)\n> > > > +\tvoid timeoutHandler(Timer * /*timer*/)\n> > > >  \t{\n> > > >  \t\texpiration_ = std::chrono::steady_clock::now();\n> > > >  \t\tcount_++;\n> > > >\n>\n> --\n> Regards,\n>\n> Laurent Pinchart\n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel","headers":{"Return-Path":"<jacopo@jmondi.org>","Received":["from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net\n\t[217.70.183.197])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 33F7561508\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat,  9 Nov 2019 11:29:44 +0100 (CET)","from uno.localdomain (unknown [54.36.30.212])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 9002C1C0009;\n\tSat,  9 Nov 2019 10:29:42 +0000 (UTC)"],"X-Originating-IP":"54.36.30.212","Date":"Sat, 9 Nov 2019 11:31:35 +0100","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"Kieran Bingham <kieran.bingham@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Message-ID":"<20191109103135.s326tbuehyx4mnng@uno.localdomain>","References":"<20191026213835.15110-1-laurent.pinchart@ideasonboard.com>\n\t<34810c55-0226-253c-56ff-9a756ee5f997@ideasonboard.com>\n\t<20191028103544.GA14017@pendragon.ideasonboard.com>\n\t<20191108194227.GA1058@pendragon.ideasonboard.com>","MIME-Version":"1.0","Content-Type":"multipart/signed; micalg=pgp-sha256;\n\tprotocol=\"application/pgp-signature\"; boundary=\"pljy7hsz6fhkzqju\"","Content-Disposition":"inline","In-Reply-To":"<20191108194227.GA1058@pendragon.ideasonboard.com>","User-Agent":"NeoMutt/20180716","Subject":"Re: [libcamera-devel] [PATCH/RFC] meson: Remove\n\t-Wno-unused-parameter","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Sat, 09 Nov 2019 10:29:44 -0000"}},{"id":3082,"web_url":"https://patchwork.libcamera.org/comment/3082/","msgid":"<20191118215304.xccnnvzx2p3bwb6z@uno.localdomain>","date":"2019-11-18T21:53:04","subject":"Re: [libcamera-devel] [PATCH/RFC] meson: Remove\n\t-Wno-unused-parameter","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Laurent,\n\nOn Sat, Nov 09, 2019 at 11:31:35AM +0100, Jacopo Mondi wrote:\n> Hi Laurent,\n>\n\nSorry, I forgot to add my tag\nReviewed-by: Jacopo Mondi <jacopo@jmondi.org>\n\nThanks\n  j\n\n> On Fri, Nov 08, 2019 at 09:42:27PM +0200, Laurent Pinchart wrote:\n> > Hello everybody,\n> >\n> > On Mon, Oct 28, 2019 at 12:35:44PM +0200, Laurent Pinchart wrote:\n> > > On Mon, Oct 28, 2019 at 09:32:14AM +0000, Kieran Bingham wrote:\n> > > > On 26/10/2019 22:38, Laurent Pinchart wrote:\n> > > > > We build libcamera with -Wno-unused-parameter and this doesn't cause\n> > > > > much issue internally. However, it prevents catching unused parameters\n> > > > > in inline functions defined in public headers. This can lead to\n> > > > > compilation warnings for applications compiled without\n> > > > > -Wno-unused-parameter.\n> > > > >\n> > > > > To catch those issues, remove -Wno-unused-parameter and fix all the\n> > > > > related warnings.\n> > > >\n> > > > What's your opinion on defining an unused(variable) (named otherwise if\n> > > > required) macro so that we can declare unused variables in the code\n> > > > base, and keep the function prototypes clean?\n> > > >\n> > > > i.e.\n> > > >\n> > > > #define unused(_x) (void)(_x)\n> > > >\n> > > >  ControlValue ControlValue::load(ByteStreamBuffer &b, ControlType type,\n> > > >                                 unsigned int count)\n> > > >  {\n> > > > +       unused(count);\n> > > > +\n> > > >         switch (type) {\n> > > >         case ControlTypeBool: {\n> > > >                 bool value;\n> > > >   ...\n> > > >  }\n> > > >\n> > > > I think something like that would allow cleaner function declarations,\n> > > > that do not need to be modified once someone actually uses the variable\n> > > > in question. Simply remove the 'unused' declaration ?\n> > >\n> > > I'm afraid I don't like that :-) First of all, compilers may not always\n> > > be fooled by that particular implementation, and we'll play a game of\n> > > whack-a-mole as new compiler versions are released. Then, removing the\n> > > variable name is specified by the C++ standard as the official way to\n> > > note that a variable is unused. I don't think we should use a different,\n> > > non-standard implementation.\n> > >\n> > > This patch stems from a warning generated when compiling a small test\n> > > code against libcamera out of the libcamera source tree, without\n> > > -Wno-unused-parameter. It turns out we had a single issue in public\n> > > headers, so we will likely not introduce other such issues in the\n> > > headers very often. We could thus decide not to care about it and catch\n> > > the issues when they are reported. I however think there's value in\n> > > dropping the compiler option though (otherwise I wouldn't have sent this\n> > > patch in the first place :-)).\n> >\n> > Ping ? I'd like to reach a consensus on this and decide if we should\n> > drop the patch (and thus live with the small but real risk that\n> > applications that use -Wunused-parameters would get a build warning) or\n> > keep it, in this form or another.\n> >\n>\n> I think the priority here is to make sure applications do not get\n> warnings when building with -Wunused-parameters, so I'm finw with\n> either removing the parameter's name completely from the function\n> definition or commenting it out, which I like less but mostly because\n> of how it looks, so I'm fine with both, as long as we make sure\n> applications do not get warnings...\n>\n> Thanks\n>   j\n>\n> > > > > Fix an additional checkstyle.py error while at it.\n> > > > >\n> > > > > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > > > > ---\n> > > > >  meson.build                                |  1 -\n> > > > >  src/android/camera3_hal.cpp                |  9 +++++----\n> > > > >  src/android/camera_device.cpp              |  4 ++--\n> > > > >  src/android/camera_proxy.cpp               |  4 ++--\n> > > > >  src/cam/main.cpp                           |  2 +-\n> > > > >  src/ipa/ipa_vimc.cpp                       | 10 +++++-----\n> > > > >  src/ipa/rkisp1/rkisp1.cpp                  |  2 +-\n> > > > >  src/libcamera/device_enumerator_udev.cpp   |  2 +-\n> > > > >  src/libcamera/ipc_unixsocket.cpp           |  2 +-\n> > > > >  src/libcamera/pipeline/ipu3/ipu3.cpp       |  2 +-\n> > > > >  src/libcamera/pipeline/rkisp1/rkisp1.cpp   |  2 +-\n> > > > >  src/libcamera/pipeline/rkisp1/timeline.cpp |  2 +-\n> > > > >  src/libcamera/pipeline/uvcvideo.cpp        |  2 +-\n> > > > >  src/libcamera/pipeline/vimc.cpp            |  4 ++--\n> > > > >  src/libcamera/process.cpp                  |  2 +-\n> > > > >  src/libcamera/proxy/ipa_proxy_linux.cpp    | 12 ++++++------\n> > > > >  src/libcamera/v4l2_videodevice.cpp         |  2 +-\n> > > > >  src/qcam/main.cpp                          |  2 +-\n> > > > >  test/camera/capture.cpp                    |  2 +-\n> > > > >  test/libtest/test.h                        |  4 ++--\n> > > > >  test/log/log_process.cpp                   |  3 ++-\n> > > > >  test/message.cpp                           |  2 +-\n> > > > >  test/process/process_test.cpp              |  3 ++-\n> > > > >  test/timer-thread.cpp                      |  2 +-\n> > > > >  test/timer.cpp                             |  2 +-\n> > > > >  25 files changed, 43 insertions(+), 41 deletions(-)\n> > > > >\n> > > > > diff --git a/meson.build b/meson.build\n> > > > > index 72ad7c8b493b..19a921a8ba6a 100644\n> > > > > --- a/meson.build\n> > > > > +++ b/meson.build\n> > > > > @@ -31,7 +31,6 @@ if cc.has_header_symbol('stdlib.h', 'secure_getenv', prefix : '#define _GNU_SOUR\n> > > > >  endif\n> > > > >\n> > > > >  common_arguments = [\n> > > > > -    '-Wno-unused-parameter',\n> > > > >      '-include', 'config.h',\n> > > > >  ]\n> > > > >\n> > > > > diff --git a/src/android/camera3_hal.cpp b/src/android/camera3_hal.cpp\n> > > > > index 8d2629ca356c..a7f470172583 100644\n> > > > > --- a/src/android/camera3_hal.cpp\n> > > > > +++ b/src/android/camera3_hal.cpp\n> > > > > @@ -31,18 +31,19 @@ static int hal_get_camera_info(int id, struct camera_info *info)\n> > > > >  \treturn cameraManager.getCameraInfo(id, info);\n> > > > >  }\n> > > > >\n> > > > > -static int hal_set_callbacks(const camera_module_callbacks_t *callbacks)\n> > > > > +static int hal_set_callbacks(const camera_module_callbacks_t * /*callbacks*/)\n> > > > >  {\n> > > > >  \treturn 0;\n> > > > >  }\n> > > > >\n> > > > > -static int hal_open_legacy(const struct hw_module_t *module, const char *id,\n> > > > > -\t\t\t   uint32_t halVersion, struct hw_device_t **device)\n> > > > > +static int hal_open_legacy(const struct hw_module_t * /*module*/,\n> > > > > +\t\t\t   const char * /*id*/, uint32_t /*halVersion*/,\n> > > > > +\t\t\t   struct hw_device_t ** /*device*/)\n> > > > >  {\n> > > > >  \treturn -ENOSYS;\n> > > > >  }\n> > > > >\n> > > > > -static int hal_set_torch_mode(const char *camera_id, bool enabled)\n> > > > > +static int hal_set_torch_mode(const char * /*camera_id*/, bool /*enabled*/)\n> > > > >  {\n> > > > >  \treturn -ENOSYS;\n> > > > >  }\n> > > > > diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\n> > > > > index c7c9b3fd1724..b0ba1cf0a921 100644\n> > > > > --- a/src/android/camera_device.cpp\n> > > > > +++ b/src/android/camera_device.cpp\n> > > > > @@ -49,7 +49,7 @@ CameraDevice::Camera3RequestDescriptor::~Camera3RequestDescriptor()\n> > > > >   * to the framework using the designated callbacks.\n> > > > >   */\n> > > > >\n> > > > > -CameraDevice::CameraDevice(unsigned int id, const std::shared_ptr<Camera> &camera)\n> > > > > +CameraDevice::CameraDevice(unsigned int /*id*/, const std::shared_ptr<Camera> &camera)\n> > > > >  \t: running_(false), camera_(camera), staticMetadata_(nullptr)\n> > > > >  {\n> > > > >  \tcamera_->requestCompleted.connect(this, &CameraDevice::requestComplete);\n> > > > > @@ -875,7 +875,7 @@ void CameraDevice::notifyError(uint32_t frameNumber, camera3_stream_t *stream)\n> > > > >  /*\n> > > > >   * Produce a set of fixed result metadata.\n> > > > >   */\n> > > > > -std::unique_ptr<CameraMetadata> CameraDevice::getResultMetadata(int frame_number,\n> > > > > +std::unique_ptr<CameraMetadata> CameraDevice::getResultMetadata(int /*frame_number*/,\n> > > > >  \t\t\t\t\t\t\t\tint64_t timestamp)\n> > > > >  {\n> > > > >  \t/*\n> > > > > diff --git a/src/android/camera_proxy.cpp b/src/android/camera_proxy.cpp\n> > > > > index 4f5c0a024903..c9f98c784eec 100644\n> > > > > --- a/src/android/camera_proxy.cpp\n> > > > > +++ b/src/android/camera_proxy.cpp\n> > > > > @@ -79,11 +79,11 @@ static int hal_dev_process_capture_request(const struct camera3_device *dev,\n> > > > >  \treturn proxy->processCaptureRequest(request);\n> > > > >  }\n> > > > >\n> > > > > -static void hal_dev_dump(const struct camera3_device *dev, int fd)\n> > > > > +static void hal_dev_dump(const struct camera3_device * /*dev*/, int /*fd*/)\n> > > > >  {\n> > > > >  }\n> > > > >\n> > > > > -static int hal_dev_flush(const struct camera3_device *dev)\n> > > > > +static int hal_dev_flush(const struct camera3_device * /*dev*/)\n> > > > >  {\n> > > > >  \treturn 0;\n> > > > >  }\n> > > > > diff --git a/src/cam/main.cpp b/src/cam/main.cpp\n> > > > > index 9d99f5587cbb..ceb0efeff045 100644\n> > > > > --- a/src/cam/main.cpp\n> > > > > +++ b/src/cam/main.cpp\n> > > > > @@ -326,7 +326,7 @@ int CamApp::run()\n> > > > >  \treturn 0;\n> > > > >  }\n> > > > >\n> > > > > -void signalHandler(int signal)\n> > > > > +void signalHandler(int /*signal*/)\n> > > > >  {\n> > > > >  \tstd::cout << \"Exiting\" << std::endl;\n> > > > >  \tCamApp::instance()->quit();\n> > > > > diff --git a/src/ipa/ipa_vimc.cpp b/src/ipa/ipa_vimc.cpp\n> > > > > index 63d578b4e2aa..16c7e0732d40 100644\n> > > > > --- a/src/ipa/ipa_vimc.cpp\n> > > > > +++ b/src/ipa/ipa_vimc.cpp\n> > > > > @@ -30,11 +30,11 @@ public:\n> > > > >  \t~IPAVimc();\n> > > > >\n> > > > >  \tint init() override;\n> > > > > -\tvoid configure(const std::map<unsigned int, IPAStream> &streamConfig,\n> > > > > -\t\t       const std::map<unsigned int, ControlInfoMap> &entityControls) override {}\n> > > > > -\tvoid mapBuffers(const std::vector<IPABuffer> &buffers) override {}\n> > > > > -\tvoid unmapBuffers(const std::vector<unsigned int> &ids) override {}\n> > > > > -\tvoid processEvent(const IPAOperationData &event) override {}\n> > > > > +\tvoid configure(const std::map<unsigned int, IPAStream> & /*streamConfig*/,\n> > > > > +\t\t       const std::map<unsigned int, ControlInfoMap> & /*entityControls*/) override {}\n> > > > > +\tvoid mapBuffers(const std::vector<IPABuffer> & /*buffers*/) override {}\n> > > > > +\tvoid unmapBuffers(const std::vector<unsigned int> & /*ids*/) override {}\n> > > > > +\tvoid processEvent(const IPAOperationData & /*event*/) override {}\n> > > > >\n> > > > >  private:\n> > > > >  \tvoid initTrace();\n> > > > > diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp\n> > > > > index 9a13f5c7df17..84f270791340 100644\n> > > > > --- a/src/ipa/rkisp1/rkisp1.cpp\n> > > > > +++ b/src/ipa/rkisp1/rkisp1.cpp\n> > > > > @@ -61,7 +61,7 @@ private:\n> > > > >  \tuint32_t maxGain_;\n> > > > >  };\n> > > > >\n> > > > > -void IPARkISP1::configure(const std::map<unsigned int, IPAStream> &streamConfig,\n> > > > > +void IPARkISP1::configure(const std::map<unsigned int, IPAStream> & /*streamConfig*/,\n> > > > >  \t\t\t  const std::map<unsigned int, ControlInfoMap> &entityControls)\n> > > > >  {\n> > > > >  \tif (entityControls.empty())\n> > > > > diff --git a/src/libcamera/device_enumerator_udev.cpp b/src/libcamera/device_enumerator_udev.cpp\n> > > > > index b2c5fd221dcd..6e0fbbd8c70c 100644\n> > > > > --- a/src/libcamera/device_enumerator_udev.cpp\n> > > > > +++ b/src/libcamera/device_enumerator_udev.cpp\n> > > > > @@ -309,7 +309,7 @@ int DeviceEnumeratorUdev::addV4L2Device(dev_t devnum)\n> > > > >  \treturn 0;\n> > > > >  }\n> > > > >\n> > > > > -void DeviceEnumeratorUdev::udevNotify(EventNotifier *notifier)\n> > > > > +void DeviceEnumeratorUdev::udevNotify(EventNotifier * /*notifier*/)\n> > > > >  {\n> > > > >  \tstruct udev_device *dev = udev_monitor_receive_device(monitor_);\n> > > > >  \tstd::string action(udev_device_get_action(dev));\n> > > > > diff --git a/src/libcamera/ipc_unixsocket.cpp b/src/libcamera/ipc_unixsocket.cpp\n> > > > > index def08eef00f8..eb594268dd6c 100644\n> > > > > --- a/src/libcamera/ipc_unixsocket.cpp\n> > > > > +++ b/src/libcamera/ipc_unixsocket.cpp\n> > > > > @@ -306,7 +306,7 @@ int IPCUnixSocket::recvData(void *buffer, size_t length,\n> > > > >  \treturn 0;\n> > > > >  }\n> > > > >\n> > > > > -void IPCUnixSocket::dataNotifier(EventNotifier *notifier)\n> > > > > +void IPCUnixSocket::dataNotifier(EventNotifier * /*notifier*/)\n> > > > >  {\n> > > > >  \tint ret;\n> > > > >\n> > > > > diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> > > > > index 8d3ad568d16e..84356646b736 100644\n> > > > > --- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n> > > > > +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> > > > > @@ -700,7 +700,7 @@ error:\n> > > > >  }\n> > > > >\n> > > > >  int PipelineHandlerIPU3::freeBuffers(Camera *camera,\n> > > > > -\t\t\t\t     const std::set<Stream *> &streams)\n> > > > > +\t\t\t\t     const std::set<Stream *> & /*streams*/)\n> > > > >  {\n> > > > >  \tIPU3CameraData *data = cameraData(camera);\n> > > > >\n> > > > > diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> > > > > index 7a28b03b8d38..aed060bada70 100644\n> > > > > --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> > > > > +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> > > > > @@ -703,7 +703,7 @@ int PipelineHandlerRkISP1::allocateBuffers(Camera *camera,\n> > > > >  }\n> > > > >\n> > > > >  int PipelineHandlerRkISP1::freeBuffers(Camera *camera,\n> > > > > -\t\t\t\t       const std::set<Stream *> &streams)\n> > > > > +\t\t\t\t       const std::set<Stream *> & /*streams*/)\n> > > > >  {\n> > > > >  \tRkISP1CameraData *data = cameraData(camera);\n> > > > >\n> > > > > diff --git a/src/libcamera/pipeline/rkisp1/timeline.cpp b/src/libcamera/pipeline/rkisp1/timeline.cpp\n> > > > > index f6c6434d7b53..59e6de78c79d 100644\n> > > > > --- a/src/libcamera/pipeline/rkisp1/timeline.cpp\n> > > > > +++ b/src/libcamera/pipeline/rkisp1/timeline.cpp\n> > > > > @@ -204,7 +204,7 @@ void Timeline::updateDeadline()\n> > > > >  \ttimer_.start(deadline);\n> > > > >  }\n> > > > >\n> > > > > -void Timeline::timeout(Timer *timer)\n> > > > > +void Timeline::timeout(Timer * /*timer*/)\n> > > > >  {\n> > > > >  \tutils::time_point now = std::chrono::steady_clock::now();\n> > > > >\n> > > > > diff --git a/src/libcamera/pipeline/uvcvideo.cpp b/src/libcamera/pipeline/uvcvideo.cpp\n> > > > > index fae0ffc4de30..94464c7c7f0c 100644\n> > > > > --- a/src/libcamera/pipeline/uvcvideo.cpp\n> > > > > +++ b/src/libcamera/pipeline/uvcvideo.cpp\n> > > > > @@ -208,7 +208,7 @@ int PipelineHandlerUVC::allocateBuffers(Camera *camera,\n> > > > >  }\n> > > > >\n> > > > >  int PipelineHandlerUVC::freeBuffers(Camera *camera,\n> > > > > -\t\t\t\t    const std::set<Stream *> &streams)\n> > > > > +\t\t\t\t    const std::set<Stream *> & /*streams*/)\n> > > > >  {\n> > > > >  \tUVCCameraData *data = cameraData(camera);\n> > > > >  \treturn data->video_->releaseBuffers();\n> > > > > diff --git a/src/libcamera/pipeline/vimc.cpp b/src/libcamera/pipeline/vimc.cpp\n> > > > > index c16ae4cb76b5..7e325469f178 100644\n> > > > > --- a/src/libcamera/pipeline/vimc.cpp\n> > > > > +++ b/src/libcamera/pipeline/vimc.cpp\n> > > > > @@ -166,7 +166,7 @@ PipelineHandlerVimc::PipelineHandlerVimc(CameraManager *manager)\n> > > > >  {\n> > > > >  }\n> > > > >\n> > > > > -CameraConfiguration *PipelineHandlerVimc::generateConfiguration(Camera *camera,\n> > > > > +CameraConfiguration *PipelineHandlerVimc::generateConfiguration(Camera * /*camera*/,\n> > > > >  \tconst StreamRoles &roles)\n> > > > >  {\n> > > > >  \tCameraConfiguration *config = new VimcCameraConfiguration();\n> > > > > @@ -274,7 +274,7 @@ int PipelineHandlerVimc::allocateBuffers(Camera *camera,\n> > > > >  }\n> > > > >\n> > > > >  int PipelineHandlerVimc::freeBuffers(Camera *camera,\n> > > > > -\t\t\t\t     const std::set<Stream *> &streams)\n> > > > > +\t\t\t\t     const std::set<Stream *> & /*streams*/)\n> > > > >  {\n> > > > >  \tVimcCameraData *data = cameraData(camera);\n> > > > >  \treturn data->video_->releaseBuffers();\n> > > > > diff --git a/src/libcamera/process.cpp b/src/libcamera/process.cpp\n> > > > > index 3b4d0f10da67..44ebfec178fe 100644\n> > > > > --- a/src/libcamera/process.cpp\n> > > > > +++ b/src/libcamera/process.cpp\n> > > > > @@ -89,7 +89,7 @@ void sigact(int signal, siginfo_t *info, void *ucontext)\n> > > > >\n> > > > >  } /* namespace */\n> > > > >\n> > > > > -void ProcessManager::sighandler(EventNotifier *notifier)\n> > > > > +void ProcessManager::sighandler(EventNotifier * /*notifier*/)\n> > > > >  {\n> > > > >  \tchar data;\n> > > > >  \tssize_t ret = read(pipe_[0], &data, sizeof(data));\n> > > > > diff --git a/src/libcamera/proxy/ipa_proxy_linux.cpp b/src/libcamera/proxy/ipa_proxy_linux.cpp\n> > > > > index 4e6fa6899e07..d4ccf5112cd7 100644\n> > > > > --- a/src/libcamera/proxy/ipa_proxy_linux.cpp\n> > > > > +++ b/src/libcamera/proxy/ipa_proxy_linux.cpp\n> > > > > @@ -27,11 +27,11 @@ public:\n> > > > >  \t~IPAProxyLinux();\n> > > > >\n> > > > >  \tint init() override { return 0; }\n> > > > > -\tvoid configure(const std::map<unsigned int, IPAStream> &streamConfig,\n> > > > > -\t\t       const std::map<unsigned int, ControlInfoMap> &entityControls) override {}\n> > > > > -\tvoid mapBuffers(const std::vector<IPABuffer> &buffers) override {}\n> > > > > -\tvoid unmapBuffers(const std::vector<unsigned int> &ids) override {}\n> > > > > -\tvoid processEvent(const IPAOperationData &event) override {}\n> > > > > +\tvoid configure(const std::map<unsigned int, IPAStream> & /*streamConfig*/,\n> > > > > +\t\t       const std::map<unsigned int, ControlInfoMap> & /*entityControls*/) override {}\n> > > > > +\tvoid mapBuffers(const std::vector<IPABuffer> & /*buffers*/) override {}\n> > > > > +\tvoid unmapBuffers(const std::vector<unsigned int> & /*ids*/) override {}\n> > > > > +\tvoid processEvent(const IPAOperationData & /*event*/) override {}\n> > > > >\n> > > > >  private:\n> > > > >  \tvoid readyRead(IPCUnixSocket *ipc);\n> > > > > @@ -86,7 +86,7 @@ IPAProxyLinux::~IPAProxyLinux()\n> > > > >  \tdelete socket_;\n> > > > >  }\n> > > > >\n> > > > > -void IPAProxyLinux::readyRead(IPCUnixSocket *ipc)\n> > > > > +void IPAProxyLinux::readyRead(IPCUnixSocket * /*ipc*/)\n> > > > >  {\n> > > > >  }\n> > > > >\n> > > > > diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp\n> > > > > index 208ab54199b1..87d810d7cfa4 100644\n> > > > > --- a/src/libcamera/v4l2_videodevice.cpp\n> > > > > +++ b/src/libcamera/v4l2_videodevice.cpp\n> > > > > @@ -1141,7 +1141,7 @@ Buffer *V4L2VideoDevice::dequeueBuffer()\n> > > > >   * For Capture video devices the Buffer will contain valid data.\n> > > > >   * For Output video devices the Buffer can be considered empty.\n> > > > >   */\n> > > > > -void V4L2VideoDevice::bufferAvailable(EventNotifier *notifier)\n> > > > > +void V4L2VideoDevice::bufferAvailable(EventNotifier * /*notifier*/)\n> > > > >  {\n> > > > >  \tBuffer *buffer = dequeueBuffer();\n> > > > >  \tif (!buffer)\n> > > > > diff --git a/src/qcam/main.cpp b/src/qcam/main.cpp\n> > > > > index a7ff5c52663b..d8cfc1c3d76b 100644\n> > > > > --- a/src/qcam/main.cpp\n> > > > > +++ b/src/qcam/main.cpp\n> > > > > @@ -17,7 +17,7 @@\n> > > > >  #include \"../cam/options.h\"\n> > > > >  #include \"qt_event_dispatcher.h\"\n> > > > >\n> > > > > -void signalHandler(int signal)\n> > > > > +void signalHandler(int /*signal*/)\n> > > > >  {\n> > > > >  \tstd::cout << \"Exiting\" << std::endl;\n> > > > >  \tqApp->quit();\n> > > > > diff --git a/test/camera/capture.cpp b/test/camera/capture.cpp\n> > > > > index 791ccad15f70..a5fd0a641705 100644\n> > > > > --- a/test/camera/capture.cpp\n> > > > > +++ b/test/camera/capture.cpp\n> > > > > @@ -19,7 +19,7 @@ protected:\n> > > > >  \tunsigned int completeBuffersCount_;\n> > > > >  \tunsigned int completeRequestsCount_;\n> > > > >\n> > > > > -\tvoid bufferComplete(Request *request, Buffer *buffer)\n> > > > > +\tvoid bufferComplete(Request * /*request*/, Buffer *buffer)\n> > > > >  \t{\n> > > > >  \t\tif (buffer->status() != Buffer::BufferSuccess)\n> > > > >  \t\t\treturn;\n> > > > > diff --git a/test/libtest/test.h b/test/libtest/test.h\n> > > > > index ec08bf97c03d..193d7aa99f38 100644\n> > > > > --- a/test/libtest/test.h\n> > > > > +++ b/test/libtest/test.h\n> > > > > @@ -26,11 +26,11 @@ public:\n> > > > >  protected:\n> > > > >  \tvirtual int init() { return 0; }\n> > > > >  \tvirtual int run() = 0;\n> > > > > -\tvirtual void cleanup() { }\n> > > > > +\tvirtual void cleanup() {}\n> > > > >  };\n> > > > >\n> > > > >  #define TEST_REGISTER(klass)\t\t\t\t\t\t\\\n> > > > > -int main(int argc, char *argv[])\t\t\t\t\t\\\n> > > > > +int main(int /*argc*/, char * /*argv*/[])\t\t\t\t\\\n> > > > >  {\t\t\t\t\t\t\t\t\t\\\n> > > > >  \treturn klass().execute();\t\t\t\t\t\\\n> > > > >  }\n> > > > > diff --git a/test/log/log_process.cpp b/test/log/log_process.cpp\n> > > > > index 2df4aa43713c..fa5639dde7cb 100644\n> > > > > --- a/test/log/log_process.cpp\n> > > > > +++ b/test/log/log_process.cpp\n> > > > > @@ -123,7 +123,8 @@ protected:\n> > > > >  \t}\n> > > > >\n> > > > >  private:\n> > > > > -\tvoid procFinished(Process *proc, enum Process::ExitStatus exitStatus, int exitCode)\n> > > > > +\tvoid procFinished(Process * /*proc*/,\n> > > > > +\t\t\t  enum Process::ExitStatus exitStatus, int exitCode)\n> > > > >  \t{\n> > > > >  \t\texitStatus_ = exitStatus;\n> > > > >  \t\texitCode_ = exitCode;\n> > > > > diff --git a/test/message.cpp b/test/message.cpp\n> > > > > index 3775c30a20b3..3e2659c836e3 100644\n> > > > > --- a/test/message.cpp\n> > > > > +++ b/test/message.cpp\n> > > > > @@ -35,7 +35,7 @@ public:\n> > > > >  \tvoid reset() { status_ = NoMessage; }\n> > > > >\n> > > > >  protected:\n> > > > > -\tvoid message(Message *msg)\n> > > > > +\tvoid message(Message * /*msg*/)\n> > > > >  \t{\n> > > > >  \t\tif (thread() != Thread::current())\n> > > > >  \t\t\tstatus_ = InvalidThread;\n> > > > > diff --git a/test/process/process_test.cpp b/test/process/process_test.cpp\n> > > > > index 7e7b3c2c8bf3..2ba3efd08457 100644\n> > > > > --- a/test/process/process_test.cpp\n> > > > > +++ b/test/process/process_test.cpp\n> > > > > @@ -75,7 +75,8 @@ protected:\n> > > > >  \t}\n> > > > >\n> > > > >  private:\n> > > > > -\tvoid procFinished(Process *proc, enum Process::ExitStatus exitStatus, int exitCode)\n> > > > > +\tvoid procFinished(Process * /*proc*/,\n> > > > > +\t\t\t  enum Process::ExitStatus exitStatus, int exitCode)\n> > > > >  \t{\n> > > > >  \t\texitStatus_ = exitStatus;\n> > > > >  \t\texitCode_ = exitCode;\n> > > > > diff --git a/test/timer-thread.cpp b/test/timer-thread.cpp\n> > > > > index 32853b4e80ef..55b7abcbbeab 100644\n> > > > > --- a/test/timer-thread.cpp\n> > > > > +++ b/test/timer-thread.cpp\n> > > > > @@ -39,7 +39,7 @@ public:\n> > > > >  \t}\n> > > > >\n> > > > >  private:\n> > > > > -\tvoid timeoutHandler(Timer *timer)\n> > > > > +\tvoid timeoutHandler(Timer * /*timer*/)\n> > > > >  \t{\n> > > > >  \t\ttimeout_ = true;\n> > > > >  \t}\n> > > > > diff --git a/test/timer.cpp b/test/timer.cpp\n> > > > > index 2bdb006edccb..03df03aa8d69 100644\n> > > > > --- a/test/timer.cpp\n> > > > > +++ b/test/timer.cpp\n> > > > > @@ -56,7 +56,7 @@ public:\n> > > > >  \t}\n> > > > >\n> > > > >  private:\n> > > > > -\tvoid timeoutHandler(Timer *timer)\n> > > > > +\tvoid timeoutHandler(Timer * /*timer*/)\n> > > > >  \t{\n> > > > >  \t\texpiration_ = std::chrono::steady_clock::now();\n> > > > >  \t\tcount_++;\n> > > > >\n> >\n> > --\n> > Regards,\n> >\n> > Laurent Pinchart\n> > _______________________________________________\n> > libcamera-devel mailing list\n> > libcamera-devel@lists.libcamera.org\n> > https://lists.libcamera.org/listinfo/libcamera-devel\n\n\n\n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel","headers":{"Return-Path":"<jacopo@jmondi.org>","Received":["from relay10.mail.gandi.net (relay10.mail.gandi.net\n\t[217.70.178.230])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7CDDB60F1C\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 18 Nov 2019 22:51:08 +0100 (CET)","from uno.localdomain (2-224-242-101.ip172.fastwebnet.it\n\t[2.224.242.101]) (Authenticated sender: jacopo@jmondi.org)\n\tby relay10.mail.gandi.net (Postfix) with ESMTPSA id DECDC24000F;\n\tMon, 18 Nov 2019 21:51:06 +0000 (UTC)"],"Date":"Mon, 18 Nov 2019 22:53:04 +0100","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20191118215304.xccnnvzx2p3bwb6z@uno.localdomain>","References":"<20191026213835.15110-1-laurent.pinchart@ideasonboard.com>\n\t<34810c55-0226-253c-56ff-9a756ee5f997@ideasonboard.com>\n\t<20191028103544.GA14017@pendragon.ideasonboard.com>\n\t<20191108194227.GA1058@pendragon.ideasonboard.com>\n\t<20191109103135.s326tbuehyx4mnng@uno.localdomain>","MIME-Version":"1.0","Content-Type":"multipart/signed; micalg=pgp-sha256;\n\tprotocol=\"application/pgp-signature\"; boundary=\"dpyi36xapxmpag7n\"","Content-Disposition":"inline","In-Reply-To":"<20191109103135.s326tbuehyx4mnng@uno.localdomain>","User-Agent":"NeoMutt/20180716","Subject":"Re: [libcamera-devel] [PATCH/RFC] meson: Remove\n\t-Wno-unused-parameter","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Mon, 18 Nov 2019 21:51:08 -0000"}},{"id":3099,"web_url":"https://patchwork.libcamera.org/comment/3099/","msgid":"<c0de3171-2356-ba13-0e69-dbd63e603896@ideasonboard.com>","date":"2019-11-19T13:35:41","subject":"Re: [libcamera-devel] [PATCH/RFC] meson: Remove\n\t-Wno-unused-parameter","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Hi All,\n\nOn 18/11/2019 21:53, Jacopo Mondi wrote:\n> Hi Laurent,\n> \n> On Sat, Nov 09, 2019 at 11:31:35AM +0100, Jacopo Mondi wrote:\n>> Hi Laurent,\n>>\n> \n> Sorry, I forgot to add my tag\n> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>\n> \n> Thanks\n>   j\n> \n>> On Fri, Nov 08, 2019 at 09:42:27PM +0200, Laurent Pinchart wrote:\n>>> Hello everybody,\n>>>\n>>> On Mon, Oct 28, 2019 at 12:35:44PM +0200, Laurent Pinchart wrote:\n>>>> On Mon, Oct 28, 2019 at 09:32:14AM +0000, Kieran Bingham wrote:\n>>>>> On 26/10/2019 22:38, Laurent Pinchart wrote:\n>>>>>> We build libcamera with -Wno-unused-parameter and this doesn't cause\n>>>>>> much issue internally. However, it prevents catching unused parameters\n>>>>>> in inline functions defined in public headers. This can lead to\n>>>>>> compilation warnings for applications compiled without\n>>>>>> -Wno-unused-parameter.\n>>>>>>\n>>>>>> To catch those issues, remove -Wno-unused-parameter and fix all the\n>>>>>> related warnings.\n>>>>>\n>>>>> What's your opinion on defining an unused(variable) (named otherwise if\n>>>>> required) macro so that we can declare unused variables in the code\n>>>>> base, and keep the function prototypes clean?\n>>>>>\n>>>>> i.e.\n>>>>>\n>>>>> #define unused(_x) (void)(_x)\n>>>>>\n>>>>>  ControlValue ControlValue::load(ByteStreamBuffer &b, ControlType type,\n>>>>>                                 unsigned int count)\n>>>>>  {\n>>>>> +       unused(count);\n>>>>> +\n>>>>>         switch (type) {\n>>>>>         case ControlTypeBool: {\n>>>>>                 bool value;\n>>>>>   ...\n>>>>>  }\n>>>>>\n>>>>> I think something like that would allow cleaner function declarations,\n>>>>> that do not need to be modified once someone actually uses the variable\n>>>>> in question. Simply remove the 'unused' declaration ?\n>>>>\n>>>> I'm afraid I don't like that :-) First of all, compilers may not always\n>>>> be fooled by that particular implementation, and we'll play a game of\n>>>> whack-a-mole as new compiler versions are released. Then, removing the\n>>>> variable name is specified by the C++ standard as the official way to\n>>>> note that a variable is unused. I don't think we should use a different,\n>>>> non-standard implementation.\n\nFor clarification - I fully agree that removing -Wno-unused-parameter is\na good thing. I'm very much a -Wall -Wextra -Werror kind of guy. Fix all\nthe warnings, before someone else has to, and don't cause warnings for\nother people.\n\n\nIn terms of style, I am not fond of changing the function prototype, so\nhere's a last ditch effort of suggesting an alternate Unused()\ndefinition type based on templates which I think should always work?\n(Because the argument is used, but optimised out)\n\n\nFrom: https://stackoverflow.com/a/39746834/3660427\n\ntemplate <typename T>\nvoid Unused(T&& /*No name*/) { /*Empty*/ }\n\nvoid func(int i)\n{\n   Unused(i); // Silent warning for unused variable\n}\n\n\nAnd that's purely because I believe it's cleaner to remove the Unused()\nline when you want to then /use/ that variable rather than modify the\nfunction prototype.\n\nBut - I'll not nack this patch based on that.\n\nIt's a shame that adding the name in via comments adds too many *'s though:\n\n> -static int hal_open_legacy(const struct hw_module_t *module, const char *id,\n> -\t\t\t   uint32_t halVersion, struct hw_device_t **device)\n> +static int hal_open_legacy(const struct hw_module_t * /*module*/,\n> +\t\t\t   const char * /*id*/, uint32_t /*halVersion*/,\n> +\t\t\t   struct hw_device_t ** /*device*/)\n\nI fear the /*device*/ reduces readability (IMO), but if you believe this\nis the best way to solve the topic, then:\n\nAcked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n\n\n\n>>>>\n>>>> This patch stems from a warning generated when compiling a small test\n>>>> code against libcamera out of the libcamera source tree, without\n>>>> -Wno-unused-parameter. It turns out we had a single issue in public\n>>>> headers, so we will likely not introduce other such issues in the\n>>>> headers very often. We could thus decide not to care about it and catch\n>>>> the issues when they are reported. I however think there's value in\n>>>> dropping the compiler option though (otherwise I wouldn't have sent this\n>>>> patch in the first place :-)).\n>>>\n>>> Ping ? I'd like to reach a consensus on this and decide if we should\n>>> drop the patch (and thus live with the small but real risk that\n>>> applications that use -Wunused-parameters would get a build warning) or\n>>> keep it, in this form or another.\n>>>\n>>\n>> I think the priority here is to make sure applications do not get\n>> warnings when building with -Wunused-parameters, so I'm finw with\n>> either removing the parameter's name completely from the function\n>> definition or commenting it out, which I like less but mostly because\n>> of how it looks, so I'm fine with both, as long as we make sure\n>> applications do not get warnings...\n>>\n>> Thanks\n>>   j\n>>\n>>>>>> Fix an additional checkstyle.py error while at it.\n>>>>>>\n>>>>>> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n>>>>>> ---\n>>>>>>  meson.build                                |  1 -\n>>>>>>  src/android/camera3_hal.cpp                |  9 +++++----\n>>>>>>  src/android/camera_device.cpp              |  4 ++--\n>>>>>>  src/android/camera_proxy.cpp               |  4 ++--\n>>>>>>  src/cam/main.cpp                           |  2 +-\n>>>>>>  src/ipa/ipa_vimc.cpp                       | 10 +++++-----\n>>>>>>  src/ipa/rkisp1/rkisp1.cpp                  |  2 +-\n>>>>>>  src/libcamera/device_enumerator_udev.cpp   |  2 +-\n>>>>>>  src/libcamera/ipc_unixsocket.cpp           |  2 +-\n>>>>>>  src/libcamera/pipeline/ipu3/ipu3.cpp       |  2 +-\n>>>>>>  src/libcamera/pipeline/rkisp1/rkisp1.cpp   |  2 +-\n>>>>>>  src/libcamera/pipeline/rkisp1/timeline.cpp |  2 +-\n>>>>>>  src/libcamera/pipeline/uvcvideo.cpp        |  2 +-\n>>>>>>  src/libcamera/pipeline/vimc.cpp            |  4 ++--\n>>>>>>  src/libcamera/process.cpp                  |  2 +-\n>>>>>>  src/libcamera/proxy/ipa_proxy_linux.cpp    | 12 ++++++------\n>>>>>>  src/libcamera/v4l2_videodevice.cpp         |  2 +-\n>>>>>>  src/qcam/main.cpp                          |  2 +-\n>>>>>>  test/camera/capture.cpp                    |  2 +-\n>>>>>>  test/libtest/test.h                        |  4 ++--\n>>>>>>  test/log/log_process.cpp                   |  3 ++-\n>>>>>>  test/message.cpp                           |  2 +-\n>>>>>>  test/process/process_test.cpp              |  3 ++-\n>>>>>>  test/timer-thread.cpp                      |  2 +-\n>>>>>>  test/timer.cpp                             |  2 +-\n>>>>>>  25 files changed, 43 insertions(+), 41 deletions(-)\n>>>>>>\n>>>>>> diff --git a/meson.build b/meson.build\n>>>>>> index 72ad7c8b493b..19a921a8ba6a 100644\n>>>>>> --- a/meson.build\n>>>>>> +++ b/meson.build\n>>>>>> @@ -31,7 +31,6 @@ if cc.has_header_symbol('stdlib.h', 'secure_getenv', prefix : '#define _GNU_SOUR\n>>>>>>  endif\n>>>>>>\n>>>>>>  common_arguments = [\n>>>>>> -    '-Wno-unused-parameter',\n>>>>>>      '-include', 'config.h',\n>>>>>>  ]\n>>>>>>\n>>>>>> diff --git a/src/android/camera3_hal.cpp b/src/android/camera3_hal.cpp\n>>>>>> index 8d2629ca356c..a7f470172583 100644\n>>>>>> --- a/src/android/camera3_hal.cpp\n>>>>>> +++ b/src/android/camera3_hal.cpp\n>>>>>> @@ -31,18 +31,19 @@ static int hal_get_camera_info(int id, struct camera_info *info)\n>>>>>>  \treturn cameraManager.getCameraInfo(id, info);\n>>>>>>  }\n>>>>>>\n>>>>>> -static int hal_set_callbacks(const camera_module_callbacks_t *callbacks)\n>>>>>> +static int hal_set_callbacks(const camera_module_callbacks_t * /*callbacks*/)\n>>>>>>  {\n>>>>>>  \treturn 0;\n>>>>>>  }\n>>>>>>\n>>>>>> -static int hal_open_legacy(const struct hw_module_t *module, const char *id,\n>>>>>> -\t\t\t   uint32_t halVersion, struct hw_device_t **device)\n>>>>>> +static int hal_open_legacy(const struct hw_module_t * /*module*/,\n>>>>>> +\t\t\t   const char * /*id*/, uint32_t /*halVersion*/,\n>>>>>> +\t\t\t   struct hw_device_t ** /*device*/)\n>>>>>>  {\n>>>>>>  \treturn -ENOSYS;\n>>>>>>  }\n>>>>>>\n>>>>>> -static int hal_set_torch_mode(const char *camera_id, bool enabled)\n>>>>>> +static int hal_set_torch_mode(const char * /*camera_id*/, bool /*enabled*/)\n>>>>>>  {\n>>>>>>  \treturn -ENOSYS;\n>>>>>>  }\n>>>>>> diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\n>>>>>> index c7c9b3fd1724..b0ba1cf0a921 100644\n>>>>>> --- a/src/android/camera_device.cpp\n>>>>>> +++ b/src/android/camera_device.cpp\n>>>>>> @@ -49,7 +49,7 @@ CameraDevice::Camera3RequestDescriptor::~Camera3RequestDescriptor()\n>>>>>>   * to the framework using the designated callbacks.\n>>>>>>   */\n>>>>>>\n>>>>>> -CameraDevice::CameraDevice(unsigned int id, const std::shared_ptr<Camera> &camera)\n>>>>>> +CameraDevice::CameraDevice(unsigned int /*id*/, const std::shared_ptr<Camera> &camera)\n>>>>>>  \t: running_(false), camera_(camera), staticMetadata_(nullptr)\n>>>>>>  {\n>>>>>>  \tcamera_->requestCompleted.connect(this, &CameraDevice::requestComplete);\n>>>>>> @@ -875,7 +875,7 @@ void CameraDevice::notifyError(uint32_t frameNumber, camera3_stream_t *stream)\n>>>>>>  /*\n>>>>>>   * Produce a set of fixed result metadata.\n>>>>>>   */\n>>>>>> -std::unique_ptr<CameraMetadata> CameraDevice::getResultMetadata(int frame_number,\n>>>>>> +std::unique_ptr<CameraMetadata> CameraDevice::getResultMetadata(int /*frame_number*/,\n>>>>>>  \t\t\t\t\t\t\t\tint64_t timestamp)\n>>>>>>  {\n>>>>>>  \t/*\n>>>>>> diff --git a/src/android/camera_proxy.cpp b/src/android/camera_proxy.cpp\n>>>>>> index 4f5c0a024903..c9f98c784eec 100644\n>>>>>> --- a/src/android/camera_proxy.cpp\n>>>>>> +++ b/src/android/camera_proxy.cpp\n>>>>>> @@ -79,11 +79,11 @@ static int hal_dev_process_capture_request(const struct camera3_device *dev,\n>>>>>>  \treturn proxy->processCaptureRequest(request);\n>>>>>>  }\n>>>>>>\n>>>>>> -static void hal_dev_dump(const struct camera3_device *dev, int fd)\n>>>>>> +static void hal_dev_dump(const struct camera3_device * /*dev*/, int /*fd*/)\n>>>>>>  {\n>>>>>>  }\n>>>>>>\n>>>>>> -static int hal_dev_flush(const struct camera3_device *dev)\n>>>>>> +static int hal_dev_flush(const struct camera3_device * /*dev*/)\n>>>>>>  {\n>>>>>>  \treturn 0;\n>>>>>>  }\n>>>>>> diff --git a/src/cam/main.cpp b/src/cam/main.cpp\n>>>>>> index 9d99f5587cbb..ceb0efeff045 100644\n>>>>>> --- a/src/cam/main.cpp\n>>>>>> +++ b/src/cam/main.cpp\n>>>>>> @@ -326,7 +326,7 @@ int CamApp::run()\n>>>>>>  \treturn 0;\n>>>>>>  }\n>>>>>>\n>>>>>> -void signalHandler(int signal)\n>>>>>> +void signalHandler(int /*signal*/)\n>>>>>>  {\n>>>>>>  \tstd::cout << \"Exiting\" << std::endl;\n>>>>>>  \tCamApp::instance()->quit();\n>>>>>> diff --git a/src/ipa/ipa_vimc.cpp b/src/ipa/ipa_vimc.cpp\n>>>>>> index 63d578b4e2aa..16c7e0732d40 100644\n>>>>>> --- a/src/ipa/ipa_vimc.cpp\n>>>>>> +++ b/src/ipa/ipa_vimc.cpp\n>>>>>> @@ -30,11 +30,11 @@ public:\n>>>>>>  \t~IPAVimc();\n>>>>>>\n>>>>>>  \tint init() override;\n>>>>>> -\tvoid configure(const std::map<unsigned int, IPAStream> &streamConfig,\n>>>>>> -\t\t       const std::map<unsigned int, ControlInfoMap> &entityControls) override {}\n>>>>>> -\tvoid mapBuffers(const std::vector<IPABuffer> &buffers) override {}\n>>>>>> -\tvoid unmapBuffers(const std::vector<unsigned int> &ids) override {}\n>>>>>> -\tvoid processEvent(const IPAOperationData &event) override {}\n>>>>>> +\tvoid configure(const std::map<unsigned int, IPAStream> & /*streamConfig*/,\n>>>>>> +\t\t       const std::map<unsigned int, ControlInfoMap> & /*entityControls*/) override {}\n>>>>>> +\tvoid mapBuffers(const std::vector<IPABuffer> & /*buffers*/) override {}\n>>>>>> +\tvoid unmapBuffers(const std::vector<unsigned int> & /*ids*/) override {}\n>>>>>> +\tvoid processEvent(const IPAOperationData & /*event*/) override {}\n>>>>>>\n>>>>>>  private:\n>>>>>>  \tvoid initTrace();\n>>>>>> diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp\n>>>>>> index 9a13f5c7df17..84f270791340 100644\n>>>>>> --- a/src/ipa/rkisp1/rkisp1.cpp\n>>>>>> +++ b/src/ipa/rkisp1/rkisp1.cpp\n>>>>>> @@ -61,7 +61,7 @@ private:\n>>>>>>  \tuint32_t maxGain_;\n>>>>>>  };\n>>>>>>\n>>>>>> -void IPARkISP1::configure(const std::map<unsigned int, IPAStream> &streamConfig,\n>>>>>> +void IPARkISP1::configure(const std::map<unsigned int, IPAStream> & /*streamConfig*/,\n>>>>>>  \t\t\t  const std::map<unsigned int, ControlInfoMap> &entityControls)\n>>>>>>  {\n>>>>>>  \tif (entityControls.empty())\n>>>>>> diff --git a/src/libcamera/device_enumerator_udev.cpp b/src/libcamera/device_enumerator_udev.cpp\n>>>>>> index b2c5fd221dcd..6e0fbbd8c70c 100644\n>>>>>> --- a/src/libcamera/device_enumerator_udev.cpp\n>>>>>> +++ b/src/libcamera/device_enumerator_udev.cpp\n>>>>>> @@ -309,7 +309,7 @@ int DeviceEnumeratorUdev::addV4L2Device(dev_t devnum)\n>>>>>>  \treturn 0;\n>>>>>>  }\n>>>>>>\n>>>>>> -void DeviceEnumeratorUdev::udevNotify(EventNotifier *notifier)\n>>>>>> +void DeviceEnumeratorUdev::udevNotify(EventNotifier * /*notifier*/)\n>>>>>>  {\n>>>>>>  \tstruct udev_device *dev = udev_monitor_receive_device(monitor_);\n>>>>>>  \tstd::string action(udev_device_get_action(dev));\n>>>>>> diff --git a/src/libcamera/ipc_unixsocket.cpp b/src/libcamera/ipc_unixsocket.cpp\n>>>>>> index def08eef00f8..eb594268dd6c 100644\n>>>>>> --- a/src/libcamera/ipc_unixsocket.cpp\n>>>>>> +++ b/src/libcamera/ipc_unixsocket.cpp\n>>>>>> @@ -306,7 +306,7 @@ int IPCUnixSocket::recvData(void *buffer, size_t length,\n>>>>>>  \treturn 0;\n>>>>>>  }\n>>>>>>\n>>>>>> -void IPCUnixSocket::dataNotifier(EventNotifier *notifier)\n>>>>>> +void IPCUnixSocket::dataNotifier(EventNotifier * /*notifier*/)\n>>>>>>  {\n>>>>>>  \tint ret;\n>>>>>>\n>>>>>> diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\n>>>>>> index 8d3ad568d16e..84356646b736 100644\n>>>>>> --- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n>>>>>> +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n>>>>>> @@ -700,7 +700,7 @@ error:\n>>>>>>  }\n>>>>>>\n>>>>>>  int PipelineHandlerIPU3::freeBuffers(Camera *camera,\n>>>>>> -\t\t\t\t     const std::set<Stream *> &streams)\n>>>>>> +\t\t\t\t     const std::set<Stream *> & /*streams*/)\n>>>>>>  {\n>>>>>>  \tIPU3CameraData *data = cameraData(camera);\n>>>>>>\n>>>>>> diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n>>>>>> index 7a28b03b8d38..aed060bada70 100644\n>>>>>> --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n>>>>>> +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n>>>>>> @@ -703,7 +703,7 @@ int PipelineHandlerRkISP1::allocateBuffers(Camera *camera,\n>>>>>>  }\n>>>>>>\n>>>>>>  int PipelineHandlerRkISP1::freeBuffers(Camera *camera,\n>>>>>> -\t\t\t\t       const std::set<Stream *> &streams)\n>>>>>> +\t\t\t\t       const std::set<Stream *> & /*streams*/)\n>>>>>>  {\n>>>>>>  \tRkISP1CameraData *data = cameraData(camera);\n>>>>>>\n>>>>>> diff --git a/src/libcamera/pipeline/rkisp1/timeline.cpp b/src/libcamera/pipeline/rkisp1/timeline.cpp\n>>>>>> index f6c6434d7b53..59e6de78c79d 100644\n>>>>>> --- a/src/libcamera/pipeline/rkisp1/timeline.cpp\n>>>>>> +++ b/src/libcamera/pipeline/rkisp1/timeline.cpp\n>>>>>> @@ -204,7 +204,7 @@ void Timeline::updateDeadline()\n>>>>>>  \ttimer_.start(deadline);\n>>>>>>  }\n>>>>>>\n>>>>>> -void Timeline::timeout(Timer *timer)\n>>>>>> +void Timeline::timeout(Timer * /*timer*/)\n>>>>>>  {\n>>>>>>  \tutils::time_point now = std::chrono::steady_clock::now();\n>>>>>>\n>>>>>> diff --git a/src/libcamera/pipeline/uvcvideo.cpp b/src/libcamera/pipeline/uvcvideo.cpp\n>>>>>> index fae0ffc4de30..94464c7c7f0c 100644\n>>>>>> --- a/src/libcamera/pipeline/uvcvideo.cpp\n>>>>>> +++ b/src/libcamera/pipeline/uvcvideo.cpp\n>>>>>> @@ -208,7 +208,7 @@ int PipelineHandlerUVC::allocateBuffers(Camera *camera,\n>>>>>>  }\n>>>>>>\n>>>>>>  int PipelineHandlerUVC::freeBuffers(Camera *camera,\n>>>>>> -\t\t\t\t    const std::set<Stream *> &streams)\n>>>>>> +\t\t\t\t    const std::set<Stream *> & /*streams*/)\n>>>>>>  {\n>>>>>>  \tUVCCameraData *data = cameraData(camera);\n>>>>>>  \treturn data->video_->releaseBuffers();\n>>>>>> diff --git a/src/libcamera/pipeline/vimc.cpp b/src/libcamera/pipeline/vimc.cpp\n>>>>>> index c16ae4cb76b5..7e325469f178 100644\n>>>>>> --- a/src/libcamera/pipeline/vimc.cpp\n>>>>>> +++ b/src/libcamera/pipeline/vimc.cpp\n>>>>>> @@ -166,7 +166,7 @@ PipelineHandlerVimc::PipelineHandlerVimc(CameraManager *manager)\n>>>>>>  {\n>>>>>>  }\n>>>>>>\n>>>>>> -CameraConfiguration *PipelineHandlerVimc::generateConfiguration(Camera *camera,\n>>>>>> +CameraConfiguration *PipelineHandlerVimc::generateConfiguration(Camera * /*camera*/,\n>>>>>>  \tconst StreamRoles &roles)\n>>>>>>  {\n>>>>>>  \tCameraConfiguration *config = new VimcCameraConfiguration();\n>>>>>> @@ -274,7 +274,7 @@ int PipelineHandlerVimc::allocateBuffers(Camera *camera,\n>>>>>>  }\n>>>>>>\n>>>>>>  int PipelineHandlerVimc::freeBuffers(Camera *camera,\n>>>>>> -\t\t\t\t     const std::set<Stream *> &streams)\n>>>>>> +\t\t\t\t     const std::set<Stream *> & /*streams*/)\n>>>>>>  {\n>>>>>>  \tVimcCameraData *data = cameraData(camera);\n>>>>>>  \treturn data->video_->releaseBuffers();\n>>>>>> diff --git a/src/libcamera/process.cpp b/src/libcamera/process.cpp\n>>>>>> index 3b4d0f10da67..44ebfec178fe 100644\n>>>>>> --- a/src/libcamera/process.cpp\n>>>>>> +++ b/src/libcamera/process.cpp\n>>>>>> @@ -89,7 +89,7 @@ void sigact(int signal, siginfo_t *info, void *ucontext)\n>>>>>>\n>>>>>>  } /* namespace */\n>>>>>>\n>>>>>> -void ProcessManager::sighandler(EventNotifier *notifier)\n>>>>>> +void ProcessManager::sighandler(EventNotifier * /*notifier*/)\n>>>>>>  {\n>>>>>>  \tchar data;\n>>>>>>  \tssize_t ret = read(pipe_[0], &data, sizeof(data));\n>>>>>> diff --git a/src/libcamera/proxy/ipa_proxy_linux.cpp b/src/libcamera/proxy/ipa_proxy_linux.cpp\n>>>>>> index 4e6fa6899e07..d4ccf5112cd7 100644\n>>>>>> --- a/src/libcamera/proxy/ipa_proxy_linux.cpp\n>>>>>> +++ b/src/libcamera/proxy/ipa_proxy_linux.cpp\n>>>>>> @@ -27,11 +27,11 @@ public:\n>>>>>>  \t~IPAProxyLinux();\n>>>>>>\n>>>>>>  \tint init() override { return 0; }\n>>>>>> -\tvoid configure(const std::map<unsigned int, IPAStream> &streamConfig,\n>>>>>> -\t\t       const std::map<unsigned int, ControlInfoMap> &entityControls) override {}\n>>>>>> -\tvoid mapBuffers(const std::vector<IPABuffer> &buffers) override {}\n>>>>>> -\tvoid unmapBuffers(const std::vector<unsigned int> &ids) override {}\n>>>>>> -\tvoid processEvent(const IPAOperationData &event) override {}\n>>>>>> +\tvoid configure(const std::map<unsigned int, IPAStream> & /*streamConfig*/,\n>>>>>> +\t\t       const std::map<unsigned int, ControlInfoMap> & /*entityControls*/) override {}\n>>>>>> +\tvoid mapBuffers(const std::vector<IPABuffer> & /*buffers*/) override {}\n>>>>>> +\tvoid unmapBuffers(const std::vector<unsigned int> & /*ids*/) override {}\n>>>>>> +\tvoid processEvent(const IPAOperationData & /*event*/) override {}\n>>>>>>\n>>>>>>  private:\n>>>>>>  \tvoid readyRead(IPCUnixSocket *ipc);\n>>>>>> @@ -86,7 +86,7 @@ IPAProxyLinux::~IPAProxyLinux()\n>>>>>>  \tdelete socket_;\n>>>>>>  }\n>>>>>>\n>>>>>> -void IPAProxyLinux::readyRead(IPCUnixSocket *ipc)\n>>>>>> +void IPAProxyLinux::readyRead(IPCUnixSocket * /*ipc*/)\n>>>>>>  {\n>>>>>>  }\n>>>>>>\n>>>>>> diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp\n>>>>>> index 208ab54199b1..87d810d7cfa4 100644\n>>>>>> --- a/src/libcamera/v4l2_videodevice.cpp\n>>>>>> +++ b/src/libcamera/v4l2_videodevice.cpp\n>>>>>> @@ -1141,7 +1141,7 @@ Buffer *V4L2VideoDevice::dequeueBuffer()\n>>>>>>   * For Capture video devices the Buffer will contain valid data.\n>>>>>>   * For Output video devices the Buffer can be considered empty.\n>>>>>>   */\n>>>>>> -void V4L2VideoDevice::bufferAvailable(EventNotifier *notifier)\n>>>>>> +void V4L2VideoDevice::bufferAvailable(EventNotifier * /*notifier*/)\n>>>>>>  {\n>>>>>>  \tBuffer *buffer = dequeueBuffer();\n>>>>>>  \tif (!buffer)\n>>>>>> diff --git a/src/qcam/main.cpp b/src/qcam/main.cpp\n>>>>>> index a7ff5c52663b..d8cfc1c3d76b 100644\n>>>>>> --- a/src/qcam/main.cpp\n>>>>>> +++ b/src/qcam/main.cpp\n>>>>>> @@ -17,7 +17,7 @@\n>>>>>>  #include \"../cam/options.h\"\n>>>>>>  #include \"qt_event_dispatcher.h\"\n>>>>>>\n>>>>>> -void signalHandler(int signal)\n>>>>>> +void signalHandler(int /*signal*/)\n>>>>>>  {\n>>>>>>  \tstd::cout << \"Exiting\" << std::endl;\n>>>>>>  \tqApp->quit();\n>>>>>> diff --git a/test/camera/capture.cpp b/test/camera/capture.cpp\n>>>>>> index 791ccad15f70..a5fd0a641705 100644\n>>>>>> --- a/test/camera/capture.cpp\n>>>>>> +++ b/test/camera/capture.cpp\n>>>>>> @@ -19,7 +19,7 @@ protected:\n>>>>>>  \tunsigned int completeBuffersCount_;\n>>>>>>  \tunsigned int completeRequestsCount_;\n>>>>>>\n>>>>>> -\tvoid bufferComplete(Request *request, Buffer *buffer)\n>>>>>> +\tvoid bufferComplete(Request * /*request*/, Buffer *buffer)\n>>>>>>  \t{\n>>>>>>  \t\tif (buffer->status() != Buffer::BufferSuccess)\n>>>>>>  \t\t\treturn;\n>>>>>> diff --git a/test/libtest/test.h b/test/libtest/test.h\n>>>>>> index ec08bf97c03d..193d7aa99f38 100644\n>>>>>> --- a/test/libtest/test.h\n>>>>>> +++ b/test/libtest/test.h\n>>>>>> @@ -26,11 +26,11 @@ public:\n>>>>>>  protected:\n>>>>>>  \tvirtual int init() { return 0; }\n>>>>>>  \tvirtual int run() = 0;\n>>>>>> -\tvirtual void cleanup() { }\n>>>>>> +\tvirtual void cleanup() {}\n>>>>>>  };\n>>>>>>\n>>>>>>  #define TEST_REGISTER(klass)\t\t\t\t\t\t\\\n>>>>>> -int main(int argc, char *argv[])\t\t\t\t\t\\\n>>>>>> +int main(int /*argc*/, char * /*argv*/[])\t\t\t\t\\\n>>>>>>  {\t\t\t\t\t\t\t\t\t\\\n>>>>>>  \treturn klass().execute();\t\t\t\t\t\\\n>>>>>>  }\n>>>>>> diff --git a/test/log/log_process.cpp b/test/log/log_process.cpp\n>>>>>> index 2df4aa43713c..fa5639dde7cb 100644\n>>>>>> --- a/test/log/log_process.cpp\n>>>>>> +++ b/test/log/log_process.cpp\n>>>>>> @@ -123,7 +123,8 @@ protected:\n>>>>>>  \t}\n>>>>>>\n>>>>>>  private:\n>>>>>> -\tvoid procFinished(Process *proc, enum Process::ExitStatus exitStatus, int exitCode)\n>>>>>> +\tvoid procFinished(Process * /*proc*/,\n>>>>>> +\t\t\t  enum Process::ExitStatus exitStatus, int exitCode)\n>>>>>>  \t{\n>>>>>>  \t\texitStatus_ = exitStatus;\n>>>>>>  \t\texitCode_ = exitCode;\n>>>>>> diff --git a/test/message.cpp b/test/message.cpp\n>>>>>> index 3775c30a20b3..3e2659c836e3 100644\n>>>>>> --- a/test/message.cpp\n>>>>>> +++ b/test/message.cpp\n>>>>>> @@ -35,7 +35,7 @@ public:\n>>>>>>  \tvoid reset() { status_ = NoMessage; }\n>>>>>>\n>>>>>>  protected:\n>>>>>> -\tvoid message(Message *msg)\n>>>>>> +\tvoid message(Message * /*msg*/)\n>>>>>>  \t{\n>>>>>>  \t\tif (thread() != Thread::current())\n>>>>>>  \t\t\tstatus_ = InvalidThread;\n>>>>>> diff --git a/test/process/process_test.cpp b/test/process/process_test.cpp\n>>>>>> index 7e7b3c2c8bf3..2ba3efd08457 100644\n>>>>>> --- a/test/process/process_test.cpp\n>>>>>> +++ b/test/process/process_test.cpp\n>>>>>> @@ -75,7 +75,8 @@ protected:\n>>>>>>  \t}\n>>>>>>\n>>>>>>  private:\n>>>>>> -\tvoid procFinished(Process *proc, enum Process::ExitStatus exitStatus, int exitCode)\n>>>>>> +\tvoid procFinished(Process * /*proc*/,\n>>>>>> +\t\t\t  enum Process::ExitStatus exitStatus, int exitCode)\n>>>>>>  \t{\n>>>>>>  \t\texitStatus_ = exitStatus;\n>>>>>>  \t\texitCode_ = exitCode;\n>>>>>> diff --git a/test/timer-thread.cpp b/test/timer-thread.cpp\n>>>>>> index 32853b4e80ef..55b7abcbbeab 100644\n>>>>>> --- a/test/timer-thread.cpp\n>>>>>> +++ b/test/timer-thread.cpp\n>>>>>> @@ -39,7 +39,7 @@ public:\n>>>>>>  \t}\n>>>>>>\n>>>>>>  private:\n>>>>>> -\tvoid timeoutHandler(Timer *timer)\n>>>>>> +\tvoid timeoutHandler(Timer * /*timer*/)\n>>>>>>  \t{\n>>>>>>  \t\ttimeout_ = true;\n>>>>>>  \t}\n>>>>>> diff --git a/test/timer.cpp b/test/timer.cpp\n>>>>>> index 2bdb006edccb..03df03aa8d69 100644\n>>>>>> --- a/test/timer.cpp\n>>>>>> +++ b/test/timer.cpp\n>>>>>> @@ -56,7 +56,7 @@ public:\n>>>>>>  \t}\n>>>>>>\n>>>>>>  private:\n>>>>>> -\tvoid timeoutHandler(Timer *timer)\n>>>>>> +\tvoid timeoutHandler(Timer * /*timer*/)\n>>>>>>  \t{\n>>>>>>  \t\texpiration_ = std::chrono::steady_clock::now();\n>>>>>>  \t\tcount_++;\n>>>>>>\n>>>\n>>> --\n>>> Regards,\n>>>\n>>> Laurent Pinchart\n>>> _______________________________________________\n>>> libcamera-devel mailing list\n>>> libcamera-devel@lists.libcamera.org\n>>> https://lists.libcamera.org/listinfo/libcamera-devel\n> \n> \n> \n>> _______________________________________________\n>> libcamera-devel mailing list\n>> libcamera-devel@lists.libcamera.org\n>> https://lists.libcamera.org/listinfo/libcamera-devel\n> \n> \n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel\n>","headers":{"Return-Path":"<kieran.bingham@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 458AA60BC2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 19 Nov 2019 14:35:45 +0100 (CET)","from [192.168.0.20]\n\t(cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 81FBF311;\n\tTue, 19 Nov 2019 14:35:44 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1574170544;\n\tbh=hK+KTO1Lvzbwbxxg+cxm3bihaYQIuEW6fWhRCN7MLMg=;\n\th=Reply-To:Subject:To:Cc:References:From:Date:In-Reply-To:From;\n\tb=DibiBfiJJFepkrhSQkGgQMuyjzWAmzH6kAq7sIo/pG6lnPpIKjFE034ngSLEWmATJ\n\tnLXfhFqPIQOtQlwMXS9Q4cVZO/NoMDtND0hA6RxUdzGZ/Bx/lfvR31WbSBUEy61jkJ\n\t+infHcwacelNzWeEOJiLgJ6vx3JS7gBMXsSBBreQ=","Reply-To":"kieran.bingham@ideasonboard.com","To":"Jacopo Mondi <jacopo@jmondi.org>,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","References":"<20191026213835.15110-1-laurent.pinchart@ideasonboard.com>\n\t<34810c55-0226-253c-56ff-9a756ee5f997@ideasonboard.com>\n\t<20191028103544.GA14017@pendragon.ideasonboard.com>\n\t<20191108194227.GA1058@pendragon.ideasonboard.com>\n\t<20191109103135.s326tbuehyx4mnng@uno.localdomain>\n\t<20191118215304.xccnnvzx2p3bwb6z@uno.localdomain>","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Openpgp":"preference=signencrypt","Autocrypt":"addr=kieran.bingham@ideasonboard.com; keydata=\n\tmQINBFYE/WYBEACs1PwjMD9rgCu1hlIiUA1AXR4rv2v+BCLUq//vrX5S5bjzxKAryRf0uHat\n\tV/zwz6hiDrZuHUACDB7X8OaQcwhLaVlq6byfoBr25+hbZG7G3+5EUl9cQ7dQEdvNj6V6y/SC\n\trRanWfelwQThCHckbobWiQJfK9n7rYNcPMq9B8e9F020LFH7Kj6YmO95ewJGgLm+idg1Kb3C\n\tpotzWkXc1xmPzcQ1fvQMOfMwdS+4SNw4rY9f07Xb2K99rjMwZVDgESKIzhsDB5GY465sCsiQ\n\tcSAZRxqE49RTBq2+EQsbrQpIc8XiffAB8qexh5/QPzCmR4kJgCGeHIXBtgRj+nIkCJPZvZtf\n\tKr2EAbc6tgg6DkAEHJb+1okosV09+0+TXywYvtEop/WUOWQ+zo+Y/OBd+8Ptgt1pDRyOBzL8\n\tRXa8ZqRf0Mwg75D+dKntZeJHzPRJyrlfQokngAAs4PaFt6UfS+ypMAF37T6CeDArQC41V3ko\n\tlPn1yMsVD0p+6i3DPvA/GPIksDC4owjnzVX9kM8Zc5Cx+XoAN0w5Eqo4t6qEVbuettxx55gq\n\t8K8FieAjgjMSxngo/HST8TpFeqI5nVeq0/lqtBRQKumuIqDg+Bkr4L1V/PSB6XgQcOdhtd36\n\tOe9X9dXB8YSNt7VjOcO7BTmFn/Z8r92mSAfHXpb07YJWJosQOQARAQABtDBLaWVyYW4gQmlu\n\tZ2hhbSA8a2llcmFuLmJpbmdoYW1AaWRlYXNvbmJvYXJkLmNvbT6JAlcEEwEKAEECGwMFCwkI\n\tBwIGFQgJCgsCBBYCAwECHgECF4ACGQEWIQSQLdeYP70o/eNy1HqhHkZyEKRh/QUCXWTtygUJ\n\tCyJXZAAKCRChHkZyEKRh/f8dEACTDsbLN2nioNZMwyLuQRUAFcXNolDX48xcUXsWS2QjxaPm\n\tVsJx8Uy8aYkS85mdPBh0C83OovQR/OVbr8AxhGvYqBs3nQvbWuTl/+4od7DfK2VZOoKBAu5S\n\tQK2FYuUcikDqYcFWJ8DQnubxfE8dvzojHEkXw0sA4igINHDDFX3HJGZtLio+WpEFQtCbfTAG\n\tYZslasz1YZRbwEdSsmO3/kqy5eMnczlm8a21A3fKUo3g8oAZEFM+f4DUNzqIltg31OAB/kZS\n\tenKZQ/SWC8PmLg/ZXBrReYakxXtkP6w3FwMlzOlhGxqhIRNiAJfXJBaRhuUWzPOpEDE9q5YJ\n\tBmqQL2WJm1VSNNVxbXJHpaWMH1sA2R00vmvRrPXGwyIO0IPYeUYQa3gsy6k+En/aMQJd27dp\n\taScf9am9PFICPY5T4ppneeJLif2lyLojo0mcHOV+uyrds9XkLpp14GfTkeKPdPMrLLTsHRfH\n\tfA4I4OBpRrEPiGIZB/0im98MkGY/Mu6qxeZmYLCcgD6qz4idOvfgVOrNh+aA8HzIVR+RMW8H\n\tQGBN9f0E3kfwxuhl3omo6V7lDw8XOdmuWZNC9zPq1UfryVHANYbLGz9KJ4Aw6M+OgBC2JpkD\n\thXMdHUkC+d20dwXrwHTlrJi1YNp6rBc+xald3wsUPOZ5z8moTHUX/uPA/qhGsbkCDQRWBP1m\n\tARAAzijkb+Sau4hAncr1JjOY+KyFEdUNxRy+hqTJdJfaYihxyaj0Ee0P0zEi35CbE6lgU0Uz\n\ttih9fiUbSV3wfsWqg1Ut3/5rTKu7kLFp15kF7eqvV4uezXRD3Qu4yjv/rMmEJbbD4cTvGCYI\n\td6MDC417f7vK3hCbCVIZSp3GXxyC1LU+UQr3fFcOyCwmP9vDUR9JV0BSqHHxRDdpUXE26Dk6\n\tmhf0V1YkspE5St814ETXpEus2urZE5yJIUROlWPIL+hm3NEWfAP06vsQUyLvr/GtbOT79vXl\n\tEn1aulcYyu20dRRxhkQ6iILaURcxIAVJJKPi8dsoMnS8pB0QW12AHWuirPF0g6DiuUfPmrA5\n\tPKe56IGlpkjc8cO51lIxHkWTpCMWigRdPDexKX+Sb+W9QWK/0JjIc4t3KBaiG8O4yRX8ml2R\n\t+rxfAVKM6V769P/hWoRGdgUMgYHFpHGSgEt80OKK5HeUPy2cngDUXzwrqiM5Sz6Od0qw5pCk\n\tNlXqI0W/who0iSVM+8+RmyY0OEkxEcci7rRLsGnM15B5PjLJjh1f2ULYkv8s4SnDwMZ/kE04\n\t/UqCMK/KnX8pwXEMCjz0h6qWNpGwJ0/tYIgQJZh6bqkvBrDogAvuhf60Sogw+mH8b+PBlx1L\n\toeTK396wc+4c3BfiC6pNtUS5GpsPMMjYMk7kVvEAEQEAAYkCPAQYAQoAJgIbDBYhBJAt15g/\n\tvSj943LUeqEeRnIQpGH9BQJdizzIBQkLSKZiAAoJEKEeRnIQpGH9eYgQAJpjaWNgqNOnMTmD\n\tMJggbwjIotypzIXfhHNCeTkG7+qCDlSaBPclcPGYrTwCt0YWPU2TgGgJrVhYT20ierN8LUvj\n\t6qOPTd+Uk7NFzL65qkh80ZKNBFddx1AabQpSVQKbdcLb8OFs85kuSvFdgqZwgxA1vl4TFhNz\n\tPZ79NAmXLackAx3sOVFhk4WQaKRshCB7cSl+RIng5S/ThOBlwNlcKG7j7W2MC06BlTbdEkUp\n\tECzuuRBv8wX4OQl+hbWbB/VKIx5HKlLu1eypen/5lNVzSqMMIYkkZcjV2SWQyUGxSwq0O/sx\n\tS0A8/atCHUXOboUsn54qdxrVDaK+6jIAuo8JiRWctP16KjzUM7MO0/+4zllM8EY57rXrj48j\n\tsbEYX0YQnzaj+jO6kJtoZsIaYR7rMMq9aUAjyiaEZpmP1qF/2sYenDx0Fg2BSlLvLvXM0vU8\n\tpQk3kgDu7kb/7PRYrZvBsr21EIQoIjXbZxDz/o7z95frkP71EaICttZ6k9q5oxxA5WC6sTXc\n\tMW8zs8avFNuA9VpXt0YupJd2ijtZy2mpZNG02fFVXhIn4G807G7+9mhuC4XG5rKlBBUXTvPU\n\tAfYnB4JBDLmLzBFavQfvonSfbitgXwCG3vS+9HEwAjU30Bar1PEOmIbiAoMzuKeRm2LVpmq4\n\tWZw01QYHU/GUV/zHJSFk","Organization":"Ideas on Board","Message-ID":"<c0de3171-2356-ba13-0e69-dbd63e603896@ideasonboard.com>","Date":"Tue, 19 Nov 2019 13:35:41 +0000","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101\n\tThunderbird/60.9.0","MIME-Version":"1.0","In-Reply-To":"<20191118215304.xccnnvzx2p3bwb6z@uno.localdomain>","Content-Type":"text/plain; charset=windows-1252","Content-Language":"en-GB","Content-Transfer-Encoding":"8bit","Subject":"Re: [libcamera-devel] [PATCH/RFC] meson: Remove\n\t-Wno-unused-parameter","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Tue, 19 Nov 2019 13:35:45 -0000"}},{"id":3108,"web_url":"https://patchwork.libcamera.org/comment/3108/","msgid":"<20191119222503.GG17590@pendragon.ideasonboard.com>","date":"2019-11-19T22:25:03","subject":"Re: [libcamera-devel] [PATCH/RFC] meson: Remove\n\t-Wno-unused-parameter","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Kieran,\n\nOn Tue, Nov 19, 2019 at 01:35:41PM +0000, Kieran Bingham wrote:\n> On 18/11/2019 21:53, Jacopo Mondi wrote:\n> > On Sat, Nov 09, 2019 at 11:31:35AM +0100, Jacopo Mondi wrote:\n> >> Hi Laurent,\n> > \n> > Sorry, I forgot to add my tag\n> > Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>\n> > \n> >> On Fri, Nov 08, 2019 at 09:42:27PM +0200, Laurent Pinchart wrote:\n> >>> On Mon, Oct 28, 2019 at 12:35:44PM +0200, Laurent Pinchart wrote:\n> >>>> On Mon, Oct 28, 2019 at 09:32:14AM +0000, Kieran Bingham wrote:\n> >>>>> On 26/10/2019 22:38, Laurent Pinchart wrote:\n> >>>>>> We build libcamera with -Wno-unused-parameter and this doesn't cause\n> >>>>>> much issue internally. However, it prevents catching unused parameters\n> >>>>>> in inline functions defined in public headers. This can lead to\n> >>>>>> compilation warnings for applications compiled without\n> >>>>>> -Wno-unused-parameter.\n> >>>>>>\n> >>>>>> To catch those issues, remove -Wno-unused-parameter and fix all the\n> >>>>>> related warnings.\n> >>>>>\n> >>>>> What's your opinion on defining an unused(variable) (named otherwise if\n> >>>>> required) macro so that we can declare unused variables in the code\n> >>>>> base, and keep the function prototypes clean?\n> >>>>>\n> >>>>> i.e.\n> >>>>>\n> >>>>> #define unused(_x) (void)(_x)\n> >>>>>\n> >>>>>  ControlValue ControlValue::load(ByteStreamBuffer &b, ControlType type,\n> >>>>>                                 unsigned int count)\n> >>>>>  {\n> >>>>> +       unused(count);\n> >>>>> +\n> >>>>>         switch (type) {\n> >>>>>         case ControlTypeBool: {\n> >>>>>                 bool value;\n> >>>>>   ...\n> >>>>>  }\n> >>>>>\n> >>>>> I think something like that would allow cleaner function declarations,\n> >>>>> that do not need to be modified once someone actually uses the variable\n> >>>>> in question. Simply remove the 'unused' declaration ?\n> >>>>\n> >>>> I'm afraid I don't like that :-) First of all, compilers may not always\n> >>>> be fooled by that particular implementation, and we'll play a game of\n> >>>> whack-a-mole as new compiler versions are released. Then, removing the\n> >>>> variable name is specified by the C++ standard as the official way to\n> >>>> note that a variable is unused. I don't think we should use a different,\n> >>>> non-standard implementation.\n> \n> For clarification - I fully agree that removing -Wno-unused-parameter is\n> a good thing. I'm very much a -Wall -Wextra -Werror kind of guy. Fix all\n> the warnings, before someone else has to, and don't cause warnings for\n> other people.\n> \n> In terms of style, I am not fond of changing the function prototype, so\n> here's a last ditch effort of suggesting an alternate Unused()\n> definition type based on templates which I think should always work?\n> (Because the argument is used, but optimised out)\n> \n> \n> From: https://stackoverflow.com/a/39746834/3660427\n> \n> template <typename T>\n> void Unused(T&& /*No name*/) { /*Empty*/ }\n> \n> void func(int i)\n> {\n>    Unused(i); // Silent warning for unused variable\n> }\n> \n> \n> And that's purely because I believe it's cleaner to remove the Unused()\n> line when you want to then /use/ that variable rather than modify the\n> function prototype.\n> \n> But - I'll not nack this patch based on that.\n> \n> It's a shame that adding the name in via comments adds too many *'s though:\n> \n> > -static int hal_open_legacy(const struct hw_module_t *module, const char *id,\n> > -\t\t\t   uint32_t halVersion, struct hw_device_t **device)\n> > +static int hal_open_legacy(const struct hw_module_t * /*module*/,\n> > +\t\t\t   const char * /*id*/, uint32_t /*halVersion*/,\n> > +\t\t\t   struct hw_device_t ** /*device*/)\n> \n> I fear the /*device*/ reduces readability (IMO), but if you believe this\n> is the best way to solve the topic, then:\n> \n> Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\nThe part that bothers me with the Unused() function above is that C++\nprovides a standard way to state a parameter is unused, and using a\ndifferent method seems a bit of a hack to me. There's also a small risk\nthat new compiler versions could still produce a warning if they get too\nclever about our hacks :-S\n\nIf we want not to comment out parameter names we could use\n__attribute__((__unused__)), but I think that would be even less\nreadable.\n\n> >>>> This patch stems from a warning generated when compiling a small test\n> >>>> code against libcamera out of the libcamera source tree, without\n> >>>> -Wno-unused-parameter. It turns out we had a single issue in public\n> >>>> headers, so we will likely not introduce other such issues in the\n> >>>> headers very often. We could thus decide not to care about it and catch\n> >>>> the issues when they are reported. I however think there's value in\n> >>>> dropping the compiler option though (otherwise I wouldn't have sent this\n> >>>> patch in the first place :-)).\n> >>>\n> >>> Ping ? I'd like to reach a consensus on this and decide if we should\n> >>> drop the patch (and thus live with the small but real risk that\n> >>> applications that use -Wunused-parameters would get a build warning) or\n> >>> keep it, in this form or another.\n> >>\n> >> I think the priority here is to make sure applications do not get\n> >> warnings when building with -Wunused-parameters, so I'm finw with\n> >> either removing the parameter's name completely from the function\n> >> definition or commenting it out, which I like less but mostly because\n> >> of how it looks, so I'm fine with both, as long as we make sure\n> >> applications do not get warnings...\n> >>\n> >>>>>> Fix an additional checkstyle.py error while at it.\n> >>>>>>\n> >>>>>> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> >>>>>> ---\n> >>>>>>  meson.build                                |  1 -\n> >>>>>>  src/android/camera3_hal.cpp                |  9 +++++----\n> >>>>>>  src/android/camera_device.cpp              |  4 ++--\n> >>>>>>  src/android/camera_proxy.cpp               |  4 ++--\n> >>>>>>  src/cam/main.cpp                           |  2 +-\n> >>>>>>  src/ipa/ipa_vimc.cpp                       | 10 +++++-----\n> >>>>>>  src/ipa/rkisp1/rkisp1.cpp                  |  2 +-\n> >>>>>>  src/libcamera/device_enumerator_udev.cpp   |  2 +-\n> >>>>>>  src/libcamera/ipc_unixsocket.cpp           |  2 +-\n> >>>>>>  src/libcamera/pipeline/ipu3/ipu3.cpp       |  2 +-\n> >>>>>>  src/libcamera/pipeline/rkisp1/rkisp1.cpp   |  2 +-\n> >>>>>>  src/libcamera/pipeline/rkisp1/timeline.cpp |  2 +-\n> >>>>>>  src/libcamera/pipeline/uvcvideo.cpp        |  2 +-\n> >>>>>>  src/libcamera/pipeline/vimc.cpp            |  4 ++--\n> >>>>>>  src/libcamera/process.cpp                  |  2 +-\n> >>>>>>  src/libcamera/proxy/ipa_proxy_linux.cpp    | 12 ++++++------\n> >>>>>>  src/libcamera/v4l2_videodevice.cpp         |  2 +-\n> >>>>>>  src/qcam/main.cpp                          |  2 +-\n> >>>>>>  test/camera/capture.cpp                    |  2 +-\n> >>>>>>  test/libtest/test.h                        |  4 ++--\n> >>>>>>  test/log/log_process.cpp                   |  3 ++-\n> >>>>>>  test/message.cpp                           |  2 +-\n> >>>>>>  test/process/process_test.cpp              |  3 ++-\n> >>>>>>  test/timer-thread.cpp                      |  2 +-\n> >>>>>>  test/timer.cpp                             |  2 +-\n> >>>>>>  25 files changed, 43 insertions(+), 41 deletions(-)\n> >>>>>>\n> >>>>>> diff --git a/meson.build b/meson.build\n> >>>>>> index 72ad7c8b493b..19a921a8ba6a 100644\n> >>>>>> --- a/meson.build\n> >>>>>> +++ b/meson.build\n> >>>>>> @@ -31,7 +31,6 @@ if cc.has_header_symbol('stdlib.h', 'secure_getenv', prefix : '#define _GNU_SOUR\n> >>>>>>  endif\n> >>>>>>\n> >>>>>>  common_arguments = [\n> >>>>>> -    '-Wno-unused-parameter',\n> >>>>>>      '-include', 'config.h',\n> >>>>>>  ]\n> >>>>>>\n> >>>>>> diff --git a/src/android/camera3_hal.cpp b/src/android/camera3_hal.cpp\n> >>>>>> index 8d2629ca356c..a7f470172583 100644\n> >>>>>> --- a/src/android/camera3_hal.cpp\n> >>>>>> +++ b/src/android/camera3_hal.cpp\n> >>>>>> @@ -31,18 +31,19 @@ static int hal_get_camera_info(int id, struct camera_info *info)\n> >>>>>>  \treturn cameraManager.getCameraInfo(id, info);\n> >>>>>>  }\n> >>>>>>\n> >>>>>> -static int hal_set_callbacks(const camera_module_callbacks_t *callbacks)\n> >>>>>> +static int hal_set_callbacks(const camera_module_callbacks_t * /*callbacks*/)\n> >>>>>>  {\n> >>>>>>  \treturn 0;\n> >>>>>>  }\n> >>>>>>\n> >>>>>> -static int hal_open_legacy(const struct hw_module_t *module, const char *id,\n> >>>>>> -\t\t\t   uint32_t halVersion, struct hw_device_t **device)\n> >>>>>> +static int hal_open_legacy(const struct hw_module_t * /*module*/,\n> >>>>>> +\t\t\t   const char * /*id*/, uint32_t /*halVersion*/,\n> >>>>>> +\t\t\t   struct hw_device_t ** /*device*/)\n> >>>>>>  {\n> >>>>>>  \treturn -ENOSYS;\n> >>>>>>  }\n> >>>>>>\n> >>>>>> -static int hal_set_torch_mode(const char *camera_id, bool enabled)\n> >>>>>> +static int hal_set_torch_mode(const char * /*camera_id*/, bool /*enabled*/)\n> >>>>>>  {\n> >>>>>>  \treturn -ENOSYS;\n> >>>>>>  }\n> >>>>>> diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\n> >>>>>> index c7c9b3fd1724..b0ba1cf0a921 100644\n> >>>>>> --- a/src/android/camera_device.cpp\n> >>>>>> +++ b/src/android/camera_device.cpp\n> >>>>>> @@ -49,7 +49,7 @@ CameraDevice::Camera3RequestDescriptor::~Camera3RequestDescriptor()\n> >>>>>>   * to the framework using the designated callbacks.\n> >>>>>>   */\n> >>>>>>\n> >>>>>> -CameraDevice::CameraDevice(unsigned int id, const std::shared_ptr<Camera> &camera)\n> >>>>>> +CameraDevice::CameraDevice(unsigned int /*id*/, const std::shared_ptr<Camera> &camera)\n> >>>>>>  \t: running_(false), camera_(camera), staticMetadata_(nullptr)\n> >>>>>>  {\n> >>>>>>  \tcamera_->requestCompleted.connect(this, &CameraDevice::requestComplete);\n> >>>>>> @@ -875,7 +875,7 @@ void CameraDevice::notifyError(uint32_t frameNumber, camera3_stream_t *stream)\n> >>>>>>  /*\n> >>>>>>   * Produce a set of fixed result metadata.\n> >>>>>>   */\n> >>>>>> -std::unique_ptr<CameraMetadata> CameraDevice::getResultMetadata(int frame_number,\n> >>>>>> +std::unique_ptr<CameraMetadata> CameraDevice::getResultMetadata(int /*frame_number*/,\n> >>>>>>  \t\t\t\t\t\t\t\tint64_t timestamp)\n> >>>>>>  {\n> >>>>>>  \t/*\n> >>>>>> diff --git a/src/android/camera_proxy.cpp b/src/android/camera_proxy.cpp\n> >>>>>> index 4f5c0a024903..c9f98c784eec 100644\n> >>>>>> --- a/src/android/camera_proxy.cpp\n> >>>>>> +++ b/src/android/camera_proxy.cpp\n> >>>>>> @@ -79,11 +79,11 @@ static int hal_dev_process_capture_request(const struct camera3_device *dev,\n> >>>>>>  \treturn proxy->processCaptureRequest(request);\n> >>>>>>  }\n> >>>>>>\n> >>>>>> -static void hal_dev_dump(const struct camera3_device *dev, int fd)\n> >>>>>> +static void hal_dev_dump(const struct camera3_device * /*dev*/, int /*fd*/)\n> >>>>>>  {\n> >>>>>>  }\n> >>>>>>\n> >>>>>> -static int hal_dev_flush(const struct camera3_device *dev)\n> >>>>>> +static int hal_dev_flush(const struct camera3_device * /*dev*/)\n> >>>>>>  {\n> >>>>>>  \treturn 0;\n> >>>>>>  }\n> >>>>>> diff --git a/src/cam/main.cpp b/src/cam/main.cpp\n> >>>>>> index 9d99f5587cbb..ceb0efeff045 100644\n> >>>>>> --- a/src/cam/main.cpp\n> >>>>>> +++ b/src/cam/main.cpp\n> >>>>>> @@ -326,7 +326,7 @@ int CamApp::run()\n> >>>>>>  \treturn 0;\n> >>>>>>  }\n> >>>>>>\n> >>>>>> -void signalHandler(int signal)\n> >>>>>> +void signalHandler(int /*signal*/)\n> >>>>>>  {\n> >>>>>>  \tstd::cout << \"Exiting\" << std::endl;\n> >>>>>>  \tCamApp::instance()->quit();\n> >>>>>> diff --git a/src/ipa/ipa_vimc.cpp b/src/ipa/ipa_vimc.cpp\n> >>>>>> index 63d578b4e2aa..16c7e0732d40 100644\n> >>>>>> --- a/src/ipa/ipa_vimc.cpp\n> >>>>>> +++ b/src/ipa/ipa_vimc.cpp\n> >>>>>> @@ -30,11 +30,11 @@ public:\n> >>>>>>  \t~IPAVimc();\n> >>>>>>\n> >>>>>>  \tint init() override;\n> >>>>>> -\tvoid configure(const std::map<unsigned int, IPAStream> &streamConfig,\n> >>>>>> -\t\t       const std::map<unsigned int, ControlInfoMap> &entityControls) override {}\n> >>>>>> -\tvoid mapBuffers(const std::vector<IPABuffer> &buffers) override {}\n> >>>>>> -\tvoid unmapBuffers(const std::vector<unsigned int> &ids) override {}\n> >>>>>> -\tvoid processEvent(const IPAOperationData &event) override {}\n> >>>>>> +\tvoid configure(const std::map<unsigned int, IPAStream> & /*streamConfig*/,\n> >>>>>> +\t\t       const std::map<unsigned int, ControlInfoMap> & /*entityControls*/) override {}\n> >>>>>> +\tvoid mapBuffers(const std::vector<IPABuffer> & /*buffers*/) override {}\n> >>>>>> +\tvoid unmapBuffers(const std::vector<unsigned int> & /*ids*/) override {}\n> >>>>>> +\tvoid processEvent(const IPAOperationData & /*event*/) override {}\n> >>>>>>\n> >>>>>>  private:\n> >>>>>>  \tvoid initTrace();\n> >>>>>> diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp\n> >>>>>> index 9a13f5c7df17..84f270791340 100644\n> >>>>>> --- a/src/ipa/rkisp1/rkisp1.cpp\n> >>>>>> +++ b/src/ipa/rkisp1/rkisp1.cpp\n> >>>>>> @@ -61,7 +61,7 @@ private:\n> >>>>>>  \tuint32_t maxGain_;\n> >>>>>>  };\n> >>>>>>\n> >>>>>> -void IPARkISP1::configure(const std::map<unsigned int, IPAStream> &streamConfig,\n> >>>>>> +void IPARkISP1::configure(const std::map<unsigned int, IPAStream> & /*streamConfig*/,\n> >>>>>>  \t\t\t  const std::map<unsigned int, ControlInfoMap> &entityControls)\n> >>>>>>  {\n> >>>>>>  \tif (entityControls.empty())\n> >>>>>> diff --git a/src/libcamera/device_enumerator_udev.cpp b/src/libcamera/device_enumerator_udev.cpp\n> >>>>>> index b2c5fd221dcd..6e0fbbd8c70c 100644\n> >>>>>> --- a/src/libcamera/device_enumerator_udev.cpp\n> >>>>>> +++ b/src/libcamera/device_enumerator_udev.cpp\n> >>>>>> @@ -309,7 +309,7 @@ int DeviceEnumeratorUdev::addV4L2Device(dev_t devnum)\n> >>>>>>  \treturn 0;\n> >>>>>>  }\n> >>>>>>\n> >>>>>> -void DeviceEnumeratorUdev::udevNotify(EventNotifier *notifier)\n> >>>>>> +void DeviceEnumeratorUdev::udevNotify(EventNotifier * /*notifier*/)\n> >>>>>>  {\n> >>>>>>  \tstruct udev_device *dev = udev_monitor_receive_device(monitor_);\n> >>>>>>  \tstd::string action(udev_device_get_action(dev));\n> >>>>>> diff --git a/src/libcamera/ipc_unixsocket.cpp b/src/libcamera/ipc_unixsocket.cpp\n> >>>>>> index def08eef00f8..eb594268dd6c 100644\n> >>>>>> --- a/src/libcamera/ipc_unixsocket.cpp\n> >>>>>> +++ b/src/libcamera/ipc_unixsocket.cpp\n> >>>>>> @@ -306,7 +306,7 @@ int IPCUnixSocket::recvData(void *buffer, size_t length,\n> >>>>>>  \treturn 0;\n> >>>>>>  }\n> >>>>>>\n> >>>>>> -void IPCUnixSocket::dataNotifier(EventNotifier *notifier)\n> >>>>>> +void IPCUnixSocket::dataNotifier(EventNotifier * /*notifier*/)\n> >>>>>>  {\n> >>>>>>  \tint ret;\n> >>>>>>\n> >>>>>> diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> >>>>>> index 8d3ad568d16e..84356646b736 100644\n> >>>>>> --- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n> >>>>>> +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> >>>>>> @@ -700,7 +700,7 @@ error:\n> >>>>>>  }\n> >>>>>>\n> >>>>>>  int PipelineHandlerIPU3::freeBuffers(Camera *camera,\n> >>>>>> -\t\t\t\t     const std::set<Stream *> &streams)\n> >>>>>> +\t\t\t\t     const std::set<Stream *> & /*streams*/)\n> >>>>>>  {\n> >>>>>>  \tIPU3CameraData *data = cameraData(camera);\n> >>>>>>\n> >>>>>> diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> >>>>>> index 7a28b03b8d38..aed060bada70 100644\n> >>>>>> --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> >>>>>> +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> >>>>>> @@ -703,7 +703,7 @@ int PipelineHandlerRkISP1::allocateBuffers(Camera *camera,\n> >>>>>>  }\n> >>>>>>\n> >>>>>>  int PipelineHandlerRkISP1::freeBuffers(Camera *camera,\n> >>>>>> -\t\t\t\t       const std::set<Stream *> &streams)\n> >>>>>> +\t\t\t\t       const std::set<Stream *> & /*streams*/)\n> >>>>>>  {\n> >>>>>>  \tRkISP1CameraData *data = cameraData(camera);\n> >>>>>>\n> >>>>>> diff --git a/src/libcamera/pipeline/rkisp1/timeline.cpp b/src/libcamera/pipeline/rkisp1/timeline.cpp\n> >>>>>> index f6c6434d7b53..59e6de78c79d 100644\n> >>>>>> --- a/src/libcamera/pipeline/rkisp1/timeline.cpp\n> >>>>>> +++ b/src/libcamera/pipeline/rkisp1/timeline.cpp\n> >>>>>> @@ -204,7 +204,7 @@ void Timeline::updateDeadline()\n> >>>>>>  \ttimer_.start(deadline);\n> >>>>>>  }\n> >>>>>>\n> >>>>>> -void Timeline::timeout(Timer *timer)\n> >>>>>> +void Timeline::timeout(Timer * /*timer*/)\n> >>>>>>  {\n> >>>>>>  \tutils::time_point now = std::chrono::steady_clock::now();\n> >>>>>>\n> >>>>>> diff --git a/src/libcamera/pipeline/uvcvideo.cpp b/src/libcamera/pipeline/uvcvideo.cpp\n> >>>>>> index fae0ffc4de30..94464c7c7f0c 100644\n> >>>>>> --- a/src/libcamera/pipeline/uvcvideo.cpp\n> >>>>>> +++ b/src/libcamera/pipeline/uvcvideo.cpp\n> >>>>>> @@ -208,7 +208,7 @@ int PipelineHandlerUVC::allocateBuffers(Camera *camera,\n> >>>>>>  }\n> >>>>>>\n> >>>>>>  int PipelineHandlerUVC::freeBuffers(Camera *camera,\n> >>>>>> -\t\t\t\t    const std::set<Stream *> &streams)\n> >>>>>> +\t\t\t\t    const std::set<Stream *> & /*streams*/)\n> >>>>>>  {\n> >>>>>>  \tUVCCameraData *data = cameraData(camera);\n> >>>>>>  \treturn data->video_->releaseBuffers();\n> >>>>>> diff --git a/src/libcamera/pipeline/vimc.cpp b/src/libcamera/pipeline/vimc.cpp\n> >>>>>> index c16ae4cb76b5..7e325469f178 100644\n> >>>>>> --- a/src/libcamera/pipeline/vimc.cpp\n> >>>>>> +++ b/src/libcamera/pipeline/vimc.cpp\n> >>>>>> @@ -166,7 +166,7 @@ PipelineHandlerVimc::PipelineHandlerVimc(CameraManager *manager)\n> >>>>>>  {\n> >>>>>>  }\n> >>>>>>\n> >>>>>> -CameraConfiguration *PipelineHandlerVimc::generateConfiguration(Camera *camera,\n> >>>>>> +CameraConfiguration *PipelineHandlerVimc::generateConfiguration(Camera * /*camera*/,\n> >>>>>>  \tconst StreamRoles &roles)\n> >>>>>>  {\n> >>>>>>  \tCameraConfiguration *config = new VimcCameraConfiguration();\n> >>>>>> @@ -274,7 +274,7 @@ int PipelineHandlerVimc::allocateBuffers(Camera *camera,\n> >>>>>>  }\n> >>>>>>\n> >>>>>>  int PipelineHandlerVimc::freeBuffers(Camera *camera,\n> >>>>>> -\t\t\t\t     const std::set<Stream *> &streams)\n> >>>>>> +\t\t\t\t     const std::set<Stream *> & /*streams*/)\n> >>>>>>  {\n> >>>>>>  \tVimcCameraData *data = cameraData(camera);\n> >>>>>>  \treturn data->video_->releaseBuffers();\n> >>>>>> diff --git a/src/libcamera/process.cpp b/src/libcamera/process.cpp\n> >>>>>> index 3b4d0f10da67..44ebfec178fe 100644\n> >>>>>> --- a/src/libcamera/process.cpp\n> >>>>>> +++ b/src/libcamera/process.cpp\n> >>>>>> @@ -89,7 +89,7 @@ void sigact(int signal, siginfo_t *info, void *ucontext)\n> >>>>>>\n> >>>>>>  } /* namespace */\n> >>>>>>\n> >>>>>> -void ProcessManager::sighandler(EventNotifier *notifier)\n> >>>>>> +void ProcessManager::sighandler(EventNotifier * /*notifier*/)\n> >>>>>>  {\n> >>>>>>  \tchar data;\n> >>>>>>  \tssize_t ret = read(pipe_[0], &data, sizeof(data));\n> >>>>>> diff --git a/src/libcamera/proxy/ipa_proxy_linux.cpp b/src/libcamera/proxy/ipa_proxy_linux.cpp\n> >>>>>> index 4e6fa6899e07..d4ccf5112cd7 100644\n> >>>>>> --- a/src/libcamera/proxy/ipa_proxy_linux.cpp\n> >>>>>> +++ b/src/libcamera/proxy/ipa_proxy_linux.cpp\n> >>>>>> @@ -27,11 +27,11 @@ public:\n> >>>>>>  \t~IPAProxyLinux();\n> >>>>>>\n> >>>>>>  \tint init() override { return 0; }\n> >>>>>> -\tvoid configure(const std::map<unsigned int, IPAStream> &streamConfig,\n> >>>>>> -\t\t       const std::map<unsigned int, ControlInfoMap> &entityControls) override {}\n> >>>>>> -\tvoid mapBuffers(const std::vector<IPABuffer> &buffers) override {}\n> >>>>>> -\tvoid unmapBuffers(const std::vector<unsigned int> &ids) override {}\n> >>>>>> -\tvoid processEvent(const IPAOperationData &event) override {}\n> >>>>>> +\tvoid configure(const std::map<unsigned int, IPAStream> & /*streamConfig*/,\n> >>>>>> +\t\t       const std::map<unsigned int, ControlInfoMap> & /*entityControls*/) override {}\n> >>>>>> +\tvoid mapBuffers(const std::vector<IPABuffer> & /*buffers*/) override {}\n> >>>>>> +\tvoid unmapBuffers(const std::vector<unsigned int> & /*ids*/) override {}\n> >>>>>> +\tvoid processEvent(const IPAOperationData & /*event*/) override {}\n> >>>>>>\n> >>>>>>  private:\n> >>>>>>  \tvoid readyRead(IPCUnixSocket *ipc);\n> >>>>>> @@ -86,7 +86,7 @@ IPAProxyLinux::~IPAProxyLinux()\n> >>>>>>  \tdelete socket_;\n> >>>>>>  }\n> >>>>>>\n> >>>>>> -void IPAProxyLinux::readyRead(IPCUnixSocket *ipc)\n> >>>>>> +void IPAProxyLinux::readyRead(IPCUnixSocket * /*ipc*/)\n> >>>>>>  {\n> >>>>>>  }\n> >>>>>>\n> >>>>>> diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp\n> >>>>>> index 208ab54199b1..87d810d7cfa4 100644\n> >>>>>> --- a/src/libcamera/v4l2_videodevice.cpp\n> >>>>>> +++ b/src/libcamera/v4l2_videodevice.cpp\n> >>>>>> @@ -1141,7 +1141,7 @@ Buffer *V4L2VideoDevice::dequeueBuffer()\n> >>>>>>   * For Capture video devices the Buffer will contain valid data.\n> >>>>>>   * For Output video devices the Buffer can be considered empty.\n> >>>>>>   */\n> >>>>>> -void V4L2VideoDevice::bufferAvailable(EventNotifier *notifier)\n> >>>>>> +void V4L2VideoDevice::bufferAvailable(EventNotifier * /*notifier*/)\n> >>>>>>  {\n> >>>>>>  \tBuffer *buffer = dequeueBuffer();\n> >>>>>>  \tif (!buffer)\n> >>>>>> diff --git a/src/qcam/main.cpp b/src/qcam/main.cpp\n> >>>>>> index a7ff5c52663b..d8cfc1c3d76b 100644\n> >>>>>> --- a/src/qcam/main.cpp\n> >>>>>> +++ b/src/qcam/main.cpp\n> >>>>>> @@ -17,7 +17,7 @@\n> >>>>>>  #include \"../cam/options.h\"\n> >>>>>>  #include \"qt_event_dispatcher.h\"\n> >>>>>>\n> >>>>>> -void signalHandler(int signal)\n> >>>>>> +void signalHandler(int /*signal*/)\n> >>>>>>  {\n> >>>>>>  \tstd::cout << \"Exiting\" << std::endl;\n> >>>>>>  \tqApp->quit();\n> >>>>>> diff --git a/test/camera/capture.cpp b/test/camera/capture.cpp\n> >>>>>> index 791ccad15f70..a5fd0a641705 100644\n> >>>>>> --- a/test/camera/capture.cpp\n> >>>>>> +++ b/test/camera/capture.cpp\n> >>>>>> @@ -19,7 +19,7 @@ protected:\n> >>>>>>  \tunsigned int completeBuffersCount_;\n> >>>>>>  \tunsigned int completeRequestsCount_;\n> >>>>>>\n> >>>>>> -\tvoid bufferComplete(Request *request, Buffer *buffer)\n> >>>>>> +\tvoid bufferComplete(Request * /*request*/, Buffer *buffer)\n> >>>>>>  \t{\n> >>>>>>  \t\tif (buffer->status() != Buffer::BufferSuccess)\n> >>>>>>  \t\t\treturn;\n> >>>>>> diff --git a/test/libtest/test.h b/test/libtest/test.h\n> >>>>>> index ec08bf97c03d..193d7aa99f38 100644\n> >>>>>> --- a/test/libtest/test.h\n> >>>>>> +++ b/test/libtest/test.h\n> >>>>>> @@ -26,11 +26,11 @@ public:\n> >>>>>>  protected:\n> >>>>>>  \tvirtual int init() { return 0; }\n> >>>>>>  \tvirtual int run() = 0;\n> >>>>>> -\tvirtual void cleanup() { }\n> >>>>>> +\tvirtual void cleanup() {}\n> >>>>>>  };\n> >>>>>>\n> >>>>>>  #define TEST_REGISTER(klass)\t\t\t\t\t\t\\\n> >>>>>> -int main(int argc, char *argv[])\t\t\t\t\t\\\n> >>>>>> +int main(int /*argc*/, char * /*argv*/[])\t\t\t\t\\\n> >>>>>>  {\t\t\t\t\t\t\t\t\t\\\n> >>>>>>  \treturn klass().execute();\t\t\t\t\t\\\n> >>>>>>  }\n> >>>>>> diff --git a/test/log/log_process.cpp b/test/log/log_process.cpp\n> >>>>>> index 2df4aa43713c..fa5639dde7cb 100644\n> >>>>>> --- a/test/log/log_process.cpp\n> >>>>>> +++ b/test/log/log_process.cpp\n> >>>>>> @@ -123,7 +123,8 @@ protected:\n> >>>>>>  \t}\n> >>>>>>\n> >>>>>>  private:\n> >>>>>> -\tvoid procFinished(Process *proc, enum Process::ExitStatus exitStatus, int exitCode)\n> >>>>>> +\tvoid procFinished(Process * /*proc*/,\n> >>>>>> +\t\t\t  enum Process::ExitStatus exitStatus, int exitCode)\n> >>>>>>  \t{\n> >>>>>>  \t\texitStatus_ = exitStatus;\n> >>>>>>  \t\texitCode_ = exitCode;\n> >>>>>> diff --git a/test/message.cpp b/test/message.cpp\n> >>>>>> index 3775c30a20b3..3e2659c836e3 100644\n> >>>>>> --- a/test/message.cpp\n> >>>>>> +++ b/test/message.cpp\n> >>>>>> @@ -35,7 +35,7 @@ public:\n> >>>>>>  \tvoid reset() { status_ = NoMessage; }\n> >>>>>>\n> >>>>>>  protected:\n> >>>>>> -\tvoid message(Message *msg)\n> >>>>>> +\tvoid message(Message * /*msg*/)\n> >>>>>>  \t{\n> >>>>>>  \t\tif (thread() != Thread::current())\n> >>>>>>  \t\t\tstatus_ = InvalidThread;\n> >>>>>> diff --git a/test/process/process_test.cpp b/test/process/process_test.cpp\n> >>>>>> index 7e7b3c2c8bf3..2ba3efd08457 100644\n> >>>>>> --- a/test/process/process_test.cpp\n> >>>>>> +++ b/test/process/process_test.cpp\n> >>>>>> @@ -75,7 +75,8 @@ protected:\n> >>>>>>  \t}\n> >>>>>>\n> >>>>>>  private:\n> >>>>>> -\tvoid procFinished(Process *proc, enum Process::ExitStatus exitStatus, int exitCode)\n> >>>>>> +\tvoid procFinished(Process * /*proc*/,\n> >>>>>> +\t\t\t  enum Process::ExitStatus exitStatus, int exitCode)\n> >>>>>>  \t{\n> >>>>>>  \t\texitStatus_ = exitStatus;\n> >>>>>>  \t\texitCode_ = exitCode;\n> >>>>>> diff --git a/test/timer-thread.cpp b/test/timer-thread.cpp\n> >>>>>> index 32853b4e80ef..55b7abcbbeab 100644\n> >>>>>> --- a/test/timer-thread.cpp\n> >>>>>> +++ b/test/timer-thread.cpp\n> >>>>>> @@ -39,7 +39,7 @@ public:\n> >>>>>>  \t}\n> >>>>>>\n> >>>>>>  private:\n> >>>>>> -\tvoid timeoutHandler(Timer *timer)\n> >>>>>> +\tvoid timeoutHandler(Timer * /*timer*/)\n> >>>>>>  \t{\n> >>>>>>  \t\ttimeout_ = true;\n> >>>>>>  \t}\n> >>>>>> diff --git a/test/timer.cpp b/test/timer.cpp\n> >>>>>> index 2bdb006edccb..03df03aa8d69 100644\n> >>>>>> --- a/test/timer.cpp\n> >>>>>> +++ b/test/timer.cpp\n> >>>>>> @@ -56,7 +56,7 @@ public:\n> >>>>>>  \t}\n> >>>>>>\n> >>>>>>  private:\n> >>>>>> -\tvoid timeoutHandler(Timer *timer)\n> >>>>>> +\tvoid timeoutHandler(Timer * /*timer*/)\n> >>>>>>  \t{\n> >>>>>>  \t\texpiration_ = std::chrono::steady_clock::now();\n> >>>>>>  \t\tcount_++;","headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 196C660BEA\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 19 Nov 2019 23:25:13 +0100 (CET)","from pendragon.ideasonboard.com (unknown [122.147.213.64])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id DFBA1311;\n\tTue, 19 Nov 2019 23:25:10 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1574202312;\n\tbh=C2UJcqsfCM2L1kI8mW6hMKK3IebCStge40uYkkgbgSY=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=ll7uJH7h/3jOpUeyQWczk/iR+mU6syyEeFoEI2fSKodI2n6CXUDN9/vTWwuwRtbT0\n\tbrbpBNHYIcvDQLLK29tc2ijxc97XJH6EXPnOgH7RV1rpCMEFd7kgTHL1dElGcoPkBc\n\tkL10Ohf9lrn4bAjlMavjaY/TxZCXeuynPjMz2Dto=","Date":"Wed, 20 Nov 2019 00:25:03 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Jacopo Mondi <jacopo@jmondi.org>, libcamera-devel@lists.libcamera.org","Message-ID":"<20191119222503.GG17590@pendragon.ideasonboard.com>","References":"<20191026213835.15110-1-laurent.pinchart@ideasonboard.com>\n\t<34810c55-0226-253c-56ff-9a756ee5f997@ideasonboard.com>\n\t<20191028103544.GA14017@pendragon.ideasonboard.com>\n\t<20191108194227.GA1058@pendragon.ideasonboard.com>\n\t<20191109103135.s326tbuehyx4mnng@uno.localdomain>\n\t<20191118215304.xccnnvzx2p3bwb6z@uno.localdomain>\n\t<c0de3171-2356-ba13-0e69-dbd63e603896@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<c0de3171-2356-ba13-0e69-dbd63e603896@ideasonboard.com>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH/RFC] meson: Remove\n\t-Wno-unused-parameter","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Tue, 19 Nov 2019 22:25:13 -0000"}},{"id":3116,"web_url":"https://patchwork.libcamera.org/comment/3116/","msgid":"<9564bc8b-d413-f110-e559-68cc26a10193@ideasonboard.com>","date":"2019-11-20T08:58:47","subject":"Re: [libcamera-devel] [PATCH/RFC] meson: Remove\n\t-Wno-unused-parameter","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Hi Laurent,\n\nOn 19/11/2019 22:25, Laurent Pinchart wrote:\n> Hi Kieran,\n> \n> On Tue, Nov 19, 2019 at 01:35:41PM +0000, Kieran Bingham wrote:\n>> On 18/11/2019 21:53, Jacopo Mondi wrote:\n>>> On Sat, Nov 09, 2019 at 11:31:35AM +0100, Jacopo Mondi wrote:\n>>>> Hi Laurent,\n>>>\n>>> Sorry, I forgot to add my tag\n>>> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>\n>>>\n>>>> On Fri, Nov 08, 2019 at 09:42:27PM +0200, Laurent Pinchart wrote:\n>>>>> On Mon, Oct 28, 2019 at 12:35:44PM +0200, Laurent Pinchart wrote:\n>>>>>> On Mon, Oct 28, 2019 at 09:32:14AM +0000, Kieran Bingham wrote:\n>>>>>>> On 26/10/2019 22:38, Laurent Pinchart wrote:\n>>>>>>>> We build libcamera with -Wno-unused-parameter and this doesn't cause\n>>>>>>>> much issue internally. However, it prevents catching unused parameters\n>>>>>>>> in inline functions defined in public headers. This can lead to\n>>>>>>>> compilation warnings for applications compiled without\n>>>>>>>> -Wno-unused-parameter.\n>>>>>>>>\n>>>>>>>> To catch those issues, remove -Wno-unused-parameter and fix all the\n>>>>>>>> related warnings.\n>>>>>>>\n>>>>>>> What's your opinion on defining an unused(variable) (named otherwise if\n>>>>>>> required) macro so that we can declare unused variables in the code\n>>>>>>> base, and keep the function prototypes clean?\n>>>>>>>\n>>>>>>> i.e.\n>>>>>>>\n>>>>>>> #define unused(_x) (void)(_x)\n>>>>>>>\n>>>>>>>  ControlValue ControlValue::load(ByteStreamBuffer &b, ControlType type,\n>>>>>>>                                 unsigned int count)\n>>>>>>>  {\n>>>>>>> +       unused(count);\n>>>>>>> +\n>>>>>>>         switch (type) {\n>>>>>>>         case ControlTypeBool: {\n>>>>>>>                 bool value;\n>>>>>>>   ...\n>>>>>>>  }\n>>>>>>>\n>>>>>>> I think something like that would allow cleaner function declarations,\n>>>>>>> that do not need to be modified once someone actually uses the variable\n>>>>>>> in question. Simply remove the 'unused' declaration ?\n>>>>>>\n>>>>>> I'm afraid I don't like that :-) First of all, compilers may not always\n>>>>>> be fooled by that particular implementation, and we'll play a game of\n>>>>>> whack-a-mole as new compiler versions are released. Then, removing the\n>>>>>> variable name is specified by the C++ standard as the official way to\n>>>>>> note that a variable is unused. I don't think we should use a different,\n>>>>>> non-standard implementation.\n>>\n>> For clarification - I fully agree that removing -Wno-unused-parameter is\n>> a good thing. I'm very much a -Wall -Wextra -Werror kind of guy. Fix all\n>> the warnings, before someone else has to, and don't cause warnings for\n>> other people.\n>>\n>> In terms of style, I am not fond of changing the function prototype, so\n>> here's a last ditch effort of suggesting an alternate Unused()\n>> definition type based on templates which I think should always work?\n>> (Because the argument is used, but optimised out)\n>>\n>>\n>> From: https://stackoverflow.com/a/39746834/3660427\n>>\n>> template <typename T>\n>> void Unused(T&& /*No name*/) { /*Empty*/ }\n>>\n>> void func(int i)\n>> {\n>>    Unused(i); // Silent warning for unused variable\n>> }\n>>\n>>\n>> And that's purely because I believe it's cleaner to remove the Unused()\n>> line when you want to then /use/ that variable rather than modify the\n>> function prototype.\n>>\n>> But - I'll not nack this patch based on that.\n>>\n>> It's a shame that adding the name in via comments adds too many *'s though:\n>>\n>>> -static int hal_open_legacy(const struct hw_module_t *module, const char *id,\n>>> -\t\t\t   uint32_t halVersion, struct hw_device_t **device)\n>>> +static int hal_open_legacy(const struct hw_module_t * /*module*/,\n>>> +\t\t\t   const char * /*id*/, uint32_t /*halVersion*/,\n>>> +\t\t\t   struct hw_device_t ** /*device*/)\n>>\n>> I fear the /*device*/ reduces readability (IMO), but if you believe this\n>> is the best way to solve the topic, then:\n>>\n>> Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> \n> The part that bothers me with the Unused() function above is that C++\n> provides a standard way to state a parameter is unused, and using a\n\nCan you reference the C++ standard where this is mentioned please so it\ncan easily be found (/I can easily find it).\n\n\n> different method seems a bit of a hack to me. There's also a small risk\n> that new compiler versions could still produce a warning if they get too\n> clever about our hacks :-S\n\nSeems like worrying about something that hasn't happened to me, but like\nI said, I'm just giving my view - You can push this patch as you wish.\n\n\n> If we want not to comment out parameter names we could use\n> __attribute__((__unused__)), but I think that would be even less\n> readable.\n\nThat's easily wrapped in a macro just like the kernel does.\n\n--\nKieran\n\n\n\n> \n>>>>>> This patch stems from a warning generated when compiling a small test\n>>>>>> code against libcamera out of the libcamera source tree, without\n>>>>>> -Wno-unused-parameter. It turns out we had a single issue in public\n>>>>>> headers, so we will likely not introduce other such issues in the\n>>>>>> headers very often. We could thus decide not to care about it and catch\n>>>>>> the issues when they are reported. I however think there's value in\n>>>>>> dropping the compiler option though (otherwise I wouldn't have sent this\n>>>>>> patch in the first place :-)).\n>>>>>\n>>>>> Ping ? I'd like to reach a consensus on this and decide if we should\n>>>>> drop the patch (and thus live with the small but real risk that\n>>>>> applications that use -Wunused-parameters would get a build warning) or\n>>>>> keep it, in this form or another.\n>>>>\n>>>> I think the priority here is to make sure applications do not get\n>>>> warnings when building with -Wunused-parameters, so I'm finw with\n>>>> either removing the parameter's name completely from the function\n>>>> definition or commenting it out, which I like less but mostly because\n>>>> of how it looks, so I'm fine with both, as long as we make sure\n>>>> applications do not get warnings...\n>>>>\n>>>>>>>> Fix an additional checkstyle.py error while at it.\n>>>>>>>>\n>>>>>>>> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n>>>>>>>> ---\n>>>>>>>>  meson.build                                |  1 -\n>>>>>>>>  src/android/camera3_hal.cpp                |  9 +++++----\n>>>>>>>>  src/android/camera_device.cpp              |  4 ++--\n>>>>>>>>  src/android/camera_proxy.cpp               |  4 ++--\n>>>>>>>>  src/cam/main.cpp                           |  2 +-\n>>>>>>>>  src/ipa/ipa_vimc.cpp                       | 10 +++++-----\n>>>>>>>>  src/ipa/rkisp1/rkisp1.cpp                  |  2 +-\n>>>>>>>>  src/libcamera/device_enumerator_udev.cpp   |  2 +-\n>>>>>>>>  src/libcamera/ipc_unixsocket.cpp           |  2 +-\n>>>>>>>>  src/libcamera/pipeline/ipu3/ipu3.cpp       |  2 +-\n>>>>>>>>  src/libcamera/pipeline/rkisp1/rkisp1.cpp   |  2 +-\n>>>>>>>>  src/libcamera/pipeline/rkisp1/timeline.cpp |  2 +-\n>>>>>>>>  src/libcamera/pipeline/uvcvideo.cpp        |  2 +-\n>>>>>>>>  src/libcamera/pipeline/vimc.cpp            |  4 ++--\n>>>>>>>>  src/libcamera/process.cpp                  |  2 +-\n>>>>>>>>  src/libcamera/proxy/ipa_proxy_linux.cpp    | 12 ++++++------\n>>>>>>>>  src/libcamera/v4l2_videodevice.cpp         |  2 +-\n>>>>>>>>  src/qcam/main.cpp                          |  2 +-\n>>>>>>>>  test/camera/capture.cpp                    |  2 +-\n>>>>>>>>  test/libtest/test.h                        |  4 ++--\n>>>>>>>>  test/log/log_process.cpp                   |  3 ++-\n>>>>>>>>  test/message.cpp                           |  2 +-\n>>>>>>>>  test/process/process_test.cpp              |  3 ++-\n>>>>>>>>  test/timer-thread.cpp                      |  2 +-\n>>>>>>>>  test/timer.cpp                             |  2 +-\n>>>>>>>>  25 files changed, 43 insertions(+), 41 deletions(-)\n>>>>>>>>\n>>>>>>>> diff --git a/meson.build b/meson.build\n>>>>>>>> index 72ad7c8b493b..19a921a8ba6a 100644\n>>>>>>>> --- a/meson.build\n>>>>>>>> +++ b/meson.build\n>>>>>>>> @@ -31,7 +31,6 @@ if cc.has_header_symbol('stdlib.h', 'secure_getenv', prefix : '#define _GNU_SOUR\n>>>>>>>>  endif\n>>>>>>>>\n>>>>>>>>  common_arguments = [\n>>>>>>>> -    '-Wno-unused-parameter',\n>>>>>>>>      '-include', 'config.h',\n>>>>>>>>  ]\n>>>>>>>>\n>>>>>>>> diff --git a/src/android/camera3_hal.cpp b/src/android/camera3_hal.cpp\n>>>>>>>> index 8d2629ca356c..a7f470172583 100644\n>>>>>>>> --- a/src/android/camera3_hal.cpp\n>>>>>>>> +++ b/src/android/camera3_hal.cpp\n>>>>>>>> @@ -31,18 +31,19 @@ static int hal_get_camera_info(int id, struct camera_info *info)\n>>>>>>>>  \treturn cameraManager.getCameraInfo(id, info);\n>>>>>>>>  }\n>>>>>>>>\n>>>>>>>> -static int hal_set_callbacks(const camera_module_callbacks_t *callbacks)\n>>>>>>>> +static int hal_set_callbacks(const camera_module_callbacks_t * /*callbacks*/)\n>>>>>>>>  {\n>>>>>>>>  \treturn 0;\n>>>>>>>>  }\n>>>>>>>>\n>>>>>>>> -static int hal_open_legacy(const struct hw_module_t *module, const char *id,\n>>>>>>>> -\t\t\t   uint32_t halVersion, struct hw_device_t **device)\n>>>>>>>> +static int hal_open_legacy(const struct hw_module_t * /*module*/,\n>>>>>>>> +\t\t\t   const char * /*id*/, uint32_t /*halVersion*/,\n>>>>>>>> +\t\t\t   struct hw_device_t ** /*device*/)\n>>>>>>>>  {\n>>>>>>>>  \treturn -ENOSYS;\n>>>>>>>>  }\n>>>>>>>>\n>>>>>>>> -static int hal_set_torch_mode(const char *camera_id, bool enabled)\n>>>>>>>> +static int hal_set_torch_mode(const char * /*camera_id*/, bool /*enabled*/)\n>>>>>>>>  {\n>>>>>>>>  \treturn -ENOSYS;\n>>>>>>>>  }\n>>>>>>>> diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\n>>>>>>>> index c7c9b3fd1724..b0ba1cf0a921 100644\n>>>>>>>> --- a/src/android/camera_device.cpp\n>>>>>>>> +++ b/src/android/camera_device.cpp\n>>>>>>>> @@ -49,7 +49,7 @@ CameraDevice::Camera3RequestDescriptor::~Camera3RequestDescriptor()\n>>>>>>>>   * to the framework using the designated callbacks.\n>>>>>>>>   */\n>>>>>>>>\n>>>>>>>> -CameraDevice::CameraDevice(unsigned int id, const std::shared_ptr<Camera> &camera)\n>>>>>>>> +CameraDevice::CameraDevice(unsigned int /*id*/, const std::shared_ptr<Camera> &camera)\n>>>>>>>>  \t: running_(false), camera_(camera), staticMetadata_(nullptr)\n>>>>>>>>  {\n>>>>>>>>  \tcamera_->requestCompleted.connect(this, &CameraDevice::requestComplete);\n>>>>>>>> @@ -875,7 +875,7 @@ void CameraDevice::notifyError(uint32_t frameNumber, camera3_stream_t *stream)\n>>>>>>>>  /*\n>>>>>>>>   * Produce a set of fixed result metadata.\n>>>>>>>>   */\n>>>>>>>> -std::unique_ptr<CameraMetadata> CameraDevice::getResultMetadata(int frame_number,\n>>>>>>>> +std::unique_ptr<CameraMetadata> CameraDevice::getResultMetadata(int /*frame_number*/,\n>>>>>>>>  \t\t\t\t\t\t\t\tint64_t timestamp)\n>>>>>>>>  {\n>>>>>>>>  \t/*\n>>>>>>>> diff --git a/src/android/camera_proxy.cpp b/src/android/camera_proxy.cpp\n>>>>>>>> index 4f5c0a024903..c9f98c784eec 100644\n>>>>>>>> --- a/src/android/camera_proxy.cpp\n>>>>>>>> +++ b/src/android/camera_proxy.cpp\n>>>>>>>> @@ -79,11 +79,11 @@ static int hal_dev_process_capture_request(const struct camera3_device *dev,\n>>>>>>>>  \treturn proxy->processCaptureRequest(request);\n>>>>>>>>  }\n>>>>>>>>\n>>>>>>>> -static void hal_dev_dump(const struct camera3_device *dev, int fd)\n>>>>>>>> +static void hal_dev_dump(const struct camera3_device * /*dev*/, int /*fd*/)\n>>>>>>>>  {\n>>>>>>>>  }\n>>>>>>>>\n>>>>>>>> -static int hal_dev_flush(const struct camera3_device *dev)\n>>>>>>>> +static int hal_dev_flush(const struct camera3_device * /*dev*/)\n>>>>>>>>  {\n>>>>>>>>  \treturn 0;\n>>>>>>>>  }\n>>>>>>>> diff --git a/src/cam/main.cpp b/src/cam/main.cpp\n>>>>>>>> index 9d99f5587cbb..ceb0efeff045 100644\n>>>>>>>> --- a/src/cam/main.cpp\n>>>>>>>> +++ b/src/cam/main.cpp\n>>>>>>>> @@ -326,7 +326,7 @@ int CamApp::run()\n>>>>>>>>  \treturn 0;\n>>>>>>>>  }\n>>>>>>>>\n>>>>>>>> -void signalHandler(int signal)\n>>>>>>>> +void signalHandler(int /*signal*/)\n>>>>>>>>  {\n>>>>>>>>  \tstd::cout << \"Exiting\" << std::endl;\n>>>>>>>>  \tCamApp::instance()->quit();\n>>>>>>>> diff --git a/src/ipa/ipa_vimc.cpp b/src/ipa/ipa_vimc.cpp\n>>>>>>>> index 63d578b4e2aa..16c7e0732d40 100644\n>>>>>>>> --- a/src/ipa/ipa_vimc.cpp\n>>>>>>>> +++ b/src/ipa/ipa_vimc.cpp\n>>>>>>>> @@ -30,11 +30,11 @@ public:\n>>>>>>>>  \t~IPAVimc();\n>>>>>>>>\n>>>>>>>>  \tint init() override;\n>>>>>>>> -\tvoid configure(const std::map<unsigned int, IPAStream> &streamConfig,\n>>>>>>>> -\t\t       const std::map<unsigned int, ControlInfoMap> &entityControls) override {}\n>>>>>>>> -\tvoid mapBuffers(const std::vector<IPABuffer> &buffers) override {}\n>>>>>>>> -\tvoid unmapBuffers(const std::vector<unsigned int> &ids) override {}\n>>>>>>>> -\tvoid processEvent(const IPAOperationData &event) override {}\n>>>>>>>> +\tvoid configure(const std::map<unsigned int, IPAStream> & /*streamConfig*/,\n>>>>>>>> +\t\t       const std::map<unsigned int, ControlInfoMap> & /*entityControls*/) override {}\n>>>>>>>> +\tvoid mapBuffers(const std::vector<IPABuffer> & /*buffers*/) override {}\n>>>>>>>> +\tvoid unmapBuffers(const std::vector<unsigned int> & /*ids*/) override {}\n>>>>>>>> +\tvoid processEvent(const IPAOperationData & /*event*/) override {}\n>>>>>>>>\n>>>>>>>>  private:\n>>>>>>>>  \tvoid initTrace();\n>>>>>>>> diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp\n>>>>>>>> index 9a13f5c7df17..84f270791340 100644\n>>>>>>>> --- a/src/ipa/rkisp1/rkisp1.cpp\n>>>>>>>> +++ b/src/ipa/rkisp1/rkisp1.cpp\n>>>>>>>> @@ -61,7 +61,7 @@ private:\n>>>>>>>>  \tuint32_t maxGain_;\n>>>>>>>>  };\n>>>>>>>>\n>>>>>>>> -void IPARkISP1::configure(const std::map<unsigned int, IPAStream> &streamConfig,\n>>>>>>>> +void IPARkISP1::configure(const std::map<unsigned int, IPAStream> & /*streamConfig*/,\n>>>>>>>>  \t\t\t  const std::map<unsigned int, ControlInfoMap> &entityControls)\n>>>>>>>>  {\n>>>>>>>>  \tif (entityControls.empty())\n>>>>>>>> diff --git a/src/libcamera/device_enumerator_udev.cpp b/src/libcamera/device_enumerator_udev.cpp\n>>>>>>>> index b2c5fd221dcd..6e0fbbd8c70c 100644\n>>>>>>>> --- a/src/libcamera/device_enumerator_udev.cpp\n>>>>>>>> +++ b/src/libcamera/device_enumerator_udev.cpp\n>>>>>>>> @@ -309,7 +309,7 @@ int DeviceEnumeratorUdev::addV4L2Device(dev_t devnum)\n>>>>>>>>  \treturn 0;\n>>>>>>>>  }\n>>>>>>>>\n>>>>>>>> -void DeviceEnumeratorUdev::udevNotify(EventNotifier *notifier)\n>>>>>>>> +void DeviceEnumeratorUdev::udevNotify(EventNotifier * /*notifier*/)\n>>>>>>>>  {\n>>>>>>>>  \tstruct udev_device *dev = udev_monitor_receive_device(monitor_);\n>>>>>>>>  \tstd::string action(udev_device_get_action(dev));\n>>>>>>>> diff --git a/src/libcamera/ipc_unixsocket.cpp b/src/libcamera/ipc_unixsocket.cpp\n>>>>>>>> index def08eef00f8..eb594268dd6c 100644\n>>>>>>>> --- a/src/libcamera/ipc_unixsocket.cpp\n>>>>>>>> +++ b/src/libcamera/ipc_unixsocket.cpp\n>>>>>>>> @@ -306,7 +306,7 @@ int IPCUnixSocket::recvData(void *buffer, size_t length,\n>>>>>>>>  \treturn 0;\n>>>>>>>>  }\n>>>>>>>>\n>>>>>>>> -void IPCUnixSocket::dataNotifier(EventNotifier *notifier)\n>>>>>>>> +void IPCUnixSocket::dataNotifier(EventNotifier * /*notifier*/)\n>>>>>>>>  {\n>>>>>>>>  \tint ret;\n>>>>>>>>\n>>>>>>>> diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\n>>>>>>>> index 8d3ad568d16e..84356646b736 100644\n>>>>>>>> --- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n>>>>>>>> +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n>>>>>>>> @@ -700,7 +700,7 @@ error:\n>>>>>>>>  }\n>>>>>>>>\n>>>>>>>>  int PipelineHandlerIPU3::freeBuffers(Camera *camera,\n>>>>>>>> -\t\t\t\t     const std::set<Stream *> &streams)\n>>>>>>>> +\t\t\t\t     const std::set<Stream *> & /*streams*/)\n>>>>>>>>  {\n>>>>>>>>  \tIPU3CameraData *data = cameraData(camera);\n>>>>>>>>\n>>>>>>>> diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n>>>>>>>> index 7a28b03b8d38..aed060bada70 100644\n>>>>>>>> --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n>>>>>>>> +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n>>>>>>>> @@ -703,7 +703,7 @@ int PipelineHandlerRkISP1::allocateBuffers(Camera *camera,\n>>>>>>>>  }\n>>>>>>>>\n>>>>>>>>  int PipelineHandlerRkISP1::freeBuffers(Camera *camera,\n>>>>>>>> -\t\t\t\t       const std::set<Stream *> &streams)\n>>>>>>>> +\t\t\t\t       const std::set<Stream *> & /*streams*/)\n>>>>>>>>  {\n>>>>>>>>  \tRkISP1CameraData *data = cameraData(camera);\n>>>>>>>>\n>>>>>>>> diff --git a/src/libcamera/pipeline/rkisp1/timeline.cpp b/src/libcamera/pipeline/rkisp1/timeline.cpp\n>>>>>>>> index f6c6434d7b53..59e6de78c79d 100644\n>>>>>>>> --- a/src/libcamera/pipeline/rkisp1/timeline.cpp\n>>>>>>>> +++ b/src/libcamera/pipeline/rkisp1/timeline.cpp\n>>>>>>>> @@ -204,7 +204,7 @@ void Timeline::updateDeadline()\n>>>>>>>>  \ttimer_.start(deadline);\n>>>>>>>>  }\n>>>>>>>>\n>>>>>>>> -void Timeline::timeout(Timer *timer)\n>>>>>>>> +void Timeline::timeout(Timer * /*timer*/)\n>>>>>>>>  {\n>>>>>>>>  \tutils::time_point now = std::chrono::steady_clock::now();\n>>>>>>>>\n>>>>>>>> diff --git a/src/libcamera/pipeline/uvcvideo.cpp b/src/libcamera/pipeline/uvcvideo.cpp\n>>>>>>>> index fae0ffc4de30..94464c7c7f0c 100644\n>>>>>>>> --- a/src/libcamera/pipeline/uvcvideo.cpp\n>>>>>>>> +++ b/src/libcamera/pipeline/uvcvideo.cpp\n>>>>>>>> @@ -208,7 +208,7 @@ int PipelineHandlerUVC::allocateBuffers(Camera *camera,\n>>>>>>>>  }\n>>>>>>>>\n>>>>>>>>  int PipelineHandlerUVC::freeBuffers(Camera *camera,\n>>>>>>>> -\t\t\t\t    const std::set<Stream *> &streams)\n>>>>>>>> +\t\t\t\t    const std::set<Stream *> & /*streams*/)\n>>>>>>>>  {\n>>>>>>>>  \tUVCCameraData *data = cameraData(camera);\n>>>>>>>>  \treturn data->video_->releaseBuffers();\n>>>>>>>> diff --git a/src/libcamera/pipeline/vimc.cpp b/src/libcamera/pipeline/vimc.cpp\n>>>>>>>> index c16ae4cb76b5..7e325469f178 100644\n>>>>>>>> --- a/src/libcamera/pipeline/vimc.cpp\n>>>>>>>> +++ b/src/libcamera/pipeline/vimc.cpp\n>>>>>>>> @@ -166,7 +166,7 @@ PipelineHandlerVimc::PipelineHandlerVimc(CameraManager *manager)\n>>>>>>>>  {\n>>>>>>>>  }\n>>>>>>>>\n>>>>>>>> -CameraConfiguration *PipelineHandlerVimc::generateConfiguration(Camera *camera,\n>>>>>>>> +CameraConfiguration *PipelineHandlerVimc::generateConfiguration(Camera * /*camera*/,\n>>>>>>>>  \tconst StreamRoles &roles)\n>>>>>>>>  {\n>>>>>>>>  \tCameraConfiguration *config = new VimcCameraConfiguration();\n>>>>>>>> @@ -274,7 +274,7 @@ int PipelineHandlerVimc::allocateBuffers(Camera *camera,\n>>>>>>>>  }\n>>>>>>>>\n>>>>>>>>  int PipelineHandlerVimc::freeBuffers(Camera *camera,\n>>>>>>>> -\t\t\t\t     const std::set<Stream *> &streams)\n>>>>>>>> +\t\t\t\t     const std::set<Stream *> & /*streams*/)\n>>>>>>>>  {\n>>>>>>>>  \tVimcCameraData *data = cameraData(camera);\n>>>>>>>>  \treturn data->video_->releaseBuffers();\n>>>>>>>> diff --git a/src/libcamera/process.cpp b/src/libcamera/process.cpp\n>>>>>>>> index 3b4d0f10da67..44ebfec178fe 100644\n>>>>>>>> --- a/src/libcamera/process.cpp\n>>>>>>>> +++ b/src/libcamera/process.cpp\n>>>>>>>> @@ -89,7 +89,7 @@ void sigact(int signal, siginfo_t *info, void *ucontext)\n>>>>>>>>\n>>>>>>>>  } /* namespace */\n>>>>>>>>\n>>>>>>>> -void ProcessManager::sighandler(EventNotifier *notifier)\n>>>>>>>> +void ProcessManager::sighandler(EventNotifier * /*notifier*/)\n>>>>>>>>  {\n>>>>>>>>  \tchar data;\n>>>>>>>>  \tssize_t ret = read(pipe_[0], &data, sizeof(data));\n>>>>>>>> diff --git a/src/libcamera/proxy/ipa_proxy_linux.cpp b/src/libcamera/proxy/ipa_proxy_linux.cpp\n>>>>>>>> index 4e6fa6899e07..d4ccf5112cd7 100644\n>>>>>>>> --- a/src/libcamera/proxy/ipa_proxy_linux.cpp\n>>>>>>>> +++ b/src/libcamera/proxy/ipa_proxy_linux.cpp\n>>>>>>>> @@ -27,11 +27,11 @@ public:\n>>>>>>>>  \t~IPAProxyLinux();\n>>>>>>>>\n>>>>>>>>  \tint init() override { return 0; }\n>>>>>>>> -\tvoid configure(const std::map<unsigned int, IPAStream> &streamConfig,\n>>>>>>>> -\t\t       const std::map<unsigned int, ControlInfoMap> &entityControls) override {}\n>>>>>>>> -\tvoid mapBuffers(const std::vector<IPABuffer> &buffers) override {}\n>>>>>>>> -\tvoid unmapBuffers(const std::vector<unsigned int> &ids) override {}\n>>>>>>>> -\tvoid processEvent(const IPAOperationData &event) override {}\n>>>>>>>> +\tvoid configure(const std::map<unsigned int, IPAStream> & /*streamConfig*/,\n>>>>>>>> +\t\t       const std::map<unsigned int, ControlInfoMap> & /*entityControls*/) override {}\n>>>>>>>> +\tvoid mapBuffers(const std::vector<IPABuffer> & /*buffers*/) override {}\n>>>>>>>> +\tvoid unmapBuffers(const std::vector<unsigned int> & /*ids*/) override {}\n>>>>>>>> +\tvoid processEvent(const IPAOperationData & /*event*/) override {}\n>>>>>>>>\n>>>>>>>>  private:\n>>>>>>>>  \tvoid readyRead(IPCUnixSocket *ipc);\n>>>>>>>> @@ -86,7 +86,7 @@ IPAProxyLinux::~IPAProxyLinux()\n>>>>>>>>  \tdelete socket_;\n>>>>>>>>  }\n>>>>>>>>\n>>>>>>>> -void IPAProxyLinux::readyRead(IPCUnixSocket *ipc)\n>>>>>>>> +void IPAProxyLinux::readyRead(IPCUnixSocket * /*ipc*/)\n>>>>>>>>  {\n>>>>>>>>  }\n>>>>>>>>\n>>>>>>>> diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp\n>>>>>>>> index 208ab54199b1..87d810d7cfa4 100644\n>>>>>>>> --- a/src/libcamera/v4l2_videodevice.cpp\n>>>>>>>> +++ b/src/libcamera/v4l2_videodevice.cpp\n>>>>>>>> @@ -1141,7 +1141,7 @@ Buffer *V4L2VideoDevice::dequeueBuffer()\n>>>>>>>>   * For Capture video devices the Buffer will contain valid data.\n>>>>>>>>   * For Output video devices the Buffer can be considered empty.\n>>>>>>>>   */\n>>>>>>>> -void V4L2VideoDevice::bufferAvailable(EventNotifier *notifier)\n>>>>>>>> +void V4L2VideoDevice::bufferAvailable(EventNotifier * /*notifier*/)\n>>>>>>>>  {\n>>>>>>>>  \tBuffer *buffer = dequeueBuffer();\n>>>>>>>>  \tif (!buffer)\n>>>>>>>> diff --git a/src/qcam/main.cpp b/src/qcam/main.cpp\n>>>>>>>> index a7ff5c52663b..d8cfc1c3d76b 100644\n>>>>>>>> --- a/src/qcam/main.cpp\n>>>>>>>> +++ b/src/qcam/main.cpp\n>>>>>>>> @@ -17,7 +17,7 @@\n>>>>>>>>  #include \"../cam/options.h\"\n>>>>>>>>  #include \"qt_event_dispatcher.h\"\n>>>>>>>>\n>>>>>>>> -void signalHandler(int signal)\n>>>>>>>> +void signalHandler(int /*signal*/)\n>>>>>>>>  {\n>>>>>>>>  \tstd::cout << \"Exiting\" << std::endl;\n>>>>>>>>  \tqApp->quit();\n>>>>>>>> diff --git a/test/camera/capture.cpp b/test/camera/capture.cpp\n>>>>>>>> index 791ccad15f70..a5fd0a641705 100644\n>>>>>>>> --- a/test/camera/capture.cpp\n>>>>>>>> +++ b/test/camera/capture.cpp\n>>>>>>>> @@ -19,7 +19,7 @@ protected:\n>>>>>>>>  \tunsigned int completeBuffersCount_;\n>>>>>>>>  \tunsigned int completeRequestsCount_;\n>>>>>>>>\n>>>>>>>> -\tvoid bufferComplete(Request *request, Buffer *buffer)\n>>>>>>>> +\tvoid bufferComplete(Request * /*request*/, Buffer *buffer)\n>>>>>>>>  \t{\n>>>>>>>>  \t\tif (buffer->status() != Buffer::BufferSuccess)\n>>>>>>>>  \t\t\treturn;\n>>>>>>>> diff --git a/test/libtest/test.h b/test/libtest/test.h\n>>>>>>>> index ec08bf97c03d..193d7aa99f38 100644\n>>>>>>>> --- a/test/libtest/test.h\n>>>>>>>> +++ b/test/libtest/test.h\n>>>>>>>> @@ -26,11 +26,11 @@ public:\n>>>>>>>>  protected:\n>>>>>>>>  \tvirtual int init() { return 0; }\n>>>>>>>>  \tvirtual int run() = 0;\n>>>>>>>> -\tvirtual void cleanup() { }\n>>>>>>>> +\tvirtual void cleanup() {}\n>>>>>>>>  };\n>>>>>>>>\n>>>>>>>>  #define TEST_REGISTER(klass)\t\t\t\t\t\t\\\n>>>>>>>> -int main(int argc, char *argv[])\t\t\t\t\t\\\n>>>>>>>> +int main(int /*argc*/, char * /*argv*/[])\t\t\t\t\\\n>>>>>>>>  {\t\t\t\t\t\t\t\t\t\\\n>>>>>>>>  \treturn klass().execute();\t\t\t\t\t\\\n>>>>>>>>  }\n>>>>>>>> diff --git a/test/log/log_process.cpp b/test/log/log_process.cpp\n>>>>>>>> index 2df4aa43713c..fa5639dde7cb 100644\n>>>>>>>> --- a/test/log/log_process.cpp\n>>>>>>>> +++ b/test/log/log_process.cpp\n>>>>>>>> @@ -123,7 +123,8 @@ protected:\n>>>>>>>>  \t}\n>>>>>>>>\n>>>>>>>>  private:\n>>>>>>>> -\tvoid procFinished(Process *proc, enum Process::ExitStatus exitStatus, int exitCode)\n>>>>>>>> +\tvoid procFinished(Process * /*proc*/,\n>>>>>>>> +\t\t\t  enum Process::ExitStatus exitStatus, int exitCode)\n>>>>>>>>  \t{\n>>>>>>>>  \t\texitStatus_ = exitStatus;\n>>>>>>>>  \t\texitCode_ = exitCode;\n>>>>>>>> diff --git a/test/message.cpp b/test/message.cpp\n>>>>>>>> index 3775c30a20b3..3e2659c836e3 100644\n>>>>>>>> --- a/test/message.cpp\n>>>>>>>> +++ b/test/message.cpp\n>>>>>>>> @@ -35,7 +35,7 @@ public:\n>>>>>>>>  \tvoid reset() { status_ = NoMessage; }\n>>>>>>>>\n>>>>>>>>  protected:\n>>>>>>>> -\tvoid message(Message *msg)\n>>>>>>>> +\tvoid message(Message * /*msg*/)\n>>>>>>>>  \t{\n>>>>>>>>  \t\tif (thread() != Thread::current())\n>>>>>>>>  \t\t\tstatus_ = InvalidThread;\n>>>>>>>> diff --git a/test/process/process_test.cpp b/test/process/process_test.cpp\n>>>>>>>> index 7e7b3c2c8bf3..2ba3efd08457 100644\n>>>>>>>> --- a/test/process/process_test.cpp\n>>>>>>>> +++ b/test/process/process_test.cpp\n>>>>>>>> @@ -75,7 +75,8 @@ protected:\n>>>>>>>>  \t}\n>>>>>>>>\n>>>>>>>>  private:\n>>>>>>>> -\tvoid procFinished(Process *proc, enum Process::ExitStatus exitStatus, int exitCode)\n>>>>>>>> +\tvoid procFinished(Process * /*proc*/,\n>>>>>>>> +\t\t\t  enum Process::ExitStatus exitStatus, int exitCode)\n>>>>>>>>  \t{\n>>>>>>>>  \t\texitStatus_ = exitStatus;\n>>>>>>>>  \t\texitCode_ = exitCode;\n>>>>>>>> diff --git a/test/timer-thread.cpp b/test/timer-thread.cpp\n>>>>>>>> index 32853b4e80ef..55b7abcbbeab 100644\n>>>>>>>> --- a/test/timer-thread.cpp\n>>>>>>>> +++ b/test/timer-thread.cpp\n>>>>>>>> @@ -39,7 +39,7 @@ public:\n>>>>>>>>  \t}\n>>>>>>>>\n>>>>>>>>  private:\n>>>>>>>> -\tvoid timeoutHandler(Timer *timer)\n>>>>>>>> +\tvoid timeoutHandler(Timer * /*timer*/)\n>>>>>>>>  \t{\n>>>>>>>>  \t\ttimeout_ = true;\n>>>>>>>>  \t}\n>>>>>>>> diff --git a/test/timer.cpp b/test/timer.cpp\n>>>>>>>> index 2bdb006edccb..03df03aa8d69 100644\n>>>>>>>> --- a/test/timer.cpp\n>>>>>>>> +++ b/test/timer.cpp\n>>>>>>>> @@ -56,7 +56,7 @@ public:\n>>>>>>>>  \t}\n>>>>>>>>\n>>>>>>>>  private:\n>>>>>>>> -\tvoid timeoutHandler(Timer *timer)\n>>>>>>>> +\tvoid timeoutHandler(Timer * /*timer*/)\n>>>>>>>>  \t{\n>>>>>>>>  \t\texpiration_ = std::chrono::steady_clock::now();\n>>>>>>>>  \t\tcount_++;\n>","headers":{"Return-Path":"<kieran.bingham@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 837F860C22\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 20 Nov 2019 09:58:51 +0100 (CET)","from [192.168.0.20]\n\t(cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id A1E6D311;\n\tWed, 20 Nov 2019 09:58:50 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1574240330;\n\tbh=FbGWz9sxaYA5QRelvCX++34KPXKFmDScoPk3jRwKaf4=;\n\th=Reply-To:Subject:To:Cc:References:From:Date:In-Reply-To:From;\n\tb=mFn6vHm1RVNL7sceZbKSJxGfcNBZ6I9WngSYQqnzTJ5E0J2CU5iX4X/D8VjTVqO6r\n\t0xvXqUDchpt84pMtuqOQ00RiTX3Dh+DrIvpIwM8OGpxE6ocaqOjiuH1P/xvWYgGRxp\n\t2JWrCLS6tyM8sPL4SlBsPdCN/tb1hN/bQlO3wv6M=","Reply-To":"kieran.bingham@ideasonboard.com","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"Jacopo Mondi <jacopo@jmondi.org>, libcamera-devel@lists.libcamera.org","References":"<20191026213835.15110-1-laurent.pinchart@ideasonboard.com>\n\t<34810c55-0226-253c-56ff-9a756ee5f997@ideasonboard.com>\n\t<20191028103544.GA14017@pendragon.ideasonboard.com>\n\t<20191108194227.GA1058@pendragon.ideasonboard.com>\n\t<20191109103135.s326tbuehyx4mnng@uno.localdomain>\n\t<20191118215304.xccnnvzx2p3bwb6z@uno.localdomain>\n\t<c0de3171-2356-ba13-0e69-dbd63e603896@ideasonboard.com>\n\t<20191119222503.GG17590@pendragon.ideasonboard.com>","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Openpgp":"preference=signencrypt","Autocrypt":"addr=kieran.bingham@ideasonboard.com; keydata=\n\tmQINBFYE/WYBEACs1PwjMD9rgCu1hlIiUA1AXR4rv2v+BCLUq//vrX5S5bjzxKAryRf0uHat\n\tV/zwz6hiDrZuHUACDB7X8OaQcwhLaVlq6byfoBr25+hbZG7G3+5EUl9cQ7dQEdvNj6V6y/SC\n\trRanWfelwQThCHckbobWiQJfK9n7rYNcPMq9B8e9F020LFH7Kj6YmO95ewJGgLm+idg1Kb3C\n\tpotzWkXc1xmPzcQ1fvQMOfMwdS+4SNw4rY9f07Xb2K99rjMwZVDgESKIzhsDB5GY465sCsiQ\n\tcSAZRxqE49RTBq2+EQsbrQpIc8XiffAB8qexh5/QPzCmR4kJgCGeHIXBtgRj+nIkCJPZvZtf\n\tKr2EAbc6tgg6DkAEHJb+1okosV09+0+TXywYvtEop/WUOWQ+zo+Y/OBd+8Ptgt1pDRyOBzL8\n\tRXa8ZqRf0Mwg75D+dKntZeJHzPRJyrlfQokngAAs4PaFt6UfS+ypMAF37T6CeDArQC41V3ko\n\tlPn1yMsVD0p+6i3DPvA/GPIksDC4owjnzVX9kM8Zc5Cx+XoAN0w5Eqo4t6qEVbuettxx55gq\n\t8K8FieAjgjMSxngo/HST8TpFeqI5nVeq0/lqtBRQKumuIqDg+Bkr4L1V/PSB6XgQcOdhtd36\n\tOe9X9dXB8YSNt7VjOcO7BTmFn/Z8r92mSAfHXpb07YJWJosQOQARAQABtDBLaWVyYW4gQmlu\n\tZ2hhbSA8a2llcmFuLmJpbmdoYW1AaWRlYXNvbmJvYXJkLmNvbT6JAlcEEwEKAEECGwMFCwkI\n\tBwIGFQgJCgsCBBYCAwECHgECF4ACGQEWIQSQLdeYP70o/eNy1HqhHkZyEKRh/QUCXWTtygUJ\n\tCyJXZAAKCRChHkZyEKRh/f8dEACTDsbLN2nioNZMwyLuQRUAFcXNolDX48xcUXsWS2QjxaPm\n\tVsJx8Uy8aYkS85mdPBh0C83OovQR/OVbr8AxhGvYqBs3nQvbWuTl/+4od7DfK2VZOoKBAu5S\n\tQK2FYuUcikDqYcFWJ8DQnubxfE8dvzojHEkXw0sA4igINHDDFX3HJGZtLio+WpEFQtCbfTAG\n\tYZslasz1YZRbwEdSsmO3/kqy5eMnczlm8a21A3fKUo3g8oAZEFM+f4DUNzqIltg31OAB/kZS\n\tenKZQ/SWC8PmLg/ZXBrReYakxXtkP6w3FwMlzOlhGxqhIRNiAJfXJBaRhuUWzPOpEDE9q5YJ\n\tBmqQL2WJm1VSNNVxbXJHpaWMH1sA2R00vmvRrPXGwyIO0IPYeUYQa3gsy6k+En/aMQJd27dp\n\taScf9am9PFICPY5T4ppneeJLif2lyLojo0mcHOV+uyrds9XkLpp14GfTkeKPdPMrLLTsHRfH\n\tfA4I4OBpRrEPiGIZB/0im98MkGY/Mu6qxeZmYLCcgD6qz4idOvfgVOrNh+aA8HzIVR+RMW8H\n\tQGBN9f0E3kfwxuhl3omo6V7lDw8XOdmuWZNC9zPq1UfryVHANYbLGz9KJ4Aw6M+OgBC2JpkD\n\thXMdHUkC+d20dwXrwHTlrJi1YNp6rBc+xald3wsUPOZ5z8moTHUX/uPA/qhGsbkCDQRWBP1m\n\tARAAzijkb+Sau4hAncr1JjOY+KyFEdUNxRy+hqTJdJfaYihxyaj0Ee0P0zEi35CbE6lgU0Uz\n\ttih9fiUbSV3wfsWqg1Ut3/5rTKu7kLFp15kF7eqvV4uezXRD3Qu4yjv/rMmEJbbD4cTvGCYI\n\td6MDC417f7vK3hCbCVIZSp3GXxyC1LU+UQr3fFcOyCwmP9vDUR9JV0BSqHHxRDdpUXE26Dk6\n\tmhf0V1YkspE5St814ETXpEus2urZE5yJIUROlWPIL+hm3NEWfAP06vsQUyLvr/GtbOT79vXl\n\tEn1aulcYyu20dRRxhkQ6iILaURcxIAVJJKPi8dsoMnS8pB0QW12AHWuirPF0g6DiuUfPmrA5\n\tPKe56IGlpkjc8cO51lIxHkWTpCMWigRdPDexKX+Sb+W9QWK/0JjIc4t3KBaiG8O4yRX8ml2R\n\t+rxfAVKM6V769P/hWoRGdgUMgYHFpHGSgEt80OKK5HeUPy2cngDUXzwrqiM5Sz6Od0qw5pCk\n\tNlXqI0W/who0iSVM+8+RmyY0OEkxEcci7rRLsGnM15B5PjLJjh1f2ULYkv8s4SnDwMZ/kE04\n\t/UqCMK/KnX8pwXEMCjz0h6qWNpGwJ0/tYIgQJZh6bqkvBrDogAvuhf60Sogw+mH8b+PBlx1L\n\toeTK396wc+4c3BfiC6pNtUS5GpsPMMjYMk7kVvEAEQEAAYkCPAQYAQoAJgIbDBYhBJAt15g/\n\tvSj943LUeqEeRnIQpGH9BQJdizzIBQkLSKZiAAoJEKEeRnIQpGH9eYgQAJpjaWNgqNOnMTmD\n\tMJggbwjIotypzIXfhHNCeTkG7+qCDlSaBPclcPGYrTwCt0YWPU2TgGgJrVhYT20ierN8LUvj\n\t6qOPTd+Uk7NFzL65qkh80ZKNBFddx1AabQpSVQKbdcLb8OFs85kuSvFdgqZwgxA1vl4TFhNz\n\tPZ79NAmXLackAx3sOVFhk4WQaKRshCB7cSl+RIng5S/ThOBlwNlcKG7j7W2MC06BlTbdEkUp\n\tECzuuRBv8wX4OQl+hbWbB/VKIx5HKlLu1eypen/5lNVzSqMMIYkkZcjV2SWQyUGxSwq0O/sx\n\tS0A8/atCHUXOboUsn54qdxrVDaK+6jIAuo8JiRWctP16KjzUM7MO0/+4zllM8EY57rXrj48j\n\tsbEYX0YQnzaj+jO6kJtoZsIaYR7rMMq9aUAjyiaEZpmP1qF/2sYenDx0Fg2BSlLvLvXM0vU8\n\tpQk3kgDu7kb/7PRYrZvBsr21EIQoIjXbZxDz/o7z95frkP71EaICttZ6k9q5oxxA5WC6sTXc\n\tMW8zs8avFNuA9VpXt0YupJd2ijtZy2mpZNG02fFVXhIn4G807G7+9mhuC4XG5rKlBBUXTvPU\n\tAfYnB4JBDLmLzBFavQfvonSfbitgXwCG3vS+9HEwAjU30Bar1PEOmIbiAoMzuKeRm2LVpmq4\n\tWZw01QYHU/GUV/zHJSFk","Organization":"Ideas on Board","Message-ID":"<9564bc8b-d413-f110-e559-68cc26a10193@ideasonboard.com>","Date":"Wed, 20 Nov 2019 08:58:47 +0000","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101\n\tThunderbird/60.9.0","MIME-Version":"1.0","In-Reply-To":"<20191119222503.GG17590@pendragon.ideasonboard.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-GB","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [PATCH/RFC] meson: Remove\n\t-Wno-unused-parameter","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Wed, 20 Nov 2019 08:58:51 -0000"}},{"id":3125,"web_url":"https://patchwork.libcamera.org/comment/3125/","msgid":"<20191121081712.GI4958@pendragon.ideasonboard.com>","date":"2019-11-21T08:17:12","subject":"Re: [libcamera-devel] [PATCH/RFC] meson: Remove\n\t-Wno-unused-parameter","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Kieran,\n\nOn Wed, Nov 20, 2019 at 08:58:47AM +0000, Kieran Bingham wrote:\n> On 19/11/2019 22:25, Laurent Pinchart wrote:\n> > On Tue, Nov 19, 2019 at 01:35:41PM +0000, Kieran Bingham wrote:\n> >> On 18/11/2019 21:53, Jacopo Mondi wrote:\n> >>> On Sat, Nov 09, 2019 at 11:31:35AM +0100, Jacopo Mondi wrote:\n> >>>> Hi Laurent,\n> >>>\n> >>> Sorry, I forgot to add my tag\n> >>> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>\n> >>>\n> >>>> On Fri, Nov 08, 2019 at 09:42:27PM +0200, Laurent Pinchart wrote:\n> >>>>> On Mon, Oct 28, 2019 at 12:35:44PM +0200, Laurent Pinchart wrote:\n> >>>>>> On Mon, Oct 28, 2019 at 09:32:14AM +0000, Kieran Bingham wrote:\n> >>>>>>> On 26/10/2019 22:38, Laurent Pinchart wrote:\n> >>>>>>>> We build libcamera with -Wno-unused-parameter and this doesn't cause\n> >>>>>>>> much issue internally. However, it prevents catching unused parameters\n> >>>>>>>> in inline functions defined in public headers. This can lead to\n> >>>>>>>> compilation warnings for applications compiled without\n> >>>>>>>> -Wno-unused-parameter.\n> >>>>>>>>\n> >>>>>>>> To catch those issues, remove -Wno-unused-parameter and fix all the\n> >>>>>>>> related warnings.\n> >>>>>>>\n> >>>>>>> What's your opinion on defining an unused(variable) (named otherwise if\n> >>>>>>> required) macro so that we can declare unused variables in the code\n> >>>>>>> base, and keep the function prototypes clean?\n> >>>>>>>\n> >>>>>>> i.e.\n> >>>>>>>\n> >>>>>>> #define unused(_x) (void)(_x)\n> >>>>>>>\n> >>>>>>>  ControlValue ControlValue::load(ByteStreamBuffer &b, ControlType type,\n> >>>>>>>                                 unsigned int count)\n> >>>>>>>  {\n> >>>>>>> +       unused(count);\n> >>>>>>> +\n> >>>>>>>         switch (type) {\n> >>>>>>>         case ControlTypeBool: {\n> >>>>>>>                 bool value;\n> >>>>>>>   ...\n> >>>>>>>  }\n> >>>>>>>\n> >>>>>>> I think something like that would allow cleaner function declarations,\n> >>>>>>> that do not need to be modified once someone actually uses the variable\n> >>>>>>> in question. Simply remove the 'unused' declaration ?\n> >>>>>>\n> >>>>>> I'm afraid I don't like that :-) First of all, compilers may not always\n> >>>>>> be fooled by that particular implementation, and we'll play a game of\n> >>>>>> whack-a-mole as new compiler versions are released. Then, removing the\n> >>>>>> variable name is specified by the C++ standard as the official way to\n> >>>>>> note that a variable is unused. I don't think we should use a different,\n> >>>>>> non-standard implementation.\n> >>\n> >> For clarification - I fully agree that removing -Wno-unused-parameter is\n> >> a good thing. I'm very much a -Wall -Wextra -Werror kind of guy. Fix all\n> >> the warnings, before someone else has to, and don't cause warnings for\n> >> other people.\n> >>\n> >> In terms of style, I am not fond of changing the function prototype, so\n> >> here's a last ditch effort of suggesting an alternate Unused()\n> >> definition type based on templates which I think should always work?\n> >> (Because the argument is used, but optimised out)\n> >>\n> >>\n> >> From: https://stackoverflow.com/a/39746834/3660427\n> >>\n> >> template <typename T>\n> >> void Unused(T&& /*No name*/) { /*Empty*/ }\n> >>\n> >> void func(int i)\n> >> {\n> >>    Unused(i); // Silent warning for unused variable\n> >> }\n> >>\n> >>\n> >> And that's purely because I believe it's cleaner to remove the Unused()\n> >> line when you want to then /use/ that variable rather than modify the\n> >> function prototype.\n> >>\n> >> But - I'll not nack this patch based on that.\n> >>\n> >> It's a shame that adding the name in via comments adds too many *'s though:\n> >>\n> >>> -static int hal_open_legacy(const struct hw_module_t *module, const char *id,\n> >>> -\t\t\t   uint32_t halVersion, struct hw_device_t **device)\n> >>> +static int hal_open_legacy(const struct hw_module_t * /*module*/,\n> >>> +\t\t\t   const char * /*id*/, uint32_t /*halVersion*/,\n> >>> +\t\t\t   struct hw_device_t ** /*device*/)\n> >>\n> >> I fear the /*device*/ reduces readability (IMO), but if you believe this\n> >> is the best way to solve the topic, then:\n> >>\n> >> Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> > \n> > The part that bothers me with the Unused() function above is that C++\n> > provides a standard way to state a parameter is unused, and using a\n> \n> Can you reference the C++ standard where this is mentioned please so it\n> can easily be found (/I can easily find it).\n\nLooks like I was wrong. The only reference I can find in the C++\nstandard is in section 11.4.1.6 of\nhttp://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/n4659.pdf:\n\n\"[ Note: Unused parameters need not be named.\"\n\n> > different method seems a bit of a hack to me. There's also a small risk\n> > that new compiler versions could still produce a warning if they get too\n> > clever about our hacks :-S\n> \n> Seems like worrying about something that hasn't happened to me, but like\n> I said, I'm just giving my view - You can push this patch as you wish.\n\nI agree with you, it may be an unnecessary worry.\n\n> > If we want not to comment out parameter names we could use\n> > __attribute__((__unused__)), but I think that would be even less\n> > readable.\n> \n> That's easily wrapped in a macro just like the kernel does.\n\nGiven that the C++ standard doesn't specify unnamed parameters to be the\nofficial way to silence unused parameters warnings, I think this is\nacceptable.\n\nWhere should we then put this ? Would a compiler.h header make sense ?\nOr we could use __attribute__((__unused__)) explicitly, or\n[[gnu:unused]]. This would in any case (even with a macro) result in\nlonger lines than commenting out the parameter name :-) I still prefer\ncommenting it out for this reason, but if the majority disagrees with\nme, I'll give up :-)\n\n> >>>>>> This patch stems from a warning generated when compiling a small test\n> >>>>>> code against libcamera out of the libcamera source tree, without\n> >>>>>> -Wno-unused-parameter. It turns out we had a single issue in public\n> >>>>>> headers, so we will likely not introduce other such issues in the\n> >>>>>> headers very often. We could thus decide not to care about it and catch\n> >>>>>> the issues when they are reported. I however think there's value in\n> >>>>>> dropping the compiler option though (otherwise I wouldn't have sent this\n> >>>>>> patch in the first place :-)).\n> >>>>>\n> >>>>> Ping ? I'd like to reach a consensus on this and decide if we should\n> >>>>> drop the patch (and thus live with the small but real risk that\n> >>>>> applications that use -Wunused-parameters would get a build warning) or\n> >>>>> keep it, in this form or another.\n> >>>>\n> >>>> I think the priority here is to make sure applications do not get\n> >>>> warnings when building with -Wunused-parameters, so I'm finw with\n> >>>> either removing the parameter's name completely from the function\n> >>>> definition or commenting it out, which I like less but mostly because\n> >>>> of how it looks, so I'm fine with both, as long as we make sure\n> >>>> applications do not get warnings...\n> >>>>\n> >>>>>>>> Fix an additional checkstyle.py error while at it.\n> >>>>>>>>\n> >>>>>>>> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> >>>>>>>> ---\n> >>>>>>>>  meson.build                                |  1 -\n> >>>>>>>>  src/android/camera3_hal.cpp                |  9 +++++----\n> >>>>>>>>  src/android/camera_device.cpp              |  4 ++--\n> >>>>>>>>  src/android/camera_proxy.cpp               |  4 ++--\n> >>>>>>>>  src/cam/main.cpp                           |  2 +-\n> >>>>>>>>  src/ipa/ipa_vimc.cpp                       | 10 +++++-----\n> >>>>>>>>  src/ipa/rkisp1/rkisp1.cpp                  |  2 +-\n> >>>>>>>>  src/libcamera/device_enumerator_udev.cpp   |  2 +-\n> >>>>>>>>  src/libcamera/ipc_unixsocket.cpp           |  2 +-\n> >>>>>>>>  src/libcamera/pipeline/ipu3/ipu3.cpp       |  2 +-\n> >>>>>>>>  src/libcamera/pipeline/rkisp1/rkisp1.cpp   |  2 +-\n> >>>>>>>>  src/libcamera/pipeline/rkisp1/timeline.cpp |  2 +-\n> >>>>>>>>  src/libcamera/pipeline/uvcvideo.cpp        |  2 +-\n> >>>>>>>>  src/libcamera/pipeline/vimc.cpp            |  4 ++--\n> >>>>>>>>  src/libcamera/process.cpp                  |  2 +-\n> >>>>>>>>  src/libcamera/proxy/ipa_proxy_linux.cpp    | 12 ++++++------\n> >>>>>>>>  src/libcamera/v4l2_videodevice.cpp         |  2 +-\n> >>>>>>>>  src/qcam/main.cpp                          |  2 +-\n> >>>>>>>>  test/camera/capture.cpp                    |  2 +-\n> >>>>>>>>  test/libtest/test.h                        |  4 ++--\n> >>>>>>>>  test/log/log_process.cpp                   |  3 ++-\n> >>>>>>>>  test/message.cpp                           |  2 +-\n> >>>>>>>>  test/process/process_test.cpp              |  3 ++-\n> >>>>>>>>  test/timer-thread.cpp                      |  2 +-\n> >>>>>>>>  test/timer.cpp                             |  2 +-\n> >>>>>>>>  25 files changed, 43 insertions(+), 41 deletions(-)\n> >>>>>>>>\n> >>>>>>>> diff --git a/meson.build b/meson.build\n> >>>>>>>> index 72ad7c8b493b..19a921a8ba6a 100644\n> >>>>>>>> --- a/meson.build\n> >>>>>>>> +++ b/meson.build\n> >>>>>>>> @@ -31,7 +31,6 @@ if cc.has_header_symbol('stdlib.h', 'secure_getenv', prefix : '#define _GNU_SOUR\n> >>>>>>>>  endif\n> >>>>>>>>\n> >>>>>>>>  common_arguments = [\n> >>>>>>>> -    '-Wno-unused-parameter',\n> >>>>>>>>      '-include', 'config.h',\n> >>>>>>>>  ]\n> >>>>>>>>\n> >>>>>>>> diff --git a/src/android/camera3_hal.cpp b/src/android/camera3_hal.cpp\n> >>>>>>>> index 8d2629ca356c..a7f470172583 100644\n> >>>>>>>> --- a/src/android/camera3_hal.cpp\n> >>>>>>>> +++ b/src/android/camera3_hal.cpp\n> >>>>>>>> @@ -31,18 +31,19 @@ static int hal_get_camera_info(int id, struct camera_info *info)\n> >>>>>>>>  \treturn cameraManager.getCameraInfo(id, info);\n> >>>>>>>>  }\n> >>>>>>>>\n> >>>>>>>> -static int hal_set_callbacks(const camera_module_callbacks_t *callbacks)\n> >>>>>>>> +static int hal_set_callbacks(const camera_module_callbacks_t * /*callbacks*/)\n> >>>>>>>>  {\n> >>>>>>>>  \treturn 0;\n> >>>>>>>>  }\n> >>>>>>>>\n> >>>>>>>> -static int hal_open_legacy(const struct hw_module_t *module, const char *id,\n> >>>>>>>> -\t\t\t   uint32_t halVersion, struct hw_device_t **device)\n> >>>>>>>> +static int hal_open_legacy(const struct hw_module_t * /*module*/,\n> >>>>>>>> +\t\t\t   const char * /*id*/, uint32_t /*halVersion*/,\n> >>>>>>>> +\t\t\t   struct hw_device_t ** /*device*/)\n> >>>>>>>>  {\n> >>>>>>>>  \treturn -ENOSYS;\n> >>>>>>>>  }\n> >>>>>>>>\n> >>>>>>>> -static int hal_set_torch_mode(const char *camera_id, bool enabled)\n> >>>>>>>> +static int hal_set_torch_mode(const char * /*camera_id*/, bool /*enabled*/)\n> >>>>>>>>  {\n> >>>>>>>>  \treturn -ENOSYS;\n> >>>>>>>>  }\n> >>>>>>>> diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\n> >>>>>>>> index c7c9b3fd1724..b0ba1cf0a921 100644\n> >>>>>>>> --- a/src/android/camera_device.cpp\n> >>>>>>>> +++ b/src/android/camera_device.cpp\n> >>>>>>>> @@ -49,7 +49,7 @@ CameraDevice::Camera3RequestDescriptor::~Camera3RequestDescriptor()\n> >>>>>>>>   * to the framework using the designated callbacks.\n> >>>>>>>>   */\n> >>>>>>>>\n> >>>>>>>> -CameraDevice::CameraDevice(unsigned int id, const std::shared_ptr<Camera> &camera)\n> >>>>>>>> +CameraDevice::CameraDevice(unsigned int /*id*/, const std::shared_ptr<Camera> &camera)\n> >>>>>>>>  \t: running_(false), camera_(camera), staticMetadata_(nullptr)\n> >>>>>>>>  {\n> >>>>>>>>  \tcamera_->requestCompleted.connect(this, &CameraDevice::requestComplete);\n> >>>>>>>> @@ -875,7 +875,7 @@ void CameraDevice::notifyError(uint32_t frameNumber, camera3_stream_t *stream)\n> >>>>>>>>  /*\n> >>>>>>>>   * Produce a set of fixed result metadata.\n> >>>>>>>>   */\n> >>>>>>>> -std::unique_ptr<CameraMetadata> CameraDevice::getResultMetadata(int frame_number,\n> >>>>>>>> +std::unique_ptr<CameraMetadata> CameraDevice::getResultMetadata(int /*frame_number*/,\n> >>>>>>>>  \t\t\t\t\t\t\t\tint64_t timestamp)\n> >>>>>>>>  {\n> >>>>>>>>  \t/*\n> >>>>>>>> diff --git a/src/android/camera_proxy.cpp b/src/android/camera_proxy.cpp\n> >>>>>>>> index 4f5c0a024903..c9f98c784eec 100644\n> >>>>>>>> --- a/src/android/camera_proxy.cpp\n> >>>>>>>> +++ b/src/android/camera_proxy.cpp\n> >>>>>>>> @@ -79,11 +79,11 @@ static int hal_dev_process_capture_request(const struct camera3_device *dev,\n> >>>>>>>>  \treturn proxy->processCaptureRequest(request);\n> >>>>>>>>  }\n> >>>>>>>>\n> >>>>>>>> -static void hal_dev_dump(const struct camera3_device *dev, int fd)\n> >>>>>>>> +static void hal_dev_dump(const struct camera3_device * /*dev*/, int /*fd*/)\n> >>>>>>>>  {\n> >>>>>>>>  }\n> >>>>>>>>\n> >>>>>>>> -static int hal_dev_flush(const struct camera3_device *dev)\n> >>>>>>>> +static int hal_dev_flush(const struct camera3_device * /*dev*/)\n> >>>>>>>>  {\n> >>>>>>>>  \treturn 0;\n> >>>>>>>>  }\n> >>>>>>>> diff --git a/src/cam/main.cpp b/src/cam/main.cpp\n> >>>>>>>> index 9d99f5587cbb..ceb0efeff045 100644\n> >>>>>>>> --- a/src/cam/main.cpp\n> >>>>>>>> +++ b/src/cam/main.cpp\n> >>>>>>>> @@ -326,7 +326,7 @@ int CamApp::run()\n> >>>>>>>>  \treturn 0;\n> >>>>>>>>  }\n> >>>>>>>>\n> >>>>>>>> -void signalHandler(int signal)\n> >>>>>>>> +void signalHandler(int /*signal*/)\n> >>>>>>>>  {\n> >>>>>>>>  \tstd::cout << \"Exiting\" << std::endl;\n> >>>>>>>>  \tCamApp::instance()->quit();\n> >>>>>>>> diff --git a/src/ipa/ipa_vimc.cpp b/src/ipa/ipa_vimc.cpp\n> >>>>>>>> index 63d578b4e2aa..16c7e0732d40 100644\n> >>>>>>>> --- a/src/ipa/ipa_vimc.cpp\n> >>>>>>>> +++ b/src/ipa/ipa_vimc.cpp\n> >>>>>>>> @@ -30,11 +30,11 @@ public:\n> >>>>>>>>  \t~IPAVimc();\n> >>>>>>>>\n> >>>>>>>>  \tint init() override;\n> >>>>>>>> -\tvoid configure(const std::map<unsigned int, IPAStream> &streamConfig,\n> >>>>>>>> -\t\t       const std::map<unsigned int, ControlInfoMap> &entityControls) override {}\n> >>>>>>>> -\tvoid mapBuffers(const std::vector<IPABuffer> &buffers) override {}\n> >>>>>>>> -\tvoid unmapBuffers(const std::vector<unsigned int> &ids) override {}\n> >>>>>>>> -\tvoid processEvent(const IPAOperationData &event) override {}\n> >>>>>>>> +\tvoid configure(const std::map<unsigned int, IPAStream> & /*streamConfig*/,\n> >>>>>>>> +\t\t       const std::map<unsigned int, ControlInfoMap> & /*entityControls*/) override {}\n> >>>>>>>> +\tvoid mapBuffers(const std::vector<IPABuffer> & /*buffers*/) override {}\n> >>>>>>>> +\tvoid unmapBuffers(const std::vector<unsigned int> & /*ids*/) override {}\n> >>>>>>>> +\tvoid processEvent(const IPAOperationData & /*event*/) override {}\n> >>>>>>>>\n> >>>>>>>>  private:\n> >>>>>>>>  \tvoid initTrace();\n> >>>>>>>> diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp\n> >>>>>>>> index 9a13f5c7df17..84f270791340 100644\n> >>>>>>>> --- a/src/ipa/rkisp1/rkisp1.cpp\n> >>>>>>>> +++ b/src/ipa/rkisp1/rkisp1.cpp\n> >>>>>>>> @@ -61,7 +61,7 @@ private:\n> >>>>>>>>  \tuint32_t maxGain_;\n> >>>>>>>>  };\n> >>>>>>>>\n> >>>>>>>> -void IPARkISP1::configure(const std::map<unsigned int, IPAStream> &streamConfig,\n> >>>>>>>> +void IPARkISP1::configure(const std::map<unsigned int, IPAStream> & /*streamConfig*/,\n> >>>>>>>>  \t\t\t  const std::map<unsigned int, ControlInfoMap> &entityControls)\n> >>>>>>>>  {\n> >>>>>>>>  \tif (entityControls.empty())\n> >>>>>>>> diff --git a/src/libcamera/device_enumerator_udev.cpp b/src/libcamera/device_enumerator_udev.cpp\n> >>>>>>>> index b2c5fd221dcd..6e0fbbd8c70c 100644\n> >>>>>>>> --- a/src/libcamera/device_enumerator_udev.cpp\n> >>>>>>>> +++ b/src/libcamera/device_enumerator_udev.cpp\n> >>>>>>>> @@ -309,7 +309,7 @@ int DeviceEnumeratorUdev::addV4L2Device(dev_t devnum)\n> >>>>>>>>  \treturn 0;\n> >>>>>>>>  }\n> >>>>>>>>\n> >>>>>>>> -void DeviceEnumeratorUdev::udevNotify(EventNotifier *notifier)\n> >>>>>>>> +void DeviceEnumeratorUdev::udevNotify(EventNotifier * /*notifier*/)\n> >>>>>>>>  {\n> >>>>>>>>  \tstruct udev_device *dev = udev_monitor_receive_device(monitor_);\n> >>>>>>>>  \tstd::string action(udev_device_get_action(dev));\n> >>>>>>>> diff --git a/src/libcamera/ipc_unixsocket.cpp b/src/libcamera/ipc_unixsocket.cpp\n> >>>>>>>> index def08eef00f8..eb594268dd6c 100644\n> >>>>>>>> --- a/src/libcamera/ipc_unixsocket.cpp\n> >>>>>>>> +++ b/src/libcamera/ipc_unixsocket.cpp\n> >>>>>>>> @@ -306,7 +306,7 @@ int IPCUnixSocket::recvData(void *buffer, size_t length,\n> >>>>>>>>  \treturn 0;\n> >>>>>>>>  }\n> >>>>>>>>\n> >>>>>>>> -void IPCUnixSocket::dataNotifier(EventNotifier *notifier)\n> >>>>>>>> +void IPCUnixSocket::dataNotifier(EventNotifier * /*notifier*/)\n> >>>>>>>>  {\n> >>>>>>>>  \tint ret;\n> >>>>>>>>\n> >>>>>>>> diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> >>>>>>>> index 8d3ad568d16e..84356646b736 100644\n> >>>>>>>> --- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n> >>>>>>>> +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> >>>>>>>> @@ -700,7 +700,7 @@ error:\n> >>>>>>>>  }\n> >>>>>>>>\n> >>>>>>>>  int PipelineHandlerIPU3::freeBuffers(Camera *camera,\n> >>>>>>>> -\t\t\t\t     const std::set<Stream *> &streams)\n> >>>>>>>> +\t\t\t\t     const std::set<Stream *> & /*streams*/)\n> >>>>>>>>  {\n> >>>>>>>>  \tIPU3CameraData *data = cameraData(camera);\n> >>>>>>>>\n> >>>>>>>> diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> >>>>>>>> index 7a28b03b8d38..aed060bada70 100644\n> >>>>>>>> --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> >>>>>>>> +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> >>>>>>>> @@ -703,7 +703,7 @@ int PipelineHandlerRkISP1::allocateBuffers(Camera *camera,\n> >>>>>>>>  }\n> >>>>>>>>\n> >>>>>>>>  int PipelineHandlerRkISP1::freeBuffers(Camera *camera,\n> >>>>>>>> -\t\t\t\t       const std::set<Stream *> &streams)\n> >>>>>>>> +\t\t\t\t       const std::set<Stream *> & /*streams*/)\n> >>>>>>>>  {\n> >>>>>>>>  \tRkISP1CameraData *data = cameraData(camera);\n> >>>>>>>>\n> >>>>>>>> diff --git a/src/libcamera/pipeline/rkisp1/timeline.cpp b/src/libcamera/pipeline/rkisp1/timeline.cpp\n> >>>>>>>> index f6c6434d7b53..59e6de78c79d 100644\n> >>>>>>>> --- a/src/libcamera/pipeline/rkisp1/timeline.cpp\n> >>>>>>>> +++ b/src/libcamera/pipeline/rkisp1/timeline.cpp\n> >>>>>>>> @@ -204,7 +204,7 @@ void Timeline::updateDeadline()\n> >>>>>>>>  \ttimer_.start(deadline);\n> >>>>>>>>  }\n> >>>>>>>>\n> >>>>>>>> -void Timeline::timeout(Timer *timer)\n> >>>>>>>> +void Timeline::timeout(Timer * /*timer*/)\n> >>>>>>>>  {\n> >>>>>>>>  \tutils::time_point now = std::chrono::steady_clock::now();\n> >>>>>>>>\n> >>>>>>>> diff --git a/src/libcamera/pipeline/uvcvideo.cpp b/src/libcamera/pipeline/uvcvideo.cpp\n> >>>>>>>> index fae0ffc4de30..94464c7c7f0c 100644\n> >>>>>>>> --- a/src/libcamera/pipeline/uvcvideo.cpp\n> >>>>>>>> +++ b/src/libcamera/pipeline/uvcvideo.cpp\n> >>>>>>>> @@ -208,7 +208,7 @@ int PipelineHandlerUVC::allocateBuffers(Camera *camera,\n> >>>>>>>>  }\n> >>>>>>>>\n> >>>>>>>>  int PipelineHandlerUVC::freeBuffers(Camera *camera,\n> >>>>>>>> -\t\t\t\t    const std::set<Stream *> &streams)\n> >>>>>>>> +\t\t\t\t    const std::set<Stream *> & /*streams*/)\n> >>>>>>>>  {\n> >>>>>>>>  \tUVCCameraData *data = cameraData(camera);\n> >>>>>>>>  \treturn data->video_->releaseBuffers();\n> >>>>>>>> diff --git a/src/libcamera/pipeline/vimc.cpp b/src/libcamera/pipeline/vimc.cpp\n> >>>>>>>> index c16ae4cb76b5..7e325469f178 100644\n> >>>>>>>> --- a/src/libcamera/pipeline/vimc.cpp\n> >>>>>>>> +++ b/src/libcamera/pipeline/vimc.cpp\n> >>>>>>>> @@ -166,7 +166,7 @@ PipelineHandlerVimc::PipelineHandlerVimc(CameraManager *manager)\n> >>>>>>>>  {\n> >>>>>>>>  }\n> >>>>>>>>\n> >>>>>>>> -CameraConfiguration *PipelineHandlerVimc::generateConfiguration(Camera *camera,\n> >>>>>>>> +CameraConfiguration *PipelineHandlerVimc::generateConfiguration(Camera * /*camera*/,\n> >>>>>>>>  \tconst StreamRoles &roles)\n> >>>>>>>>  {\n> >>>>>>>>  \tCameraConfiguration *config = new VimcCameraConfiguration();\n> >>>>>>>> @@ -274,7 +274,7 @@ int PipelineHandlerVimc::allocateBuffers(Camera *camera,\n> >>>>>>>>  }\n> >>>>>>>>\n> >>>>>>>>  int PipelineHandlerVimc::freeBuffers(Camera *camera,\n> >>>>>>>> -\t\t\t\t     const std::set<Stream *> &streams)\n> >>>>>>>> +\t\t\t\t     const std::set<Stream *> & /*streams*/)\n> >>>>>>>>  {\n> >>>>>>>>  \tVimcCameraData *data = cameraData(camera);\n> >>>>>>>>  \treturn data->video_->releaseBuffers();\n> >>>>>>>> diff --git a/src/libcamera/process.cpp b/src/libcamera/process.cpp\n> >>>>>>>> index 3b4d0f10da67..44ebfec178fe 100644\n> >>>>>>>> --- a/src/libcamera/process.cpp\n> >>>>>>>> +++ b/src/libcamera/process.cpp\n> >>>>>>>> @@ -89,7 +89,7 @@ void sigact(int signal, siginfo_t *info, void *ucontext)\n> >>>>>>>>\n> >>>>>>>>  } /* namespace */\n> >>>>>>>>\n> >>>>>>>> -void ProcessManager::sighandler(EventNotifier *notifier)\n> >>>>>>>> +void ProcessManager::sighandler(EventNotifier * /*notifier*/)\n> >>>>>>>>  {\n> >>>>>>>>  \tchar data;\n> >>>>>>>>  \tssize_t ret = read(pipe_[0], &data, sizeof(data));\n> >>>>>>>> diff --git a/src/libcamera/proxy/ipa_proxy_linux.cpp b/src/libcamera/proxy/ipa_proxy_linux.cpp\n> >>>>>>>> index 4e6fa6899e07..d4ccf5112cd7 100644\n> >>>>>>>> --- a/src/libcamera/proxy/ipa_proxy_linux.cpp\n> >>>>>>>> +++ b/src/libcamera/proxy/ipa_proxy_linux.cpp\n> >>>>>>>> @@ -27,11 +27,11 @@ public:\n> >>>>>>>>  \t~IPAProxyLinux();\n> >>>>>>>>\n> >>>>>>>>  \tint init() override { return 0; }\n> >>>>>>>> -\tvoid configure(const std::map<unsigned int, IPAStream> &streamConfig,\n> >>>>>>>> -\t\t       const std::map<unsigned int, ControlInfoMap> &entityControls) override {}\n> >>>>>>>> -\tvoid mapBuffers(const std::vector<IPABuffer> &buffers) override {}\n> >>>>>>>> -\tvoid unmapBuffers(const std::vector<unsigned int> &ids) override {}\n> >>>>>>>> -\tvoid processEvent(const IPAOperationData &event) override {}\n> >>>>>>>> +\tvoid configure(const std::map<unsigned int, IPAStream> & /*streamConfig*/,\n> >>>>>>>> +\t\t       const std::map<unsigned int, ControlInfoMap> & /*entityControls*/) override {}\n> >>>>>>>> +\tvoid mapBuffers(const std::vector<IPABuffer> & /*buffers*/) override {}\n> >>>>>>>> +\tvoid unmapBuffers(const std::vector<unsigned int> & /*ids*/) override {}\n> >>>>>>>> +\tvoid processEvent(const IPAOperationData & /*event*/) override {}\n> >>>>>>>>\n> >>>>>>>>  private:\n> >>>>>>>>  \tvoid readyRead(IPCUnixSocket *ipc);\n> >>>>>>>> @@ -86,7 +86,7 @@ IPAProxyLinux::~IPAProxyLinux()\n> >>>>>>>>  \tdelete socket_;\n> >>>>>>>>  }\n> >>>>>>>>\n> >>>>>>>> -void IPAProxyLinux::readyRead(IPCUnixSocket *ipc)\n> >>>>>>>> +void IPAProxyLinux::readyRead(IPCUnixSocket * /*ipc*/)\n> >>>>>>>>  {\n> >>>>>>>>  }\n> >>>>>>>>\n> >>>>>>>> diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp\n> >>>>>>>> index 208ab54199b1..87d810d7cfa4 100644\n> >>>>>>>> --- a/src/libcamera/v4l2_videodevice.cpp\n> >>>>>>>> +++ b/src/libcamera/v4l2_videodevice.cpp\n> >>>>>>>> @@ -1141,7 +1141,7 @@ Buffer *V4L2VideoDevice::dequeueBuffer()\n> >>>>>>>>   * For Capture video devices the Buffer will contain valid data.\n> >>>>>>>>   * For Output video devices the Buffer can be considered empty.\n> >>>>>>>>   */\n> >>>>>>>> -void V4L2VideoDevice::bufferAvailable(EventNotifier *notifier)\n> >>>>>>>> +void V4L2VideoDevice::bufferAvailable(EventNotifier * /*notifier*/)\n> >>>>>>>>  {\n> >>>>>>>>  \tBuffer *buffer = dequeueBuffer();\n> >>>>>>>>  \tif (!buffer)\n> >>>>>>>> diff --git a/src/qcam/main.cpp b/src/qcam/main.cpp\n> >>>>>>>> index a7ff5c52663b..d8cfc1c3d76b 100644\n> >>>>>>>> --- a/src/qcam/main.cpp\n> >>>>>>>> +++ b/src/qcam/main.cpp\n> >>>>>>>> @@ -17,7 +17,7 @@\n> >>>>>>>>  #include \"../cam/options.h\"\n> >>>>>>>>  #include \"qt_event_dispatcher.h\"\n> >>>>>>>>\n> >>>>>>>> -void signalHandler(int signal)\n> >>>>>>>> +void signalHandler(int /*signal*/)\n> >>>>>>>>  {\n> >>>>>>>>  \tstd::cout << \"Exiting\" << std::endl;\n> >>>>>>>>  \tqApp->quit();\n> >>>>>>>> diff --git a/test/camera/capture.cpp b/test/camera/capture.cpp\n> >>>>>>>> index 791ccad15f70..a5fd0a641705 100644\n> >>>>>>>> --- a/test/camera/capture.cpp\n> >>>>>>>> +++ b/test/camera/capture.cpp\n> >>>>>>>> @@ -19,7 +19,7 @@ protected:\n> >>>>>>>>  \tunsigned int completeBuffersCount_;\n> >>>>>>>>  \tunsigned int completeRequestsCount_;\n> >>>>>>>>\n> >>>>>>>> -\tvoid bufferComplete(Request *request, Buffer *buffer)\n> >>>>>>>> +\tvoid bufferComplete(Request * /*request*/, Buffer *buffer)\n> >>>>>>>>  \t{\n> >>>>>>>>  \t\tif (buffer->status() != Buffer::BufferSuccess)\n> >>>>>>>>  \t\t\treturn;\n> >>>>>>>> diff --git a/test/libtest/test.h b/test/libtest/test.h\n> >>>>>>>> index ec08bf97c03d..193d7aa99f38 100644\n> >>>>>>>> --- a/test/libtest/test.h\n> >>>>>>>> +++ b/test/libtest/test.h\n> >>>>>>>> @@ -26,11 +26,11 @@ public:\n> >>>>>>>>  protected:\n> >>>>>>>>  \tvirtual int init() { return 0; }\n> >>>>>>>>  \tvirtual int run() = 0;\n> >>>>>>>> -\tvirtual void cleanup() { }\n> >>>>>>>> +\tvirtual void cleanup() {}\n> >>>>>>>>  };\n> >>>>>>>>\n> >>>>>>>>  #define TEST_REGISTER(klass)\t\t\t\t\t\t\\\n> >>>>>>>> -int main(int argc, char *argv[])\t\t\t\t\t\\\n> >>>>>>>> +int main(int /*argc*/, char * /*argv*/[])\t\t\t\t\\\n> >>>>>>>>  {\t\t\t\t\t\t\t\t\t\\\n> >>>>>>>>  \treturn klass().execute();\t\t\t\t\t\\\n> >>>>>>>>  }\n> >>>>>>>> diff --git a/test/log/log_process.cpp b/test/log/log_process.cpp\n> >>>>>>>> index 2df4aa43713c..fa5639dde7cb 100644\n> >>>>>>>> --- a/test/log/log_process.cpp\n> >>>>>>>> +++ b/test/log/log_process.cpp\n> >>>>>>>> @@ -123,7 +123,8 @@ protected:\n> >>>>>>>>  \t}\n> >>>>>>>>\n> >>>>>>>>  private:\n> >>>>>>>> -\tvoid procFinished(Process *proc, enum Process::ExitStatus exitStatus, int exitCode)\n> >>>>>>>> +\tvoid procFinished(Process * /*proc*/,\n> >>>>>>>> +\t\t\t  enum Process::ExitStatus exitStatus, int exitCode)\n> >>>>>>>>  \t{\n> >>>>>>>>  \t\texitStatus_ = exitStatus;\n> >>>>>>>>  \t\texitCode_ = exitCode;\n> >>>>>>>> diff --git a/test/message.cpp b/test/message.cpp\n> >>>>>>>> index 3775c30a20b3..3e2659c836e3 100644\n> >>>>>>>> --- a/test/message.cpp\n> >>>>>>>> +++ b/test/message.cpp\n> >>>>>>>> @@ -35,7 +35,7 @@ public:\n> >>>>>>>>  \tvoid reset() { status_ = NoMessage; }\n> >>>>>>>>\n> >>>>>>>>  protected:\n> >>>>>>>> -\tvoid message(Message *msg)\n> >>>>>>>> +\tvoid message(Message * /*msg*/)\n> >>>>>>>>  \t{\n> >>>>>>>>  \t\tif (thread() != Thread::current())\n> >>>>>>>>  \t\t\tstatus_ = InvalidThread;\n> >>>>>>>> diff --git a/test/process/process_test.cpp b/test/process/process_test.cpp\n> >>>>>>>> index 7e7b3c2c8bf3..2ba3efd08457 100644\n> >>>>>>>> --- a/test/process/process_test.cpp\n> >>>>>>>> +++ b/test/process/process_test.cpp\n> >>>>>>>> @@ -75,7 +75,8 @@ protected:\n> >>>>>>>>  \t}\n> >>>>>>>>\n> >>>>>>>>  private:\n> >>>>>>>> -\tvoid procFinished(Process *proc, enum Process::ExitStatus exitStatus, int exitCode)\n> >>>>>>>> +\tvoid procFinished(Process * /*proc*/,\n> >>>>>>>> +\t\t\t  enum Process::ExitStatus exitStatus, int exitCode)\n> >>>>>>>>  \t{\n> >>>>>>>>  \t\texitStatus_ = exitStatus;\n> >>>>>>>>  \t\texitCode_ = exitCode;\n> >>>>>>>> diff --git a/test/timer-thread.cpp b/test/timer-thread.cpp\n> >>>>>>>> index 32853b4e80ef..55b7abcbbeab 100644\n> >>>>>>>> --- a/test/timer-thread.cpp\n> >>>>>>>> +++ b/test/timer-thread.cpp\n> >>>>>>>> @@ -39,7 +39,7 @@ public:\n> >>>>>>>>  \t}\n> >>>>>>>>\n> >>>>>>>>  private:\n> >>>>>>>> -\tvoid timeoutHandler(Timer *timer)\n> >>>>>>>> +\tvoid timeoutHandler(Timer * /*timer*/)\n> >>>>>>>>  \t{\n> >>>>>>>>  \t\ttimeout_ = true;\n> >>>>>>>>  \t}\n> >>>>>>>> diff --git a/test/timer.cpp b/test/timer.cpp\n> >>>>>>>> index 2bdb006edccb..03df03aa8d69 100644\n> >>>>>>>> --- a/test/timer.cpp\n> >>>>>>>> +++ b/test/timer.cpp\n> >>>>>>>> @@ -56,7 +56,7 @@ public:\n> >>>>>>>>  \t}\n> >>>>>>>>\n> >>>>>>>>  private:\n> >>>>>>>> -\tvoid timeoutHandler(Timer *timer)\n> >>>>>>>> +\tvoid timeoutHandler(Timer * /*timer*/)\n> >>>>>>>>  \t{\n> >>>>>>>>  \t\texpiration_ = std::chrono::steady_clock::now();\n> >>>>>>>>  \t\tcount_++;","headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E43DE6136E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 21 Nov 2019 09:17:22 +0100 (CET)","from pendragon.ideasonboard.com (unknown [124.219.31.93])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id E09D8A2B;\n\tThu, 21 Nov 2019 09:17:20 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1574324242;\n\tbh=TGXixowAPMXH8zEEX3wXd2BFqZ1fCVrQeHcEWTsOBtY=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=m+oboVXYTU7DF/UZUU0ggNwa2qtxGJNnA0Neq5pccajk5vD/OnQ4JTg5eZ8AXeZxq\n\tQiQDimrSKuzzW5aMLS2+8ar4Qz2I6A3FrlzCrRjnECz/Cr4ScNIrXUhNjE7yEd3bE2\n\t0Fne/dup823CaVbnsp3GrrSZV7rRqUGH3Msq8vNM=","Date":"Thu, 21 Nov 2019 10:17:12 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Jacopo Mondi <jacopo@jmondi.org>, libcamera-devel@lists.libcamera.org","Message-ID":"<20191121081712.GI4958@pendragon.ideasonboard.com>","References":"<20191026213835.15110-1-laurent.pinchart@ideasonboard.com>\n\t<34810c55-0226-253c-56ff-9a756ee5f997@ideasonboard.com>\n\t<20191028103544.GA14017@pendragon.ideasonboard.com>\n\t<20191108194227.GA1058@pendragon.ideasonboard.com>\n\t<20191109103135.s326tbuehyx4mnng@uno.localdomain>\n\t<20191118215304.xccnnvzx2p3bwb6z@uno.localdomain>\n\t<c0de3171-2356-ba13-0e69-dbd63e603896@ideasonboard.com>\n\t<20191119222503.GG17590@pendragon.ideasonboard.com>\n\t<9564bc8b-d413-f110-e559-68cc26a10193@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<9564bc8b-d413-f110-e559-68cc26a10193@ideasonboard.com>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH/RFC] meson: Remove\n\t-Wno-unused-parameter","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Thu, 21 Nov 2019 08:17:23 -0000"}}]