diff options
author | David A. Mellis <d.mellis@arduino.cc> | 2011-10-02 09:44:21 -0400 |
---|---|---|
committer | David A. Mellis <d.mellis@arduino.cc> | 2011-10-02 09:44:21 -0400 |
commit | 075bb009b9bf48169921e1a43329ea49c15480bc (patch) | |
tree | 2c65022b72dffb353c5bae9dba04381e2d016a1c /cores/arduino/Stream.cpp | |
parent | e0c524b05777af20937f48d606ab44cc8f42d2dd (diff) |
Fixing warnings in Stream (Paul Stoffregen)
http://code.google.com/p/arduino/issues/detail?id=208
Diffstat (limited to 'cores/arduino/Stream.cpp')
-rw-r--r-- | cores/arduino/Stream.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/cores/arduino/Stream.cpp b/cores/arduino/Stream.cpp index 8b6f1e8..a7d9d38 100644 --- a/cores/arduino/Stream.cpp +++ b/cores/arduino/Stream.cpp @@ -67,9 +67,9 @@ int Stream::peekNextDigit() // Public Methods ////////////////////////////////////////////////////////////// -void Stream::setTimeout( long timeout) // sets the maximum number of milliseconds to wait +void Stream::setTimeout(unsigned long timeout) // sets the maximum number of milliseconds to wait { - this->_timeout = timeout; + _timeout = timeout; } // find returns true if the target string is found @@ -165,7 +165,7 @@ long Stream::parseInt(char skipChar) // as parseInt but returns a floating point value float Stream::parseFloat() { - parseFloat(NO_SKIP_CHAR); + return parseFloat(NO_SKIP_CHAR); } // as above but the given skipChar is ignored @@ -174,7 +174,6 @@ float Stream::parseFloat(char skipChar){ boolean isNegative = false; boolean isFraction = false; long value = 0; - float fValue; char c; float fraction = 1.0; @@ -223,7 +222,7 @@ int Stream::readBytes( char *buffer, size_t length) int Stream::readBytesUntil( char terminator, char *buffer, size_t length) { - int index = 0; + unsigned int index = 0; *buffer = 0; while(index < length-1 ){ int c = timedRead(); |