Fix clang-tidy failures
Change-Id: I4e9e02cb57ae5eac8d7dc9f7c6e1083959170766
Signed-off-by: Ed Tanous <edtanous@google.com>
diff --git a/include/linux/peci-ioctl.h b/include/linux/peci-ioctl.h
index e5b4b8b..42a9979 100644
--- a/include/linux/peci-ioctl.h
+++ b/include/linux/peci-ioctl.h
@@ -6,6 +6,10 @@
#ifndef __PECI_IOCTL_H
#define __PECI_IOCTL_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include <linux/ioctl.h>
#include <linux/types.h>
@@ -660,5 +664,9 @@
_IOWR(PECI_IOC_BASE, PECI_CMD_CRASHDUMP_GET_FRAME, \
struct peci_crashdump_get_frame_msg)
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __PECI_IOCTL_H */
// clang-format on
diff --git a/src/IntelCPUSensorMain.cpp b/src/IntelCPUSensorMain.cpp
index ecc36dc..10a45e8 100644
--- a/src/IntelCPUSensorMain.cpp
+++ b/src/IntelCPUSensorMain.cpp
@@ -42,9 +42,7 @@
// 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/NVMeContext.hpp b/src/NVMeContext.hpp
index 5be03e0..bcfa5d6 100644
--- a/src/NVMeContext.hpp
+++ b/src/NVMeContext.hpp
@@ -23,7 +23,7 @@
virtual ~NVMeContext()
{
- close();
+ scanTimer.cancel();
}
void addSensor(const std::shared_ptr<NVMeSensor>& sensor)