mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-29 05:21:37 +03:00
Add -Werror to acceptance builds for C and CPP (#4369)
Use platform.local.txt to add -Werror to GCC for the build of all code. Any warnings on a submitted patch will cause an error. Several examples and libraries had warnings/errors (missing returns on functions, types, etc.). Clean those up with this commit as well.
This commit is contained in:
committed by
GitHub
parent
ad42ab69c1
commit
f9ac524b13
@ -27,11 +27,12 @@ void setup()
|
||||
// It's up to the user to implement protocol for handling data length
|
||||
SPISlave.onData([](uint8_t * data, size_t len) {
|
||||
String message = String((char *)data);
|
||||
(void) len;
|
||||
if(message.equals("Hello Slave!")) {
|
||||
SPISlave.setData("Hello Master!");
|
||||
} else if(message.equals("Are you alive?")) {
|
||||
char answer[33];
|
||||
sprintf(answer,"Alive for %u seconds!", millis() / 1000);
|
||||
sprintf(answer,"Alive for %lu seconds!", millis() / 1000);
|
||||
SPISlave.setData(answer);
|
||||
} else {
|
||||
SPISlave.setData("Say what?");
|
||||
|
@ -55,7 +55,6 @@ void ICACHE_RAM_ATTR _hspi_slave_isr_handler(void *arg)
|
||||
if((status & SPISWBIS) != 0 && (_hspi_slave_rx_data_cb)) {
|
||||
uint8_t i;
|
||||
uint32_t data;
|
||||
uint8_t buffer[33];
|
||||
_hspi_slave_buffer[32] = 0;
|
||||
for(i=0; i<8; i++) {
|
||||
data=SPI1W(i);
|
||||
|
Reference in New Issue
Block a user