mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-30 19:52:13 +01:00
Fixing warnings (David H. Lynch Jr).
This commit is contained in:
parent
fe8af70c61
commit
d59fcb8eed
@ -45,7 +45,7 @@ void Print::write(const uint8_t *buffer, size_t size)
|
|||||||
|
|
||||||
void Print::print(const String &s)
|
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]);
|
write(s[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -67,7 +67,7 @@ class String
|
|||||||
int lastIndexOf( char ch, unsigned int fromIndex ) const;
|
int lastIndexOf( char ch, unsigned int fromIndex ) const;
|
||||||
int lastIndexOf( const String &str ) const;
|
int lastIndexOf( const String &str ) const;
|
||||||
int lastIndexOf( const String &str, unsigned int fromIndex ) const;
|
int lastIndexOf( const String &str, unsigned int fromIndex ) const;
|
||||||
const unsigned int length( ) const { return _length; }
|
unsigned int length( ) const { return _length; }
|
||||||
void setCharAt(unsigned int index, const char ch);
|
void setCharAt(unsigned int index, const char ch);
|
||||||
unsigned char startsWith( const String &prefix ) const;
|
unsigned char startsWith( const String &prefix ) const;
|
||||||
unsigned char startsWith( const String &prefix, unsigned int toffset ) const;
|
unsigned char startsWith( const String &prefix, unsigned int toffset ) const;
|
||||||
|
@ -81,50 +81,50 @@
|
|||||||
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
|
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
|
||||||
const uint16_t PROGMEM port_to_mode_PGM[] = {
|
const uint16_t PROGMEM port_to_mode_PGM[] = {
|
||||||
NOT_A_PORT,
|
NOT_A_PORT,
|
||||||
&DDRA,
|
(uint16_t) &DDRA,
|
||||||
&DDRB,
|
(uint16_t) &DDRB,
|
||||||
&DDRC,
|
(uint16_t) &DDRC,
|
||||||
&DDRD,
|
(uint16_t) &DDRD,
|
||||||
&DDRE,
|
(uint16_t) &DDRE,
|
||||||
&DDRF,
|
(uint16_t) &DDRF,
|
||||||
&DDRG,
|
(uint16_t) &DDRG,
|
||||||
&DDRH,
|
(uint16_t) &DDRH,
|
||||||
NOT_A_PORT,
|
NOT_A_PORT,
|
||||||
&DDRJ,
|
(uint16_t) &DDRJ,
|
||||||
&DDRK,
|
(uint16_t) &DDRK,
|
||||||
&DDRL,
|
(uint16_t) &DDRL,
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint16_t PROGMEM port_to_output_PGM[] = {
|
const uint16_t PROGMEM port_to_output_PGM[] = {
|
||||||
NOT_A_PORT,
|
NOT_A_PORT,
|
||||||
&PORTA,
|
(uint16_t) &PORTA,
|
||||||
&PORTB,
|
(uint16_t) &PORTB,
|
||||||
&PORTC,
|
(uint16_t) &PORTC,
|
||||||
&PORTD,
|
(uint16_t) &PORTD,
|
||||||
&PORTE,
|
(uint16_t) &PORTE,
|
||||||
&PORTF,
|
(uint16_t) &PORTF,
|
||||||
&PORTG,
|
(uint16_t) &PORTG,
|
||||||
&PORTH,
|
(uint16_t) &PORTH,
|
||||||
NOT_A_PORT,
|
NOT_A_PORT,
|
||||||
&PORTJ,
|
(uint16_t) &PORTJ,
|
||||||
&PORTK,
|
(uint16_t) &PORTK,
|
||||||
&PORTL,
|
(uint16_t) &PORTL,
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint16_t PROGMEM port_to_input_PGM[] = {
|
const uint16_t PROGMEM port_to_input_PGM[] = {
|
||||||
NOT_A_PIN,
|
NOT_A_PIN,
|
||||||
&PINA,
|
(uint16_t) &PINA,
|
||||||
&PINB,
|
(uint16_t) &PINB,
|
||||||
&PINC,
|
(uint16_t) &PINC,
|
||||||
&PIND,
|
(uint16_t) &PIND,
|
||||||
&PINE,
|
(uint16_t) &PINE,
|
||||||
&PINF,
|
(uint16_t) &PINF,
|
||||||
&PING,
|
(uint16_t) &PING,
|
||||||
&PINH,
|
(uint16_t) &PINH,
|
||||||
NOT_A_PIN,
|
NOT_A_PIN,
|
||||||
&PINJ,
|
(uint16_t) &PINJ,
|
||||||
&PINK,
|
(uint16_t) &PINK,
|
||||||
&PINL,
|
(uint16_t) &PINL,
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint8_t PROGMEM digital_pin_to_port_PGM[] = {
|
const uint8_t PROGMEM digital_pin_to_port_PGM[] = {
|
||||||
@ -358,25 +358,25 @@ const uint8_t PROGMEM digital_pin_to_timer_PGM[] = {
|
|||||||
const uint16_t PROGMEM port_to_mode_PGM[] = {
|
const uint16_t PROGMEM port_to_mode_PGM[] = {
|
||||||
NOT_A_PORT,
|
NOT_A_PORT,
|
||||||
NOT_A_PORT,
|
NOT_A_PORT,
|
||||||
&DDRB,
|
(uint16_t) &DDRB,
|
||||||
&DDRC,
|
(uint16_t) &DDRC,
|
||||||
&DDRD,
|
(uint16_t) &DDRD,
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint16_t PROGMEM port_to_output_PGM[] = {
|
const uint16_t PROGMEM port_to_output_PGM[] = {
|
||||||
NOT_A_PORT,
|
NOT_A_PORT,
|
||||||
NOT_A_PORT,
|
NOT_A_PORT,
|
||||||
&PORTB,
|
(uint16_t) &PORTB,
|
||||||
&PORTC,
|
(uint16_t) &PORTC,
|
||||||
&PORTD,
|
(uint16_t) &PORTD,
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint16_t PROGMEM port_to_input_PGM[] = {
|
const uint16_t PROGMEM port_to_input_PGM[] = {
|
||||||
NOT_A_PORT,
|
NOT_A_PORT,
|
||||||
NOT_A_PORT,
|
NOT_A_PORT,
|
||||||
&PINB,
|
(uint16_t) &PINB,
|
||||||
&PINC,
|
(uint16_t) &PINC,
|
||||||
&PIND,
|
(uint16_t) &PIND,
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint8_t PROGMEM digital_pin_to_port_PGM[] = {
|
const uint8_t PROGMEM digital_pin_to_port_PGM[] = {
|
||||||
|
@ -9,7 +9,6 @@ static uint16_t local_port;
|
|||||||
*/
|
*/
|
||||||
uint8_t socket(SOCKET s, uint8_t protocol, uint16_t port, uint8_t flag)
|
uint8_t socket(SOCKET s, uint8_t protocol, uint16_t port, uint8_t flag)
|
||||||
{
|
{
|
||||||
uint8_t ret;
|
|
||||||
if ((protocol == SnMR::TCP) || (protocol == SnMR::UDP) || (protocol == SnMR::IPRAW) || (protocol == SnMR::MACRAW) || (protocol == SnMR::PPPOE))
|
if ((protocol == SnMR::TCP) || (protocol == SnMR::UDP) || (protocol == SnMR::IPRAW) || (protocol == SnMR::MACRAW) || (protocol == SnMR::PPPOE))
|
||||||
{
|
{
|
||||||
close(s);
|
close(s);
|
||||||
|
@ -134,7 +134,7 @@ uint8_t W5100Class::write(uint16_t _addr, uint8_t _data)
|
|||||||
|
|
||||||
uint16_t W5100Class::write(uint16_t _addr, uint8_t *_buf, uint16_t _len)
|
uint16_t W5100Class::write(uint16_t _addr, uint8_t *_buf, uint16_t _len)
|
||||||
{
|
{
|
||||||
for (int i=0; i<_len; i++)
|
for (uint16_t i=0; i<_len; i++)
|
||||||
{
|
{
|
||||||
setSS();
|
setSS();
|
||||||
SPI.transfer(0xF0);
|
SPI.transfer(0xF0);
|
||||||
@ -160,7 +160,7 @@ uint8_t W5100Class::read(uint16_t _addr)
|
|||||||
|
|
||||||
uint16_t W5100Class::read(uint16_t _addr, uint8_t *_buf, uint16_t _len)
|
uint16_t W5100Class::read(uint16_t _addr, uint8_t *_buf, uint16_t _len)
|
||||||
{
|
{
|
||||||
for (int i=0; i<_len; i++)
|
for (uint16_t i=0; i<_len; i++)
|
||||||
{
|
{
|
||||||
setSS();
|
setSS();
|
||||||
SPI.transfer(0x0F);
|
SPI.transfer(0x0F);
|
||||||
|
@ -27,7 +27,7 @@ void File::write(const uint8_t *buf, size_t size) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int File::peek() {
|
int File::peek() {
|
||||||
char c = SD.file.read();
|
int c = SD.file.read();
|
||||||
if (c != -1) SD.file.seekCur(-1);
|
if (c != -1) SD.file.seekCur(-1);
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user