Skip to content

Commit 161a416

Browse files
zfieldssandeepmistry
authored andcommitted
Fix unsigned/signed comparison warning
warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
1 parent 1cea5d2 commit 161a416

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

examples/serial/BLESerial.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ BLESerial::operator bool() {
117117
}
118118

119119
void BLESerial::_received(const uint8_t* data, size_t size) {
120-
for (int i = 0; i < size; i++) {
120+
for (size_t i = 0; i < size; i++) {
121121
this->_rxHead = (this->_rxHead + 1) % sizeof(this->_rxBuffer);
122122
this->_rxBuffer[this->_rxHead] = data[i];
123123
}

0 commit comments

Comments
 (0)