Enable cppcoreguidelines-pro-type-vararg check
We only had one usage of printf in the code that was in violation of
this rule, so replace it with iostreams, and enable the check.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Ie62165b599a996f34893aa5a3f8d1f6e6cbaf903
diff --git a/src/CPUSensorMain.cpp b/src/CPUSensorMain.cpp
index fd9e543..4f377aa 100644
--- a/src/CPUSensorMain.cpp
+++ b/src/CPUSensorMain.cpp
@@ -463,6 +463,8 @@
for (CPUConfig& config : cpuConfigs)
{
std::string peciDevPath = peciDev + std::to_string(config.bus);
+
+ // NOLINTNEXTLINE(cppcoreguidelines-pro-type-vararg)
auto file = open(peciDevPath.c_str(), O_RDWR | O_CLOEXEC);
if (file < 0)
{
@@ -474,6 +476,8 @@
struct peci_ping_msg msg
{};
msg.addr = config.addr;
+
+ // NOLINTNEXTLINE(cppcoreguidelines-pro-type-vararg)
if (!ioctl(file, PECI_IOC_PING, &msg))
{
bool dimmReady = false;
@@ -485,6 +489,8 @@
msg.index = PECI_MBX_INDEX_DDR_DIMM_TEMP;
msg.param = rank;
msg.rx_len = 4;
+
+ // NOLINTNEXTLINE(cppcoreguidelines-pro-type-vararg)
if (!ioctl(file, PECI_IOC_RD_PKG_CFG, &msg))
{
if (msg.pkg_config[0] || msg.pkg_config[1] ||