Skip to content

Commit

Permalink
Cast empty string to char* to fix compiler warning
Browse files Browse the repository at this point in the history
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*.
  • Loading branch information
ribbons committed Jul 17, 2014
1 parent 569c752 commit 61a3558
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion hardware/arduino/avr/cores/arduino/Stream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion hardware/arduino/sam/cores/arduino/Stream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 61a3558

Please sign in to comment.