Seeed-Studio / Seeed_Arduino_CAN

Seeed Arduino CAN-BUS library - MCP2518FD&MCP2515&MCP2551
MIT License
826 stars 440 forks source link

warning: left shift count >= width of type #129

Closed EliasKotlyar closed 2 years ago

EliasKotlyar commented 2 years ago

Describe the bug Got this warning when compiling:

/home/elias/Arduino/libraries/Seeed_Arduino_CAN-master/src/mcp2518fd_can.cpp: In member function 'byte mcp2518fd::mcp2518fd_readMsgBufID(volatile byte, volatile byte)': /home/elias/Arduino/libraries/Seeed_Arduino_CAN-master/src/mcp2518fd_can.cpp:2069:60: warning: left shift count >= width of type [-Wshift-count-overflow] can_id = ext_flg? (rxObj.bF.id.EID | (rxObj.bF.id.SID << 18))

To Reproduce Steps to reproduce the behavior:

  1. Install Arduino 1.8.6 (x64)
  2. Use "send" Sketch
  3. Try to compiled

Expected behavior Compiling runs ok without any warnings

Pillar1989 commented 2 years ago

thank you