clang-tidy: Enable readability-qualified-auto check
This check aims to improve code readability by suggesting the use
of const auto * instead of auto for variables that are pointers
or iterators. This helps clarify the const-ness of the pointed-to
object or container elements.
Change-Id: I5fa46006aa5669834ebb144d32014f8882e563e3
Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
diff --git a/bmc_state_manager.cpp b/bmc_state_manager.cpp
index 22f2a42..bbea272 100644
--- a/bmc_state_manager.cpp
+++ b/bmc_state_manager.cpp
@@ -266,7 +266,7 @@
{
uint64_t bootReason = 0;
std::ifstream file;
- auto bootstatusPath = "/sys/class/watchdog/watchdog0/bootstatus";
+ const auto* bootstatusPath = "/sys/class/watchdog/watchdog0/bootstatus";
file.exceptions(std::ifstream::failbit | std::ifstream::badbit |
std::ifstream::eofbit);