build: enable and fix -Wshadow
Shadow names can be prone to bugs. Enable the warning to avoid them in
the future. Tested by building and running the unit tests.
Change-Id: Ic3227675f4ff40d266ae2a60c66c894f16e5888e
Signed-off-by: Brad Bishop <bradbish@qti.qualcomm.com>
diff --git a/src/test/associations.cpp b/src/test/associations.cpp
index fe0a826..ca31f41 100644
--- a/src/test/associations.cpp
+++ b/src/test/associations.cpp
@@ -499,23 +499,23 @@
ASSERT_EQ(associationData.size(), 2);
{
- auto ad = std::find_if(
+ auto it = std::find_if(
associationData.begin(), associationData.end(),
[](const auto& ad) { return std::get<0>(ad) == "ownerA"; });
- ASSERT_NE(ad, associationData.end());
+ ASSERT_NE(it, associationData.end());
- auto& a = std::get<1>(*ad);
+ auto& a = std::get<1>(*it);
ASSERT_EQ(std::get<0>(a), "type0");
ASSERT_EQ(std::get<1>(a), "typeA");
ASSERT_EQ(std::get<2>(a), "pathA");
}
{
- auto ad = std::find_if(
+ auto it = std::find_if(
associationData.begin(), associationData.end(),
[](const auto& ad) { return std::get<0>(ad) == "ownerB"; });
- ASSERT_NE(ad, associationData.end());
+ ASSERT_NE(it, associationData.end());
- auto& a = std::get<1>(*ad);
+ auto& a = std::get<1>(*it);
ASSERT_EQ(std::get<0>(a), "type1");
ASSERT_EQ(std::get<1>(a), "typeB");
ASSERT_EQ(std::get<2>(a), "pathX");