diff --git a/board/crc.h b/board/crc.h index 9d85d999e..0d62dd316 100644 --- a/board/crc.h +++ b/board/crc.h @@ -1,8 +1,7 @@ uint8_t crc_checksum(uint8_t *dat, int len, const uint8_t poly) { uint8_t crc = 0xFFU; - // FIXME: - // cppcheck-suppress misra-c2012-12.3 - int i, j; + int i; + int j; for (i = len - 1; i >= 0; i--) { crc ^= dat[i]; for (j = 0; j < 8; j++) { diff --git a/board/drivers/can.h b/board/drivers/can.h index 18fb8d4cb..dd4c3d573 100644 --- a/board/drivers/can.h +++ b/board/drivers/can.h @@ -18,14 +18,13 @@ uint32_t can_rx_errs = 0; uint32_t can_send_errs = 0; uint32_t can_fwd_errs = 0; uint32_t gmlan_send_errs = 0; -// FIXME: -// cppcheck-suppress misra-c2012-12.3 -extern int can_live, pending_can_live; + +extern int can_live; +extern int pending_can_live; // must reinit after changing these -// FIXME: -// cppcheck-suppress misra-c2012-12.3 -extern int can_loopback, can_silent; +extern int can_loopback; +extern int can_silent; extern uint32_t can_speed[4]; void can_set_forwarding(int from, int to); @@ -45,9 +44,11 @@ uint32_t ignition_can_cnt = 0U; #define ALL_CAN_SILENT 0xFF #define ALL_CAN_LIVE 0 -// FIXME: -// cppcheck-suppress misra-c2012-12.3 -int can_live = 0, pending_can_live = 0, can_loopback = 0, can_silent = ALL_CAN_SILENT; + +int can_live = 0; +int pending_can_live = 0; +int can_loopback = 0; +int can_silent = ALL_CAN_SILENT; // ********************* instantiate queues ********************* // FIXME: diff --git a/board/drivers/usb.h b/board/drivers/usb.h index 48f0bd946..524c4eb5d 100644 --- a/board/drivers/usb.h +++ b/board/drivers/usb.h @@ -410,13 +410,11 @@ void USB_WritePacket(const void *src, uint16_t len, uint32_t ep) { hexdump(src, len); #endif - uint8_t numpacket = (len + (MAX_RESP_LEN - 1U)) / MAX_RESP_LEN; + uint32_t numpacket = (len + (MAX_RESP_LEN - 1U)) / MAX_RESP_LEN; uint32_t count32b = 0; count32b = (len + 3U) / 4U; // TODO: revisit this - // FIXME: - // cppcheck-suppress misra-c2012-12.2 USBx_INEP(ep)->DIEPTSIZ = ((numpacket << 19) & USB_OTG_DIEPTSIZ_PKTCNT) | (len & USB_OTG_DIEPTSIZ_XFRSIZ); USBx_INEP(ep)->DIEPCTL |= (USB_OTG_DIEPCTL_CNAK | USB_OTG_DIEPCTL_EPENA);