summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoseph Reynolds <jrey@us.ibm.com>2018-05-17 12:11:18 -0500
committerJoseph Reynolds <jrey@us.ibm.com>2018-05-30 16:56:34 -0500
commit32c3f632eaf79dd352aa108cac6bd28cff22295f (patch)
treef777987ffb32ae1a782c80d2367d73cbc9a17262
parentf672a037276691dc631f4c65a1b4f32da65f2874 (diff)
downloadphosphor-gpio-monitor-32c3f632eaf79dd352aa108cac6bd28cff22295f.zip
phosphor-gpio-monitor-32c3f632eaf79dd352aa108cac6bd28cff22295f.tar.gz
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>
-rw-r--r--gpio-util/gpio.cpp2
-rw-r--r--presence/gpio_presence.cpp2
2 files changed, 2 insertions, 2 deletions
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 @@ void GPIO::requestLine(Value defaultValue)
{
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 @@ void Presence::updateInventory(bool present)
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);
OpenPOWER on IntegriCloud