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
@ -241,6 +241,8 @@ boolean callback_pathExists(SdFile& parentDir, char *filePathComponent,
|
||||
|
||||
*/
|
||||
SdFile child;
|
||||
(void) isLastComponent;
|
||||
(void) object;
|
||||
|
||||
boolean exists = child.open(parentDir, filePathComponent, O_RDONLY);
|
||||
|
||||
@ -310,6 +312,8 @@ boolean callback_openPath(SdFile& parentDir, char *filePathComponent,
|
||||
|
||||
boolean callback_remove(SdFile& parentDir, char *filePathComponent,
|
||||
boolean isLastComponent, void *object) {
|
||||
(void) object;
|
||||
|
||||
if (isLastComponent) {
|
||||
return SdFile::remove(parentDir, filePathComponent);
|
||||
}
|
||||
@ -318,6 +322,7 @@ boolean callback_remove(SdFile& parentDir, char *filePathComponent,
|
||||
|
||||
boolean callback_rmdir(SdFile& parentDir, char *filePathComponent,
|
||||
boolean isLastComponent, void *object) {
|
||||
(void) object;
|
||||
if (isLastComponent) {
|
||||
SdFile f;
|
||||
if (!f.open(parentDir, filePathComponent, O_READ)) return false;
|
||||
|
Reference in New Issue
Block a user