[FL-2520] FW build with -Wextra (#1185)

* Fixing compiler warnings with -Wextra
* More warnings suppression, WIP
* Even more warning fixes
* Added new lines at end of text files.
* Padding fix
* Additional fixes to warnings on different build configurations; added -Wextra to default build pipeline
* Fixes for Secplus v1
* -additional warnings
* +-Wredundant-decls fixes
* FuriHal: print stack overflow task name in console
* FuriHal: add missing include

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
This commit is contained in:
hedger
2022-05-06 16:37:10 +03:00
committed by GitHub
parent 1ca98170d9
commit 4d6b170769
461 changed files with 940 additions and 519 deletions

View File

@@ -113,6 +113,7 @@ FS_Error sd_unmount_card(StorageData* storage) {
FS_Error sd_format_card(StorageData* storage) {
#ifdef FURI_RAM_EXEC
UNUSED(storage);
return FSE_NOT_READY;
#else
uint8_t* work_area;
@@ -349,6 +350,10 @@ static uint16_t
static uint16_t
storage_ext_file_write(void* ctx, File* file, const void* buff, uint16_t const bytes_to_write) {
#ifdef FURI_RAM_EXEC
UNUSED(ctx);
UNUSED(file);
UNUSED(buff);
UNUSED(bytes_to_write);
return FSE_NOT_READY;
#else
StorageData* storage = ctx;
@@ -389,6 +394,8 @@ static uint64_t storage_ext_file_tell(void* ctx, File* file) {
static bool storage_ext_file_truncate(void* ctx, File* file) {
#ifdef FURI_RAM_EXEC
UNUSED(ctx);
UNUSED(file);
return FSE_NOT_READY;
#else
StorageData* storage = ctx;
@@ -402,6 +409,8 @@ static bool storage_ext_file_truncate(void* ctx, File* file) {
static bool storage_ext_file_sync(void* ctx, File* file) {
#ifdef FURI_RAM_EXEC
UNUSED(ctx);
UNUSED(file);
return FSE_NOT_READY;
#else
StorageData* storage = ctx;
@@ -497,6 +506,7 @@ static bool storage_ext_dir_rewind(void* ctx, File* file) {
/******************* Common FS Functions *******************/
static FS_Error storage_ext_common_stat(void* ctx, const char* path, FileInfo* fileinfo) {
UNUSED(ctx);
SDFileInfo _fileinfo;
SDError result = f_stat(path, &_fileinfo);
@@ -511,7 +521,9 @@ static FS_Error storage_ext_common_stat(void* ctx, const char* path, FileInfo* f
}
static FS_Error storage_ext_common_remove(void* ctx, const char* path) {
UNUSED(ctx);
#ifdef FURI_RAM_EXEC
UNUSED(path);
return FSE_NOT_READY;
#else
SDError result = f_unlink(path);
@@ -520,7 +532,9 @@ static FS_Error storage_ext_common_remove(void* ctx, const char* path) {
}
static FS_Error storage_ext_common_mkdir(void* ctx, const char* path) {
UNUSED(ctx);
#ifdef FURI_RAM_EXEC
UNUSED(path);
return FSE_NOT_READY;
#else
SDError result = f_mkdir(path);
@@ -533,7 +547,11 @@ static FS_Error storage_ext_common_fs_info(
const char* fs_path,
uint64_t* total_space,
uint64_t* free_space) {
UNUSED(fs_path);
#ifdef FURI_RAM_EXEC
UNUSED(ctx);
UNUSED(total_space);
UNUSED(free_space);
return FSE_NOT_READY;
#else
StorageData* storage = ctx;
@@ -610,4 +628,4 @@ void storage_ext_init(StorageData* storage) {
// do not notify on first launch, notifications app is waiting for our thread to read settings
storage_ext_tick_internal(storage, false);
}
}