Apply tidy updates
Change-Id: I8ae5fd206723c8657547ee1edd0d2c4cc6940824
Signed-off-by: Ed Tanous <etanous@nvidia.com>
diff --git a/.clang-tidy b/.clang-tidy
index 19f50f2..c9fa39f 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -206,9 +206,6 @@
readability-suspicious-call-argument,
'
-ExtraArgs:
- - -Wno-unknown-pragmas # TODO: remove this after switch to clang-tidy-18
-
WarningsAsErrors: '*'
HeaderFilterRegex: '(libcper)|(src)/'
CheckOptions:
diff --git a/include/libcper/BaseTypes.h b/include/libcper/BaseTypes.h
index 93320e4..d1a123f 100644
--- a/include/libcper/BaseTypes.h
+++ b/include/libcper/BaseTypes.h
@@ -83,7 +83,7 @@
@return A 16-bit value built from the two ASCII characters specified by A and B.
**/
-#define SIGNATURE_16(A, B) ((A) | (B << 8))
+#define SIGNATURE_16(A, B) ((A) | ((B) << 8))
/**
Returns a 32-bit signature built from 4 ASCII characters.
diff --git a/include/libcper/Cper.h b/include/libcper/Cper.h
index 0dc3c12..91776d0 100644
--- a/include/libcper/Cper.h
+++ b/include/libcper/Cper.h
@@ -10,8 +10,8 @@
**/
-#ifndef __CPER_GUID_H__
-#define __CPER_GUID_H__
+#ifndef CPER_GUID_H
+#define CPER_GUID_H
#include <libcper/BaseTypes.h>
#include <libcper/common-utils.h>
diff --git a/include/libcper/generator/gen-utils.h b/include/libcper/generator/gen-utils.h
index 7a015fa..33ae2ab 100644
--- a/include/libcper/generator/gen-utils.h
+++ b/include/libcper/generator/gen-utils.h
@@ -18,7 +18,6 @@
UINT8 *generate_random_bytes(size_t size);
void init_random();
void create_valid_error_section(UINT8 *start);
-UINT8 int_to_bcd(int value);
#ifdef __cplusplus
}
diff --git a/include/libcper/sections/cper-section-ampere.h b/include/libcper/sections/cper-section-ampere.h
index 3d3f744..00b62b4 100644
--- a/include/libcper/sections/cper-section-ampere.h
+++ b/include/libcper/sections/cper-section-ampere.h
@@ -1,6 +1,7 @@
#ifndef CPER_SECTION_AMPERE_H
#define CPER_SECTION_AMPERE_H
+#include <stdio.h>
#include <json.h>
#include <libcper/Cper.h>
diff --git a/include/libcper/sections/cper-section-arm.h b/include/libcper/sections/cper-section-arm.h
index 8242f6c..ebd63f1 100644
--- a/include/libcper/sections/cper-section-arm.h
+++ b/include/libcper/sections/cper-section-arm.h
@@ -5,6 +5,7 @@
extern "C" {
#endif
+#include <stdio.h>
#include <json.h>
#include <libcper/Cper.h>
diff --git a/include/libcper/sections/cper-section-ccix-per.h b/include/libcper/sections/cper-section-ccix-per.h
index 6246554..6ff18fc 100644
--- a/include/libcper/sections/cper-section-ccix-per.h
+++ b/include/libcper/sections/cper-section-ccix-per.h
@@ -5,6 +5,7 @@
extern "C" {
#endif
+#include <stdio.h>
#include <json.h>
#include <libcper/Cper.h>
diff --git a/include/libcper/sections/cper-section-cxl-component.h b/include/libcper/sections/cper-section-cxl-component.h
index d5fa315..85810a2 100644
--- a/include/libcper/sections/cper-section-cxl-component.h
+++ b/include/libcper/sections/cper-section-cxl-component.h
@@ -5,6 +5,7 @@
extern "C" {
#endif
+#include <stdio.h>
#include <json.h>
#include <libcper/Cper.h>
diff --git a/include/libcper/sections/cper-section-cxl-protocol.h b/include/libcper/sections/cper-section-cxl-protocol.h
index ed37d96..5cca31e 100644
--- a/include/libcper/sections/cper-section-cxl-protocol.h
+++ b/include/libcper/sections/cper-section-cxl-protocol.h
@@ -5,6 +5,7 @@
extern "C" {
#endif
+#include <stdio.h>
#include <json.h>
#include <libcper/Cper.h>
diff --git a/include/libcper/sections/cper-section-dmar-generic.h b/include/libcper/sections/cper-section-dmar-generic.h
index 5c1cadf..d81dd94 100644
--- a/include/libcper/sections/cper-section-dmar-generic.h
+++ b/include/libcper/sections/cper-section-dmar-generic.h
@@ -5,6 +5,7 @@
extern "C" {
#endif
+#include <stdio.h>
#include <json.h>
#include <libcper/Cper.h>
diff --git a/include/libcper/sections/cper-section-dmar-iommu.h b/include/libcper/sections/cper-section-dmar-iommu.h
index 6b2aa6f..0209dfb 100644
--- a/include/libcper/sections/cper-section-dmar-iommu.h
+++ b/include/libcper/sections/cper-section-dmar-iommu.h
@@ -5,6 +5,7 @@
extern "C" {
#endif
+#include <stdio.h>
#include <json.h>
#include <libcper/Cper.h>
diff --git a/include/libcper/sections/cper-section-dmar-vtd.h b/include/libcper/sections/cper-section-dmar-vtd.h
index 907bba8..9ba1771 100644
--- a/include/libcper/sections/cper-section-dmar-vtd.h
+++ b/include/libcper/sections/cper-section-dmar-vtd.h
@@ -5,6 +5,7 @@
extern "C" {
#endif
+#include <stdio.h>
#include <json.h>
#include <libcper/Cper.h>
diff --git a/include/libcper/sections/cper-section-firmware.h b/include/libcper/sections/cper-section-firmware.h
index 8f7f0e9..47e55be 100644
--- a/include/libcper/sections/cper-section-firmware.h
+++ b/include/libcper/sections/cper-section-firmware.h
@@ -5,6 +5,7 @@
extern "C" {
#endif
+#include <stdio.h>
#include <json.h>
#include <libcper/Cper.h>
diff --git a/include/libcper/sections/cper-section-generic.h b/include/libcper/sections/cper-section-generic.h
index dce583d..4f0d947 100644
--- a/include/libcper/sections/cper-section-generic.h
+++ b/include/libcper/sections/cper-section-generic.h
@@ -5,6 +5,7 @@
extern "C" {
#endif
+#include <stdio.h>
#include <json.h>
#include <libcper/Cper.h>
diff --git a/include/libcper/sections/cper-section-ia32x64.h b/include/libcper/sections/cper-section-ia32x64.h
index 77dd331..08d86ca 100644
--- a/include/libcper/sections/cper-section-ia32x64.h
+++ b/include/libcper/sections/cper-section-ia32x64.h
@@ -5,6 +5,7 @@
extern "C" {
#endif
+#include <stdio.h>
#include <json.h>
#include <libcper/Cper.h>
diff --git a/include/libcper/sections/cper-section-memory.h b/include/libcper/sections/cper-section-memory.h
index f7b7dea..5e88e3b 100644
--- a/include/libcper/sections/cper-section-memory.h
+++ b/include/libcper/sections/cper-section-memory.h
@@ -5,6 +5,7 @@
extern "C" {
#endif
+#include <stdio.h>
#include <json.h>
#include <libcper/Cper.h>
diff --git a/include/libcper/sections/cper-section-nvidia.h b/include/libcper/sections/cper-section-nvidia.h
index b5bb594..faed056 100644
--- a/include/libcper/sections/cper-section-nvidia.h
+++ b/include/libcper/sections/cper-section-nvidia.h
@@ -5,6 +5,7 @@
extern "C" {
#endif
+#include <stdio.h>
#include <json.h>
#include <libcper/Cper.h>
diff --git a/include/libcper/sections/cper-section-pci-bus.h b/include/libcper/sections/cper-section-pci-bus.h
index 487e3d3..9a9f34d 100644
--- a/include/libcper/sections/cper-section-pci-bus.h
+++ b/include/libcper/sections/cper-section-pci-bus.h
@@ -5,6 +5,7 @@
extern "C" {
#endif
+#include <stdio.h>
#include <json.h>
#include <libcper/Cper.h>
diff --git a/include/libcper/sections/cper-section-pci-dev.h b/include/libcper/sections/cper-section-pci-dev.h
index 6da7140..9fd283c 100644
--- a/include/libcper/sections/cper-section-pci-dev.h
+++ b/include/libcper/sections/cper-section-pci-dev.h
@@ -5,6 +5,7 @@
extern "C" {
#endif
+#include <stdio.h>
#include <json.h>
#include <libcper/Cper.h>
diff --git a/include/libcper/sections/cper-section-pcie.h b/include/libcper/sections/cper-section-pcie.h
index a3741a5..3d91780 100644
--- a/include/libcper/sections/cper-section-pcie.h
+++ b/include/libcper/sections/cper-section-pcie.h
@@ -5,6 +5,7 @@
extern "C" {
#endif
+#include <stdio.h>
#include <json.h>
#include <libcper/Cper.h>
diff --git a/tests/test-utils.hpp b/tests/test-utils.hpp
index 38e24a7..dd8ec6a 100644
--- a/tests/test-utils.hpp
+++ b/tests/test-utils.hpp
@@ -2,6 +2,7 @@
#define CPER_IR_TEST_UTILS_H
extern "C" {
+#include <stdio.h>
#include <libcper/BaseTypes.h>
}