Rectify few error messages in pldm
There are few places where we try to print a datatype that
is not supported by stdcout/ stdcerr.
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
Change-Id: Ic069fd92ec48bcb0058bcb4d7140e5f59909ca49
diff --git a/libpldmresponder/platform.hpp b/libpldmresponder/platform.hpp
index de81898..397eb75 100644
--- a/libpldmresponder/platform.hpp
+++ b/libpldmresponder/platform.hpp
@@ -334,7 +334,8 @@
{
std::cerr << "The requester sent wrong composite effecter"
<< " count for the effecter, EFFECTER_ID="
- << effecterId << "COMP_EFF_CNT=" << compEffecterCnt
+ << (unsigned)effecterId
+ << "COMP_EFF_CNT=" << (unsigned)compEffecterCnt
<< "\n";
return PLDM_ERROR_INVALID_DATA;
}
@@ -364,9 +365,10 @@
!(states->states[bitfieldIndex].byte & (1 << bit)))
{
std::cerr
- << "Invalid state set value, EFFECTER_ID=" << effecterId
- << " VALUE=" << stateField[currState].effecter_state
- << " COMPOSITE_EFFECTER_ID=" << currState
+ << "Invalid state set value, EFFECTER_ID="
+ << (unsigned)effecterId << " VALUE="
+ << (unsigned)stateField[currState].effecter_state
+ << " COMPOSITE_EFFECTER_ID=" << (unsigned)currState
<< " DBUS_PATH=" << dbusMappings[currState].objectPath
<< "\n";
rc = PLDM_PLATFORM_SET_EFFECTER_UNSUPPORTED_SENSORSTATE;
@@ -407,7 +409,7 @@
catch (const std::out_of_range& e)
{
std::cerr << "the effecterId does not exist. effecter id: "
- << effecterId << e.what() << '\n';
+ << (unsigned)effecterId << e.what() << '\n';
}
return rc;