Fixing more warnings (Paul Stoffregen).
This commit is contained in:
parent
075bb009b9
commit
77cdeb5b93
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
|
||||
#include <avr/io.h>
|
||||
#include <avr/interrupt.h>
|
||||
#include <avr/delay.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
|
|
Loading…
Reference in New Issue