gcc13 : fix argument format issues
gcc13 based build failed with below error.
error: static assertion failed: Cannot format an argument.
To make type T formattable provide a formatter<T> specialization:
https://fmt.dev/latest/api.html#udt
Problem looks similar to https://github.com/fmtlib/fmt/issues/391
Fix is to convert the "enum" type to underlying_type in fmt::format function.
Change-Id: I155fc854428492462dfec3b3818d08daa16e36bf
Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com>
diff --git a/extensions/phal/phal_error.cpp b/extensions/phal/phal_error.cpp
index 81ef6be..4cbf5af 100644
--- a/extensions/phal/phal_error.cpp
+++ b/extensions/phal/phal_error.cpp
@@ -418,7 +418,9 @@
void processIplErrorCallback(const ipl_error_info& errInfo)
{
log<level::INFO>(
- fmt::format("processIplErrorCallback: Error type({})", errInfo.type)
+ fmt::format("processIplErrorCallback: Error type({})",
+ static_cast<std::underlying_type<ipl_error_type>::type>(
+ errInfo.type))
.c_str());
switch (errInfo.type)