1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-12 01:53:07 +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:
Earle F. Philhower, III
2018-02-17 18:47:10 -08:00
committed by GitHub
parent ad42ab69c1
commit f9ac524b13
22 changed files with 73 additions and 51 deletions

View File

@ -52,7 +52,7 @@ void setup() {
}
// Generate new data set for the struct
for (int i = 0; i < sizeof(rtcData.data); i++) {
for (size_t i = 0; i < sizeof(rtcData.data); i++) {
rtcData.data[i] = random(0, 128);
}
// Update CRC32 of data
@ -94,7 +94,7 @@ uint32_t calculateCRC32(const uint8_t *data, size_t length)
void printMemory() {
char buf[3];
uint8_t *ptr = (uint8_t *)&rtcData;
for (int i = 0; i < sizeof(rtcData); i++) {
for (size_t i = 0; i < sizeof(rtcData); i++) {
sprintf(buf, "%02X", ptr[i]);
Serial.print(buf);
if ((i + 1) % 32 == 0) {