diff options
Diffstat (limited to 'cores/arduino')
-rw-r--r-- | cores/arduino/HardwareSerial.cpp | 4 | ||||
-rwxr-xr-x | cores/arduino/Print.cpp | 2 | ||||
-rw-r--r-- | cores/arduino/WString.cpp | 6 | ||||
-rw-r--r-- | cores/arduino/WString.h | 4 | ||||
-rwxr-xr-x | cores/arduino/wiring_private.h | 1 |
5 files changed, 8 insertions, 9 deletions
diff --git a/cores/arduino/HardwareSerial.cpp b/cores/arduino/HardwareSerial.cpp index b5992ad..1b1fa71 100644 --- a/cores/arduino/HardwareSerial.cpp +++ b/cores/arduino/HardwareSerial.cpp @@ -91,7 +91,7 @@ inline void store_char(unsigned char c, ring_buffer *buffer) #if !defined(USART_RX_vect) && !defined(SIG_USART0_RECV) && \ !defined(SIG_UART0_RECV) && !defined(USART0_RX_vect) && \ !defined(SIG_UART_RECV) - #error Don't know what the Data Received vector is called for the first UART + #error "Don't know what the Data Received vector is called for the first UART" #else void serialEvent() __attribute__((weak)); void serialEvent() {} @@ -180,7 +180,7 @@ void serialEventRun(void) // do nothing - on the 32u4 the first USART is USART1 #else #if !defined(UART0_UDRE_vect) && !defined(UART_UDRE_vect) && !defined(USART0_UDRE_vect) && !defined(USART_UDRE_vect) - #error Don't know what the Data Register Empty vector is called for the first UART + #error "Don't know what the Data Register Empty vector is called for the first UART" #else #if defined(UART0_UDRE_vect) ISR(UART0_UDRE_vect) diff --git a/cores/arduino/Print.cpp b/cores/arduino/Print.cpp index 500de8c..ff9b154 100755 --- a/cores/arduino/Print.cpp +++ b/cores/arduino/Print.cpp @@ -54,7 +54,7 @@ size_t Print::print(const __FlashStringHelper *ifsh) size_t Print::print(const String &s) { size_t n = 0; - for (int i = 0; i < s.length(); i++) { + for (uint16_t i = 0; i < s.length(); i++) { n += write(s[i]); } return n; diff --git a/cores/arduino/WString.cpp b/cores/arduino/WString.cpp index f90cef0..ad8d828 100644 --- a/cores/arduino/WString.cpp +++ b/cores/arduino/WString.cpp @@ -498,7 +498,7 @@ int String::lastIndexOf( char theChar ) const return lastIndexOf(theChar, len - 1); } -int String::lastIndexOf(char ch, int fromIndex) const +int String::lastIndexOf(char ch, unsigned int fromIndex) const { if (fromIndex >= len || fromIndex < 0) return -1; char tempchar = buffer[fromIndex + 1]; @@ -514,7 +514,7 @@ int String::lastIndexOf(const String &s2) const return lastIndexOf(s2, len - s2.len); } -int String::lastIndexOf(const String &s2, int fromIndex) const +int String::lastIndexOf(const String &s2, unsigned int fromIndex) const { if (s2.len == 0 || len == 0 || s2.len > len || fromIndex < 0) return -1; if (fromIndex >= len) fromIndex = len - 1; @@ -522,7 +522,7 @@ int String::lastIndexOf(const String &s2, int fromIndex) const for (char *p = buffer; p <= buffer + fromIndex; p++) { p = strstr(p, s2.buffer); if (!p) break; - if (p - buffer <= fromIndex) found = p - buffer; + if ((unsigned int)(p - buffer) <= fromIndex) found = p - buffer; } return found; } diff --git a/cores/arduino/WString.h b/cores/arduino/WString.h index a601aca..d76d2a3 100644 --- a/cores/arduino/WString.h +++ b/cores/arduino/WString.h @@ -154,9 +154,9 @@ public: int indexOf( const String &str ) const; int indexOf( const String &str, unsigned int fromIndex ) const; int lastIndexOf( char ch ) const; - int lastIndexOf( char ch, int fromIndex ) const; + int lastIndexOf( char ch, unsigned int fromIndex ) const; int lastIndexOf( const String &str ) const; - int lastIndexOf( const String &str, int fromIndex ) const; + int lastIndexOf( const String &str, unsigned int fromIndex ) const; String substring( unsigned int beginIndex ) const; String substring( unsigned int beginIndex, unsigned int endIndex ) const; diff --git a/cores/arduino/wiring_private.h b/cores/arduino/wiring_private.h index 74c0d06..41d1d40 100755 --- a/cores/arduino/wiring_private.h +++ b/cores/arduino/wiring_private.h @@ -27,7 +27,6 @@ #include <avr/io.h> #include <avr/interrupt.h> -#include <avr/delay.h> #include <stdio.h> #include <stdarg.h> |