Skip to content

Commit

Permalink
More fixes for compiler warnings - cleaning up code and making assump…
Browse files Browse the repository at this point in the history
…tions more clear
  • Loading branch information
collin80 committed Aug 13, 2019
1 parent ab8c82a commit 6971cb1
Show file tree
Hide file tree
Showing 6 changed files with 78 additions and 73 deletions.
6 changes: 3 additions & 3 deletions canframemodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,12 +209,12 @@ uint64_t CANFrameModel::getCANFrameVal(int row, Column col)
if (frame.isReceived) return 1;
return 0;
case Column::Bus:
return frame.bus;
return static_cast<uint64_t>(frame.bus);
case Column::Length:
return frame.len;
return static_cast<uint64_t>(frame.len);
case Column::ASCII: //sort both the same for now
case Column::Data:
for (uint32_t i = 0; i < frame.len; i++) temp += ((uint64_t)frame.data[i] << (56 - (8 * i)));
for (int i = 0; i < frame.len; i++) temp += (static_cast<uint64_t>(frame.data[i]) << (56 - (8 * i)));
//qDebug() << temp;
return temp;
case Column::NUM_COLUMN:
Expand Down
Loading

0 comments on commit 6971cb1

Please sign in to comment.