Fixed type signedness through the entire codebase; driver interfaces do not use starndard types now

This commit is contained in:
Pavel Kirienko
2014-03-29 22:40:15 +04:00
parent bdec81bbfa
commit 74ecfe0cc8
43 changed files with 209 additions and 210 deletions
+3 -3
View File
@@ -32,12 +32,12 @@ std::string CanFrame::toString(StringRepresentation mode) const
if (id & FlagEFF)
{
wpos += snprintf(wpos, epos - wpos, "0x%08x ", (unsigned int)(id & MaskExtID));
wpos += snprintf(wpos, epos - wpos, "0x%08x ", unsigned(id & MaskExtID));
}
else
{
const char* const fmt = (mode == StrAligned) ? " 0x%03x " : "0x%03x ";
wpos += snprintf(wpos, epos - wpos, fmt, (unsigned int)(id & MaskStdID));
wpos += snprintf(wpos, epos - wpos, fmt, unsigned(id & MaskStdID));
}
if (id & FlagRTR)
@@ -53,7 +53,7 @@ std::string CanFrame::toString(StringRepresentation mode) const
{
for (int dlen = 0; dlen < dlc; dlen++) // hex bytes
{
wpos += snprintf(wpos, epos - wpos, " %02x", (unsigned int)data[dlen]);
wpos += snprintf(wpos, epos - wpos, " %02x", unsigned(data[dlen]));
}
while (mode == StrAligned && wpos < buf + ASCII_COLUMN_OFFSET) // alignment