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/oem/ibm/libpldmresponder/file_io.hpp b/oem/ibm/libpldmresponder/file_io.hpp
index eab731b..cccd919 100644
--- a/oem/ibm/libpldmresponder/file_io.hpp
+++ b/oem/ibm/libpldmresponder/file_io.hpp
@@ -10,13 +10,13 @@
#include <libpldm/base.h>
#include <libpldm/oem/ibm/file_io.h>
#include <libpldm/oem/ibm/host.h>
-#include <stdint.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <phosphor-logging/lg2.hpp>
+#include <cstdint>
#include <filesystem>
#include <iostream>
#include <vector>
diff --git a/oem/ibm/libpldmresponder/file_io_by_type.cpp b/oem/ibm/libpldmresponder/file_io_by_type.cpp
index bed64f1..388f866 100644
--- a/oem/ibm/libpldmresponder/file_io_by_type.cpp
+++ b/oem/ibm/libpldmresponder/file_io_by_type.cpp
@@ -12,12 +12,12 @@
#include <libpldm/base.h>
#include <libpldm/oem/ibm/file_io.h>
-#include <stdint.h>
#include <unistd.h>
#include <phosphor-logging/lg2.hpp>
#include <xyz/openbmc_project/Logging/Entry/server.hpp>
+#include <cstdint>
#include <exception>
#include <filesystem>
#include <fstream>
diff --git a/oem/ibm/libpldmresponder/file_io_type_cert.cpp b/oem/ibm/libpldmresponder/file_io_type_cert.cpp
index 402a003..e655027 100644
--- a/oem/ibm/libpldmresponder/file_io_type_cert.cpp
+++ b/oem/ibm/libpldmresponder/file_io_type_cert.cpp
@@ -4,10 +4,11 @@
#include <libpldm/base.h>
#include <libpldm/oem/ibm/file_io.h>
-#include <stdint.h>
#include <phosphor-logging/lg2.hpp>
+#include <cstdint>
+
PHOSPHOR_LOG2_USING;
namespace pldm
diff --git a/oem/ibm/libpldmresponder/file_io_type_dump.cpp b/oem/ibm/libpldmresponder/file_io_type_dump.cpp
index 2abd726..e936acb 100644
--- a/oem/ibm/libpldmresponder/file_io_type_dump.cpp
+++ b/oem/ibm/libpldmresponder/file_io_type_dump.cpp
@@ -6,7 +6,6 @@
#include <libpldm/base.h>
#include <libpldm/oem/ibm/file_io.h>
-#include <stdint.h>
#include <systemd/sd-bus.h>
#include <unistd.h>
@@ -14,6 +13,7 @@
#include <sdbusplus/server.hpp>
#include <xyz/openbmc_project/Dump/NewDump/server.hpp>
+#include <cstdint>
#include <exception>
#include <filesystem>
#include <type_traits>
diff --git a/oem/ibm/libpldmresponder/file_io_type_pcie.cpp b/oem/ibm/libpldmresponder/file_io_type_pcie.cpp
index 0c165aa..a6665f6 100644
--- a/oem/ibm/libpldmresponder/file_io_type_pcie.cpp
+++ b/oem/ibm/libpldmresponder/file_io_type_pcie.cpp
@@ -2,10 +2,11 @@
#include <libpldm/base.h>
#include <libpldm/oem/ibm/file_io.h>
-#include <stdint.h>
#include <phosphor-logging/lg2.hpp>
+#include <cstdint>
+
PHOSPHOR_LOG2_USING;
namespace pldm
diff --git a/oem/ibm/libpldmresponder/file_io_type_pel.cpp b/oem/ibm/libpldmresponder/file_io_type_pel.cpp
index 685bff2..6c480ae 100644
--- a/oem/ibm/libpldmresponder/file_io_type_pel.cpp
+++ b/oem/ibm/libpldmresponder/file_io_type_pel.cpp
@@ -5,7 +5,6 @@
#include <libpldm/base.h>
#include <libpldm/oem/ibm/file_io.h>
-#include <stdint.h>
#include <systemd/sd-bus.h>
#include <unistd.h>
@@ -14,6 +13,7 @@
#include <sdbusplus/server.hpp>
#include <xyz/openbmc_project/Logging/Entry/server.hpp>
+#include <cstdint>
#include <exception>
#include <filesystem>
#include <fstream>
diff --git a/oem/ibm/libpldmresponder/file_io_type_vpd.cpp b/oem/ibm/libpldmresponder/file_io_type_vpd.cpp
index fede599..697ad98 100644
--- a/oem/ibm/libpldmresponder/file_io_type_vpd.cpp
+++ b/oem/ibm/libpldmresponder/file_io_type_vpd.cpp
@@ -4,10 +4,11 @@
#include <libpldm/base.h>
#include <libpldm/oem/ibm/file_io.h>
-#include <stdint.h>
#include <phosphor-logging/lg2.hpp>
+#include <cstdint>
+
PHOSPHOR_LOG2_USING;
typedef uint8_t byte;
diff --git a/oem/ibm/libpldmresponder/file_table.hpp b/oem/ibm/libpldmresponder/file_table.hpp
index 502e714..76ac959 100644
--- a/oem/ibm/libpldmresponder/file_table.hpp
+++ b/oem/ibm/libpldmresponder/file_table.hpp
@@ -1,10 +1,10 @@
#pragma once
#include <libpldm/pldm_types.h>
-#include <stdint.h>
#include <nlohmann/json.hpp>
+#include <cstdint>
#include <filesystem>
#include <vector>
diff --git a/oem/ibm/test/host_bmc_lamp_test.cpp b/oem/ibm/test/host_bmc_lamp_test.cpp
index 26dc4fc..15c62c0 100644
--- a/oem/ibm/test/host_bmc_lamp_test.cpp
+++ b/oem/ibm/test/host_bmc_lamp_test.cpp
@@ -2,7 +2,7 @@
#include "pldmd/dbus_impl_requester.hpp"
#include "test/test_instance_id.hpp"
-#include <string.h>
+#include <cstring>
#include <gmock/gmock.h>
#include <gtest/gtest.h>