Fix clang-tidy header check
Apparently our exclusion of the linux headers covered up some issues in
our own headers, and was erroneously ignoring all headers, not just the
linux headers.
Apparently this now detects recursion quite a bit, so disable that check
for the moment, as well as the special member variables checks. Also,
disable some cert checks that are duplicates of
bugprone-reserved-identifier, because of the aformentioned ignored linux
headers
All other changes are done automatically.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Ie640495146dbe155a85d8a9e81be78539137a88b
diff --git a/src/CPUSensorMain.cpp b/src/CPUSensorMain.cpp
index 1c5574b..fd9e543 100644
--- a/src/CPUSensorMain.cpp
+++ b/src/CPUSensorMain.cpp
@@ -43,7 +43,9 @@
// clang-format off
// this needs to be included last or we'll have build issues
+extern "C" {
#include <linux/peci-ioctl.h>
+}
#if !defined(PECI_MBX_INDEX_DDR_DIMM_TEMP)
#define PECI_MBX_INDEX_DDR_DIMM_TEMP MBX_INDEX_DDR_DIMM_TEMP
#endif
diff --git a/src/NVMeSensor.cpp b/src/NVMeSensor.cpp
index 3af9f69..254ba24 100644
--- a/src/NVMeSensor.cpp
+++ b/src/NVMeSensor.cpp
@@ -29,7 +29,7 @@
const std::string& sensorConfiguration,
const int busNumber) :
Sensor(escapeName(sensorName), std::move(thresholdsIn), sensorConfiguration,
- NVMeSensor::CONFIG_TYPE, false, false, maxReading, minReading, conn,
+ NVMeSensor::configType, false, false, maxReading, minReading, conn,
PowerState::on),
bus(busNumber), objServer(objectServer)
{
diff --git a/src/NVMeSensorMain.cpp b/src/NVMeSensorMain.cpp
index 8eaeb57..c2b32f0 100644
--- a/src/NVMeSensorMain.cpp
+++ b/src/NVMeSensorMain.cpp
@@ -132,7 +132,7 @@
for (const auto& [interfacePath, sensorData] : sensorConfigurations)
{
// find base configuration
- auto sensorBase = sensorData.find(NVMeSensor::CONFIG_TYPE);
+ auto sensorBase = sensorData.find(NVMeSensor::configType);
if (sensorBase != sensorData.end())
{
const SensorBaseConfigMap& sensorConfig = sensorBase->second;
@@ -181,7 +181,7 @@
handleSensorConfigurations(io, objectServer, dbusConnection,
sensorConfigurations);
}));
- getter->getConfiguration(std::vector<std::string>{NVMeSensor::CONFIG_TYPE});
+ getter->getConfiguration(std::vector<std::string>{NVMeSensor::configType});
}
static void interfaceRemoved(sdbusplus::message::message& message,
@@ -257,7 +257,7 @@
static_cast<sdbusplus::bus::bus&>(*systemBus),
"type='signal',member='PropertiesChanged',path_namespace='" +
std::string(inventoryPath) + "',arg0namespace='" +
- std::string(NVMeSensor::CONFIG_TYPE) + "'",
+ std::string(NVMeSensor::configType) + "'",
eventHandler);
// Watch for entity-manager to remove configuration interfaces
diff --git a/src/Utils.cpp b/src/Utils.cpp
index c030963..8df9a48 100644
--- a/src/Utils.cpp
+++ b/src/Utils.cpp
@@ -610,7 +610,7 @@
{
manufacturingMode = true;
}
- if (validateUnsecureFeature == true)
+ if (validateUnsecureFeature == 1)
{
if (manufacturingModeStatus == "xyz.openbmc_project.Control.Security."
"SpecialMode.Modes.ValidationUnsecure")