summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKieran Bingham <kieran.bingham@ideasonboard.com>2020-07-28 13:37:00 +0100
committerKieran Bingham <kieran.bingham@ideasonboard.com>2020-10-21 17:18:48 +0100
commite6278e057170b83415d95824ccb24779a4f9431f (patch)
tree593702c9ba7bab187723eabe488ee05746ea0b1a
parent2babedf2b32223b4c4a8f193140d60fa083c13c1 (diff)
test: v4l2_videodevice: Prevent variable shadowing of format
Rename the scoped usage of the variable format while iterating the formats as it shadows the outer scoped format which is used for specific testing. Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-rw-r--r--test/v4l2_videodevice/formats.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/v4l2_videodevice/formats.cpp b/test/v4l2_videodevice/formats.cpp
index b5020d2b..255446fe 100644
--- a/test/v4l2_videodevice/formats.cpp
+++ b/test/v4l2_videodevice/formats.cpp
@@ -55,10 +55,10 @@ protected:
{ V4L2_PIX_FMT_Y16_BE, "Y16 -BE" }
};
- for (const auto &format : formats) {
- if (V4L2PixelFormat(format.first).toString() != format.second) {
+ for (const auto &fmt : formats) {
+ if (V4L2PixelFormat(fmt.first).toString() != fmt.second) {
cerr << "Failed to convert V4L2PixelFormat"
- << utils::hex(format.first) << "to string"
+ << utils::hex(fmt.first) << "to string"
<< endl;
return TestFail;
}