Skip to content

Commit 150d485

Browse files
committed
Removed warning "comparison of unsigned expression >= 0 is always true"
1 parent 5fab4db commit 150d485

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/DMXSerial2.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -403,8 +403,8 @@ void DMXSerialClass2::getDeviceID (DEVICEID id) {
403403
uint8_t DMXSerialClass2::readRelative(unsigned int channel)
404404
{
405405
uint8_t val = 0;
406-
if ((channel >= 0) && (channel < _initData->footprint)) {
407-
// in range !
406+
if (channel < _initData->footprint) {
407+
// channel is in a valid range! (channel >= 0) is assumed by (unsigned int) type.
408408
val = _dmxData[_startAddress + channel];
409409
} // if
410410
return(val);

0 commit comments

Comments
 (0)