summaryrefslogtreecommitdiff
path: root/src/android
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-10-27 00:36:13 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-08-25 02:58:04 +0300
commitdbafe16da7a9999ec77da21a42537702fb87f124 (patch)
treebf195d3f0feee0efc714267f70d85bfc54b8c63c /src/android
parent3ef378731ad89de4dd77e0cb79860cc86676060e (diff)
meson: Remove -Wno-unused-parameter
We build libcamera with -Wno-unused-parameter and this doesn't cause much issue internally. However, it prevents catching unused parameters in inline functions defined in public headers. This can lead to compilation warnings for applications compiled without -Wno-unused-parameter. To catch those issues, remove -Wno-unused-parameter and fix all the related warnings with [[maybe_unused]]. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Diffstat (limited to 'src/android')
-rw-r--r--src/android/camera3_hal.cpp11
-rw-r--r--src/android/camera_device.cpp5
-rw-r--r--src/android/camera_ops.cpp5
3 files changed, 13 insertions, 8 deletions
diff --git a/src/android/camera3_hal.cpp b/src/android/camera3_hal.cpp
index c4eb56a9..67a497b8 100644
--- a/src/android/camera3_hal.cpp
+++ b/src/android/camera3_hal.cpp
@@ -32,20 +32,23 @@ static int hal_get_camera_info(int id, struct camera_info *info)
return cameraManager.getCameraInfo(id, info);
}
-static int hal_set_callbacks(const camera_module_callbacks_t *callbacks)
+static int hal_set_callbacks([[maybe_unused]] const camera_module_callbacks_t *callbacks)
{
cameraManager.setCallbacks(callbacks);
return 0;
}
-static int hal_open_legacy(const struct hw_module_t *module, const char *id,
- uint32_t halVersion, struct hw_device_t **device)
+static int hal_open_legacy([[maybe_unused]] const struct hw_module_t *module,
+ [[maybe_unused]] const char *id,
+ [[maybe_unused]] uint32_t halVersion,
+ [[maybe_unused]] struct hw_device_t **device)
{
return -ENOSYS;
}
-static int hal_set_torch_mode(const char *camera_id, bool enabled)
+static int hal_set_torch_mode([[maybe_unused]] const char *camera_id,
+ [[maybe_unused]] bool enabled)
{
return -ENOSYS;
}
diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp
index de6f86f7..9605b9e9 100644
--- a/src/android/camera_device.cpp
+++ b/src/android/camera_device.cpp
@@ -1548,8 +1548,9 @@ void CameraDevice::notifyError(uint32_t frameNumber, camera3_stream_t *stream)
/*
* Produce a set of fixed result metadata.
*/
-std::unique_ptr<CameraMetadata> CameraDevice::getResultMetadata(int frame_number,
- int64_t timestamp)
+std::unique_ptr<CameraMetadata>
+CameraDevice::getResultMetadata([[maybe_unused]] int frame_number,
+ int64_t timestamp)
{
/*
* \todo Keep this in sync with the actual number of entries.
diff --git a/src/android/camera_ops.cpp b/src/android/camera_ops.cpp
index 216ac285..696e8043 100644
--- a/src/android/camera_ops.cpp
+++ b/src/android/camera_ops.cpp
@@ -61,11 +61,12 @@ static int hal_dev_process_capture_request(const struct camera3_device *dev,
return camera->processCaptureRequest(request);
}
-static void hal_dev_dump(const struct camera3_device *dev, int fd)
+static void hal_dev_dump([[maybe_unused]] const struct camera3_device *dev,
+ [[maybe_unused]] int fd)
{
}
-static int hal_dev_flush(const struct camera3_device *dev)
+static int hal_dev_flush([[maybe_unused]] const struct camera3_device *dev)
{
return 0;
}