Home
last modified time | relevance | path

Searched hist:b9cf0d2b (Results 1 – 2 of 2) sorted by relevance

/openbmc/phosphor-power/tools/power-utils/
H A Dupdater.cppb9cf0d2b Mon Feb 27 20:32:42 CST 2023 George Liu <liuxiwei@inspur.com> tools: Fix some warnings by cppcheck

Warning message:
tools/i2c/i2c.hpp:30:9: performance: Variable 'busStr' is assigned in
constructor body. Consider performing initialization in
initialization list. [useInitializationList]
busStr = "/dev/i2c-" + std::to_string(busId);
^

tools/power-utils/updater.cpp:213:18: style: Local variable 'devPath'
shadows outer variable [shadowVariable]
auto devPath = internal::getDevicePath(p);
^
tools/power-utils/updater.hpp:108:17: note: Shadowed declaration
std::string devPath;
^
tools/power-utils/updater.cpp:213:18: note: Shadow variable
auto devPath = internal::getDevicePath(p);
^

Tested: Verify that there are no such warnings in local CI.

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: Ibc7536345ee40579256c398646ad00a05b686ab3
/openbmc/phosphor-power/tools/i2c/
H A Di2c.hppb9cf0d2b Mon Feb 27 20:32:42 CST 2023 George Liu <liuxiwei@inspur.com> tools: Fix some warnings by cppcheck

Warning message:
tools/i2c/i2c.hpp:30:9: performance: Variable 'busStr' is assigned in
constructor body. Consider performing initialization in
initialization list. [useInitializationList]
busStr = "/dev/i2c-" + std::to_string(busId);
^

tools/power-utils/updater.cpp:213:18: style: Local variable 'devPath'
shadows outer variable [shadowVariable]
auto devPath = internal::getDevicePath(p);
^
tools/power-utils/updater.hpp:108:17: note: Shadowed declaration
std::string devPath;
^
tools/power-utils/updater.cpp:213:18: note: Shadow variable
auto devPath = internal::getDevicePath(p);
^

Tested: Verify that there are no such warnings in local CI.

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: Ibc7536345ee40579256c398646ad00a05b686ab3