From de012767e7432ebadd7493d90e0a7139cc422306 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Sat, 22 Aug 2020 18:53:54 +0300 Subject: ipa: raspberrypi: Replace void cast with [[maybe_unused]] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The standard way in C++17 to specify that a function or function argument may be unused it to specify the [[maybe_unused]] attribute. Replace manual void casts to silence compiler warnings. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Reviewed-by: Niklas Söderlund --- src/ipa/raspberrypi/controller/rpi/noise.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/ipa/raspberrypi/controller/rpi/noise.cpp') diff --git a/src/ipa/raspberrypi/controller/rpi/noise.cpp b/src/ipa/raspberrypi/controller/rpi/noise.cpp index 2cafde3a..1b84ecb0 100644 --- a/src/ipa/raspberrypi/controller/rpi/noise.cpp +++ b/src/ipa/raspberrypi/controller/rpi/noise.cpp @@ -27,10 +27,9 @@ char const *Noise::Name() const return NAME; } -void Noise::SwitchMode(CameraMode const &camera_mode, Metadata *metadata) +void Noise::SwitchMode(CameraMode const &camera_mode, + [[maybe_unused]] Metadata *metadata) { - (void)metadata; - // For example, we would expect a 2x2 binned mode to have a "noise // factor" of sqrt(2x2) = 2. (can't be less than one, right?) mode_factor_ = std::max(1.0, camera_mode.noise_factor); -- cgit v1.2.1