Fix wrong fmt::format strings
If the `openpower-dumps-extension` enabled, found the wrong
fmt::format strings, and CI failed.
Tested: enabled `openpower-dumps-extension` and built
phosphor-debug-collector successfully.
Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: I9cfc4966658d611b5e9be48a1a5e6e3e3def63f0
diff --git a/dump-extensions/openpower-dumps/dump_manager_resource.cpp b/dump-extensions/openpower-dumps/dump_manager_resource.cpp
index d3abdbe..de27c94 100644
--- a/dump-extensions/openpower-dumps/dump_manager_resource.cpp
+++ b/dump-extensions/openpower-dumps/dump_manager_resource.cpp
@@ -63,8 +63,8 @@
log<level::ERR>(fmt::format("Error in creating resource dump entry, "
"errormsg({}),OBJECTPATH({}),ID({}),"
"TIMESTAMP({}),SIZE({}),SOURCEID({})",
- e.what(), objPath, id, timeStamp, size,
- dumpId)
+ e.what(), objPath.c_str(), id, timeStamp,
+ size, dumpId)
.c_str());
report<InternalFailure>();
return;
@@ -116,7 +116,7 @@
fmt::format(
"Error in creating resource dump "
"entry,errormsg({}),OBJECTPATH({}), VSPSTRING({}), ID({})",
- e.what(), objPath, vspString, id)
+ e.what(), objPath.c_str(), vspString, id)
.c_str());
elog<InternalFailure>();
return std::string();