[build] fix errors and warnings when building on IAR and Keil (#2868)

This commit is contained in:
Kamil Sroka
2018-07-09 18:17:46 +02:00
committed by Jonathan Hui
parent 93bb67024f
commit 8555513247
3 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -74,4 +74,4 @@ otError StringBase::Write(char *aBuffer, uint16_t aSize, uint16_t &aLength, cons
#endif // OT_STRING_WINDOWS_WORKAROUND
} // namespace ot
} // namespace ot
+2 -2
View File
@@ -1226,13 +1226,13 @@ otError FragmentHeader::Init(const Message &aMessage, uint16_t aOffset)
otError error = OT_ERROR_NONE;
uint16_t bytesRead;
bytesRead = aMessage.Read(aOffset, sizeof(mDispatchSize), &mDispatchSize);
bytesRead = aMessage.Read(aOffset, sizeof(mDispatchSize), reinterpret_cast<void *>(&mDispatchSize));
VerifyOrExit(bytesRead == sizeof(mDispatchSize), error = OT_ERROR_PARSE);
aOffset += bytesRead;
VerifyOrExit(IsFragmentHeader(), error = OT_ERROR_PARSE);
bytesRead = aMessage.Read(aOffset, sizeof(mTag), &mTag);
bytesRead = aMessage.Read(aOffset, sizeof(mTag), reinterpret_cast<void *>(&mTag));
VerifyOrExit(bytesRead == sizeof(mTag), error = OT_ERROR_PARSE);
aOffset += bytesRead;
@@ -34,4 +34,5 @@
#if defined(__ICCARM__)
_Pragma("diag_suppress=Pe549")
_Pragma("diag_suppress=Pa082")
#endif