Use s.c_str() in log messages
Partly Resolves openbmc/openbmc 2905
Tested: static_assert only
Change-Id: I16db5b66bf5a26558a2ed0c1617ef5466dadefea
Signed-off-by: Joseph Reynolds <jrey@us.ibm.com>
diff --git a/gpio-util/gpio.cpp b/gpio-util/gpio.cpp
index d5c2ce4..080ab99 100644
--- a/gpio-util/gpio.cpp
+++ b/gpio-util/gpio.cpp
@@ -58,7 +58,7 @@
{
auto e = errno;
log<level::ERR>("Failed opening GPIO device",
- entry("DEVICE=%s", device),
+ entry("DEVICE=%s", device.c_str()),
entry("ERRNO=%d", e));
throw std::runtime_error("Failed opening GPIO device");
}
diff --git a/presence/gpio_presence.cpp b/presence/gpio_presence.cpp
index ecc4813..4a11d98 100644
--- a/presence/gpio_presence.cpp
+++ b/presence/gpio_presence.cpp
@@ -158,7 +158,7 @@
log<level::INFO>("Updating inventory present property",
entry("PRESENT=%d", present),
- entry("PATH=%s", inventory));
+ entry("PATH=%s", inventory.c_str()));
auto invService = getService(INVENTORY_PATH, INVENTORY_INTF, bus);