clang-tidy: Suppress C-linkage warning
Used `#pragma clang diagnostic` directives to suppress the
`-Wreturn-type-c-linkage` warning for the `createHandler` function
when compiling with Clang. This ensures compatibility with C++ types,
specifically `std::unique_ptr`, while maintaining C linkage for other
functions.
Tested: Build verified
Change-Id: I7fd4e98a75dc537cbf60c085de0a074511b2bd7d
Signed-off-by: Jayanth Othayoth <ojayanth@gmail.com>
diff --git a/blobs-ipmid/blobs.hpp b/blobs-ipmid/blobs.hpp
index c6ebaad..7c4c68f 100644
--- a/blobs-ipmid/blobs.hpp
+++ b/blobs-ipmid/blobs.hpp
@@ -176,6 +176,11 @@
};
} // namespace blobs
+#ifdef __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wreturn-type-c-linkage"
+#endif
+
#ifdef __cplusplus
extern "C"
{
@@ -192,3 +197,7 @@
#ifdef __cplusplus
}
#endif
+
+#ifdef __clang__
+#pragma clang diagnostic pop
+#endif