fixup: CI is x86-64, build is 32, cast down for debug
The fprintfs were promoted to %lu to make CI work, which then broke the
ARM build. Therefore need to cast to make it happy in both
environments.
Change-Id: Ibba14d8aa19aca44c9ce9b65b66dd79659ce126e
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/cable.cpp b/cable.cpp
index 025b228..0bbdcf8 100644
--- a/cable.cpp
+++ b/cable.cpp
@@ -56,7 +56,8 @@
// This command is expecting: [0x00][len][if_name]
if ((*dataLen) < sizeof(struct CableRequest) + sizeof(uint8_t))
{
- fprintf(stderr, "Invalid command length: %lu\n", (*dataLen));
+ fprintf(stderr, "Invalid command length: %u\n",
+ static_cast<uint32_t>(*dataLen));
return IPMI_CC_INVALID;
}
@@ -73,7 +74,8 @@
// Verify the request buffer contains the object and the string.
if ((*dataLen) < (sizeof(struct CableRequest) + request->if_name_len))
{
- fprintf(stderr, "*dataLen too small: %lu\n", (*dataLen));
+ fprintf(stderr, "*dataLen too small: %u\n",
+ static_cast<uint32_t>(*dataLen));
return IPMI_CC_INVALID;
}
diff --git a/cpld.cpp b/cpld.cpp
index 6194278..5345a74 100644
--- a/cpld.cpp
+++ b/cpld.cpp
@@ -51,7 +51,8 @@
{
if ((*dataLen) < sizeof(struct CpldRequest))
{
- fprintf(stderr, "Invalid command length: %lu\n", (*dataLen));
+ fprintf(stderr, "Invalid command length: %u\n",
+ static_cast<uint32_t>(*dataLen));
return IPMI_CC_INVALID;
}
diff --git a/eth.cpp b/eth.cpp
index 32dbe89..ba46f73 100644
--- a/eth.cpp
+++ b/eth.cpp
@@ -70,7 +70,8 @@
{
if ((*dataLen) < sizeof(struct EthDeviceRequest))
{
- fprintf(stderr, "Invalid command length: %lu\n", (*dataLen));
+ fprintf(stderr, "Invalid command length: %u\n",
+ static_cast<uint32_t>(*dataLen));
return IPMI_CC_INVALID;
}
diff --git a/psu.cpp b/psu.cpp
index 1a4d556..addf0d1 100644
--- a/psu.cpp
+++ b/psu.cpp
@@ -48,7 +48,8 @@
{
if ((*dataLen) < sizeof(struct PsuResetRequest))
{
- fprintf(stderr, "Invalid command length: %lu\n", (*dataLen));
+ fprintf(stderr, "Invalid command length: %u\n",
+ static_cast<uint32_t>(*dataLen));
return IPMI_CC_INVALID;
}