mirror of
https://github.com/esp8266/Arduino.git
synced 2025-12-18 10:22:18 +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
@@ -259,11 +259,12 @@ uint8_t SdFile::make83Name(const char* str, uint8_t* name) {
|
||||
i = 8; // place for extension
|
||||
} else {
|
||||
// illegal FAT characters
|
||||
uint8_t b;
|
||||
#if defined(__AVR__)
|
||||
uint8_t b;
|
||||
PGM_P p = PSTR("|<>^+=?/[];,*\"\\");
|
||||
while ((b = pgm_read_byte(p++))) if (b == c) return false;
|
||||
#elif defined(__arm__)
|
||||
uint8_t b;
|
||||
const uint8_t valid[] = "|<>^+=?/[];,*\"\\";
|
||||
const uint8_t *p = valid;
|
||||
while ((b = *p++)) if (b == c) return false;
|
||||
@@ -905,7 +906,7 @@ uint8_t SdFile::rmRfStar(void) {
|
||||
if (!f.remove()) return false;
|
||||
}
|
||||
// position to next entry if required
|
||||
if (curPosition_ != (32*(index + 1))) {
|
||||
if (curPosition_ != (32*((uint32_t)index + 1))) {
|
||||
if (!seekSet(32*(index + 1))) return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user