Skip to content

Commit 6a22efe

Browse files
committed
Merge pull request #3011 from Lauszus/warnings
Fixed some warnings
2 parents 38d5e91 + 91489d7 commit 6a22efe

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

hardware/arduino/avr/cores/arduino/Stream.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -265,11 +265,11 @@ int Stream::findMulti( struct Stream::MultiTarget *targets, int tCount) {
265265

266266
for (struct MultiTarget *t = targets; t < targets+tCount; ++t) {
267267
// the simple case is if we match, deal with that first.
268-
if (c == t->str[t->index])
269-
if (++t->index == t->len)
270-
return t - targets;
271-
else
272-
continue;
268+
if (c == t->str[t->index]) {
269+
if (++t->index == t->len)
270+
return t - targets;
271+
} else
272+
continue;
273273

274274
// if not we need to walk back and see if we could have matched further
275275
// down the stream (ie '1112' doesn't match the first position in '11112'
@@ -293,7 +293,7 @@ int Stream::findMulti( struct Stream::MultiTarget *targets, int tCount) {
293293

294294
// otherwise we need to check the rest of the found string
295295
int diff = origIndex - t->index;
296-
int i;
296+
size_t i;
297297
for (i = 0; i < t->index; ++i)
298298
if (t->str[i] != t->str[i + diff])
299299
break;

0 commit comments

Comments
 (0)