Observation
Warning caught while compiliing note-arduino v1.5.4 for an Arduino Uno in the Arduino IDE 2.3.0
/home/zak/Development/Arduino/libraries/Blues_Wireless_Notecard/src/note-c/n_request.c: In function 'noteTransactionShouldLock':
/home/zak/Development/Arduino/libraries/Blues_Wireless_Notecard/src/note-c/n_request.c:503:40: warning: integer overflow in expression [-Woverflow]
transactionTimeoutMs = (90 * 1000);
^
Expectation
When compiling for a 16-bit MCU, constant values that would cause an overflow, such as (90 * 1000), should cast into a fixed size integer (e.g. uint32_t) or be gated by precompiler instructions, which provide the largest possible value without overflowing.
Observation
Warning caught while compiliing
note-arduinov1.5.4 for an Arduino Uno in the Arduino IDE 2.3.0Expectation
When compiling for a 16-bit MCU, constant values that would cause an overflow, such as
(90 * 1000), should cast into a fixed size integer (e.g.uint32_t) or be gated by precompiler instructions, which provide the largest possible value without overflowing.