Use s.c_str() in log messages
Partly resolves openbmc/openbmc 2905
Also, fixed related problem with parenthesis in occ_presence.cpp.
Tested: static_assert only
Change-Id: Ib0dbf9c895e9f636ddc873221fd1ef93980c0353
Signed-off-by: Joseph Reynolds <jrey@us.ibm.com>
diff --git a/powercap.cpp b/powercap.cpp
index f2ae331..4c0c330 100644
--- a/powercap.cpp
+++ b/powercap.cpp
@@ -132,7 +132,7 @@
auto pcapString {std::to_string(pcapValue)};
log<level::INFO>("Writing pcap value to hwmon",
- entry("PCAP_PATH=%s",*fileName),
+ entry("PCAP_PATH=%s",fileName->c_str()),
entry("PCAP_VALUE=%s",pcapString.c_str()));
// Open the hwmon file and write the power cap
std::ofstream file(*fileName, std::ios::out);