Skip to content

Commit 70c904e

Browse files
committed
Fix compiler warning
1 parent e2263e2 commit 70c904e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cores/esp8266/HardwareSerial.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,9 @@ size_t HardwareSerial::readBytes(char* buffer, size_t size)
138138

139139
while (got < size)
140140
{
141-
time_t startMillis = millis();
141+
unsigned long startMillis = millis();
142142
size_t avail;
143-
while ((avail = available()) == 0 && ((time_t) millis() - startMillis) < _timeout);
143+
while ((avail = available()) == 0 && (millis() - startMillis) < _timeout);
144144
if (avail == 0)
145145
break;
146146
got += read(buffer + got, std::min(size - got, avail));

0 commit comments

Comments
 (0)