clang-tidy: Enable modernize-deprecated-headers check
Some headers from C library were deprecated in C++ and are no
longer welcome in C++ codebases. Some have no effect in C++ [1].
[1]: https://releases.llvm.org/13.0.1/tools/clang/tools/extra/docs/clang-tidy/checks/modernize-deprecated-headers.html
Change-Id: Ia3b1df10175e2e661c8fffb82e357c9db81b2e9c
Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
diff --git a/libpldmresponder/base.hpp b/libpldmresponder/base.hpp
index b0829c4..e46b32c 100644
--- a/libpldmresponder/base.hpp
+++ b/libpldmresponder/base.hpp
@@ -3,10 +3,10 @@
#include "libpldmresponder/platform.hpp"
#include <libpldm/base.h>
-#include <stdint.h>
#include <sdeventplus/source/event.hpp>
+#include <cstdint>
#include <vector>
using namespace pldm::responder;
diff --git a/libpldmresponder/bios.cpp b/libpldmresponder/bios.cpp
index 1f3d536..57668d8 100644
--- a/libpldmresponder/bios.cpp
+++ b/libpldmresponder/bios.cpp
@@ -2,8 +2,6 @@
#include "common/utils.hpp"
-#include <time.h>
-
#include <phosphor-logging/lg2.hpp>
#include <array>
diff --git a/libpldmresponder/bios.hpp b/libpldmresponder/bios.hpp
index 8cb18c0..eab143e 100644
--- a/libpldmresponder/bios.hpp
+++ b/libpldmresponder/bios.hpp
@@ -9,8 +9,8 @@
#include <libpldm/bios.h>
#include <libpldm/bios_table.h>
-#include <stdint.h>
+#include <cstdint>
#include <ctime>
#include <functional>
#include <map>
diff --git a/libpldmresponder/bios_table.hpp b/libpldmresponder/bios_table.hpp
index 8b5f8bc..40839ae 100644
--- a/libpldmresponder/bios_table.hpp
+++ b/libpldmresponder/bios_table.hpp
@@ -2,8 +2,8 @@
#include <libpldm/bios.h>
#include <libpldm/bios_table.h>
-#include <stdint.h>
+#include <cstdint>
#include <filesystem>
#include <optional>
#include <string>
diff --git a/libpldmresponder/pdr.hpp b/libpldmresponder/pdr.hpp
index ea12655..edd8810 100644
--- a/libpldmresponder/pdr.hpp
+++ b/libpldmresponder/pdr.hpp
@@ -3,7 +3,7 @@
#include "common/utils.hpp"
#include "libpldmresponder/pdr_utils.hpp"
-#include <stdint.h>
+#include <cstdint>
namespace pldm
{
diff --git a/libpldmresponder/pdr_utils.hpp b/libpldmresponder/pdr_utils.hpp
index a5374aa..e56cc24 100644
--- a/libpldmresponder/pdr_utils.hpp
+++ b/libpldmresponder/pdr_utils.hpp
@@ -4,12 +4,12 @@
#include "common/utils.hpp"
#include <libpldm/pdr.h>
-#include <stdint.h>
#include <nlohmann/json.hpp>
#include <phosphor-logging/lg2.hpp>
#include <xyz/openbmc_project/Common/error.hpp>
+#include <cstdint>
#include <filesystem>
#include <fstream>
#include <functional>
diff --git a/libpldmresponder/platform.hpp b/libpldmresponder/platform.hpp
index 47c9ecf..97e5aa5 100644
--- a/libpldmresponder/platform.hpp
+++ b/libpldmresponder/platform.hpp
@@ -14,10 +14,10 @@
#include <libpldm/pdr.h>
#include <libpldm/platform.h>
#include <libpldm/states.h>
-#include <stdint.h>
#include <phosphor-logging/lg2.hpp>
+#include <cstdint>
#include <map>
PHOSPHOR_LOG2_USING;
diff --git a/libpldmresponder/platform_numeric_effecter.hpp b/libpldmresponder/platform_numeric_effecter.hpp
index afb24fe..79a746f 100644
--- a/libpldmresponder/platform_numeric_effecter.hpp
+++ b/libpldmresponder/platform_numeric_effecter.hpp
@@ -7,11 +7,11 @@
#include <libpldm/platform.h>
#include <libpldm/states.h>
-#include <math.h>
-#include <stdint.h>
#include <phosphor-logging/lg2.hpp>
+#include <cmath>
+#include <cstdint>
#include <map>
#include <optional>
diff --git a/libpldmresponder/test/libpldmresponder_base_test.cpp b/libpldmresponder/test/libpldmresponder_base_test.cpp
index 4656882..539d2cf 100644
--- a/libpldmresponder/test/libpldmresponder_base_test.cpp
+++ b/libpldmresponder/test/libpldmresponder_base_test.cpp
@@ -4,11 +4,11 @@
#include "test/test_instance_id.hpp"
#include <libpldm/base.h>
-#include <string.h>
#include <sdeventplus/event.hpp>
#include <array>
+#include <cstring>
#include <gtest/gtest.h>
diff --git a/libpldmresponder/test/libpldmresponder_bios_table_test.cpp b/libpldmresponder/test/libpldmresponder_bios_table_test.cpp
index 47764ee..7aa143e 100644
--- a/libpldmresponder/test/libpldmresponder_bios_table_test.cpp
+++ b/libpldmresponder/test/libpldmresponder_bios_table_test.cpp
@@ -1,8 +1,7 @@
#include "libpldmresponder/bios_table.hpp"
-#include <stdlib.h>
-
#include <algorithm>
+#include <cstdlib>
#include <vector>
#include <gtest/gtest.h>
diff --git a/libpldmresponder/test/libpldmresponder_bios_test.cpp b/libpldmresponder/test/libpldmresponder_bios_test.cpp
index 2b9e49a..c229caa 100644
--- a/libpldmresponder/test/libpldmresponder_bios_test.cpp
+++ b/libpldmresponder/test/libpldmresponder_bios_test.cpp
@@ -3,7 +3,6 @@
#include <libpldm/base.h>
#include <libpldm/bios.h>
-#include <string.h>
#include <array>
#include <cstring>