You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the Arduino Compiler Warnings option is set to YES, the following warnings are generated -
C:\Users\grh\Google Drive\Arduino\libraries\DmxSerial2\src\DMXSerial2.cpp: In member function 'void DMXSerialClass2::write(int, uint8_t)':
C:\Users\grh\Google Drive\Arduino\libraries\DmxSerial2\src\DMXSerial2.cpp:411:13: warning: comparison is always false due to limited range of data type [-Wtype-limits]
if (value < DMXSERIAL_MIN_SLOT_VALUE) value = DMXSERIAL_MIN_SLOT_VALUE;
^
C:\Users\grh\Google Drive\Arduino\libraries\DmxSerial2\src\DMXSerial2.cpp:412:13: warning: comparison is always false due to limited range of data type [-Wtype-limits]
if (value > DMXSERIAL_MAX_SLOT_VALUE) value = DMXSERIAL_MAX_SLOT_VALUE;
^
The problem here is that value is declared as uint8_t and can thus never be less than DMXSERIAL_MIN_SLOT_VALUE or greater than DMXSERIAL_MAX_SLOT_VALUE
The fix is to simply remove or comment out the two if statements.
The text was updated successfully, but these errors were encountered:
g0uus
changed the title
Build warnings (part 3)
Build warning when Compler Warnings = All (Part 3)
Oct 15, 2018
If the Arduino Compiler Warnings option is set to YES, the following warnings are generated -
The problem here is that
value
is declared asuint8_t
and can thus never be less thanDMXSERIAL_MIN_SLOT_VALUE
or greater thanDMXSERIAL_MAX_SLOT_VALUE
The fix is to simply remove or comment out the two if statements.
The text was updated successfully, but these errors were encountered: