1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-12-01 12:24:14 +01:00

Cast empty string to char* to fix compiler warning

Stream::find(char *target) passes an empty terminator string to
Stream::findUntil(char *target, char *terminator) which caused a compiler
warning with the updated toolchain, so cast it to a char*.
This commit is contained in:
Matt Robinson 2014-07-17 16:44:30 +01:00
parent 569c75246d
commit 61a3558946
2 changed files with 2 additions and 2 deletions

View File

@ -75,7 +75,7 @@ void Stream::setTimeout(unsigned long timeout) // sets the maximum number of mi
// find returns true if the target string is found
bool Stream::find(char *target)
{
return findUntil(target, "");
return findUntil(target, (char*)"");
}
// reads data from the stream until the target string of given length is found

View File

@ -75,7 +75,7 @@ void Stream::setTimeout(unsigned long timeout) // sets the maximum number of mi
// find returns true if the target string is found
bool Stream::find(char *target)
{
return findUntil(target, "");
return findUntil(target, (char*)"");
}
// reads data from the stream until the target string of given length is found