diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2023-12-18 16:04:25 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2023-12-21 17:24:28 +0200 |
commit | 4843f72b131388b3da1d4cbb8dc48800b8b0559e (patch) | |
tree | f3b71125236fc4b4a287225d8daeafe23cad270e /test/log/meson.build | |
parent | 41d6e6e5c166c267e7a15a7b0c1d930bddcbc6b8 (diff) |
libcamera: camera: Fix unused variable compiler warning
When compiling with gcc 8.4.0, the compiler was reported to throw an
unused variable warning:
../src/libcamera/camera.cpp: In member function ‘libcamera::CameraConfiguration::Status libcamera::CameraConfiguration::validateColorSpaces(libcamera::CameraConfiguration::ColorSpaceFlags)’:
../src/libcamera/camera.cpp:497:19: error: unused variable ‘i’ [-Werror=unused-variable]
for (auto [i, cfg] : utils::enumerate(config_)) {
^
The build environment may have been incorrect as the problem couldn't be
reproduced with gcc 8.3.0 and 8.5.0. Nonetheless, the 'i' variable is
indeed unused. It turns out that the code can be simplified, as the
commit that removed usage of the variable kept the now unneeded
utils::enumerate() call.
Simplify the code and fix the warning in one go.
Fixes: 13986d6ce3ab ("libcamera: camera: Fix validateColorSpaces to choose "main" colour space")
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'test/log/meson.build')
0 files changed, 0 insertions, 0 deletions