Skip to content

Patch to Sd2Card.cpp to elimimate compiler warnings #15

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 9 commits into from
Prev Previous commit
Next Next commit
Print: fix signed vs unsigned comparison
Print currently uses a signed vs unsigned comparison in Print::print(const String &s) while iterating through individual characters.
This causes compiler warnings when using -W -Wall.
  • Loading branch information
jcwren committed Dec 21, 2010
commit fe646170004876b11aeb627b0f8af85684fbfecd
2 changes: 1 addition & 1 deletion hardware/arduino/cores/arduino/Print.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ void Print::write(const uint8_t *buffer, size_t size)

void Print::print(const String &s)
{
for (int i = 0; i < s.length(); i++) {
for (unsigned int i = 0; i < s.length(); i++) {
write(s[i]);
}
}
Expand Down