@@ -139,7 +139,7 @@ long Stream::parseInt(LookaheadMode lookahead, char ignore)
139
139
return 0 ; // zero returned if timeout
140
140
141
141
do {
142
- if (c == ignore)
142
+ if (( char ) c == ignore)
143
143
; // ignore this character
144
144
else if (c == ' -' )
145
145
isNegative = true ;
@@ -148,7 +148,7 @@ long Stream::parseInt(LookaheadMode lookahead, char ignore)
148
148
read (); // consume the character we got with peek
149
149
c = timedPeek ();
150
150
}
151
- while ( (c >= ' 0' && c <= ' 9' ) || c == ignore );
151
+ while ( (c >= ' 0' && c <= ' 9' ) || ( char ) c == ignore );
152
152
153
153
if (isNegative)
154
154
value = -value;
@@ -170,7 +170,7 @@ float Stream::parseFloat(LookaheadMode lookahead, char ignore)
170
170
return 0 ; // zero returned if timeout
171
171
172
172
do {
173
- if (c == ignore)
173
+ if (( char ) c == ignore)
174
174
; // ignore
175
175
else if (c == ' -' )
176
176
isNegative = true ;
@@ -184,7 +184,7 @@ float Stream::parseFloat(LookaheadMode lookahead, char ignore)
184
184
read (); // consume the character we got with peek
185
185
c = timedPeek ();
186
186
}
187
- while ( (c >= ' 0' && c <= ' 9' ) || (c == ' .' && !isFraction) || c == ignore );
187
+ while ( (c >= ' 0' && c <= ' 9' ) || (c == ' .' && !isFraction) || ( char ) c == ignore );
188
188
189
189
if (isNegative)
190
190
value = -value;
@@ -222,7 +222,7 @@ size_t Stream::readBytesUntil(char terminator, char *buffer, size_t length)
222
222
size_t index = 0 ;
223
223
while (index < length) {
224
224
int c = timedRead ();
225
- if (c < 0 || c == terminator) break ;
225
+ if (c < 0 || ( char ) c == terminator) break ;
226
226
*buffer++ = (char )c;
227
227
index ++;
228
228
}
@@ -245,7 +245,7 @@ String Stream::readStringUntil(char terminator)
245
245
{
246
246
String ret;
247
247
int c = timedRead ();
248
- while (c >= 0 && c != terminator)
248
+ while (c >= 0 && ( char ) c != terminator)
249
249
{
250
250
ret += (char )c;
251
251
c = timedRead ();
@@ -268,7 +268,7 @@ int Stream::findMulti( struct Stream::MultiTarget *targets, int tCount) {
268
268
269
269
for (struct MultiTarget *t = targets; t < targets+tCount; ++t) {
270
270
// the simple case is if we match, deal with that first.
271
- if (c == t->str [t->index ]) {
271
+ if (( char ) c == t->str [t->index ]) {
272
272
if (++t->index == t->len )
273
273
return t - targets;
274
274
else
@@ -286,7 +286,7 @@ int Stream::findMulti( struct Stream::MultiTarget *targets, int tCount) {
286
286
do {
287
287
--t->index ;
288
288
// first check if current char works against the new current index
289
- if (c != t->str [t->index ])
289
+ if (( char ) c != t->str [t->index ])
290
290
continue ;
291
291
292
292
// if it's the only char then we're good, nothing more to check
0 commit comments