Skip to content
Snippets Groups Projects
Commit 0050e301 authored by Michal Sojka's avatar Michal Sojka
Browse files

latester: Fix GCC 4.9 warnings

parent 4b4d4552
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,7 @@
#include <stdbool.h>
#include <string.h>
#include <assert.h>
#include <arpa/inet.h>
/**
* Functions and types for CRC checks.
......@@ -126,7 +127,7 @@ unsigned calc_frame_length(struct can_frame *frame)
bitmap[4] = (frame->can_id & 0x1) << 7 |
(!!(frame->can_id & CAN_RTR_FLAG)) << 6 |
0 << 4 | /* r1, r0 */
frame->can_dlc & 0xf;
(frame->can_dlc & 0xf);
memcpy(&bitmap[5], &frame->data, frame->can_dlc);
start = 1;
end = 40 + 8*frame->can_dlc;
......@@ -137,10 +138,10 @@ unsigned calc_frame_length(struct can_frame *frame)
// bitmap[8-11] |55555555 66666666 77777777 ........| Data bytes
bitmap[0] = (frame->can_id & CAN_SFF_MASK) >> 9;
bitmap[1] = (frame->can_id >> 1) & 0xff;
bitmap[2] = (frame->can_id << 7) & 0xff |
bitmap[2] = ((frame->can_id << 7) & 0xff) |
(!!(frame->can_id & CAN_RTR_FLAG)) << 6 |
0 << 4 | /* IDE, r0 */
frame->can_dlc & 0xf;
(frame->can_dlc & 0xf);
memcpy(&bitmap[3], &frame->data, frame->can_dlc);
start = 5;
end = 24 + 8*frame->can_dlc;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment