[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:
		| @@ -79,4 +79,4 @@ void sd_notify_eject(NotificationApp* notifications) { | ||||
|  | ||||
| void sd_notify_error(NotificationApp* notifications) { | ||||
|     notification_message(notifications, &sd_sequence_error); | ||||
| } | ||||
| } | ||||
|   | ||||
| @@ -14,4 +14,4 @@ void sd_notify_error(NotificationApp* notifications); | ||||
|  | ||||
| #ifdef __cplusplus | ||||
| } | ||||
| #endif | ||||
| #endif | ||||
|   | ||||
| @@ -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); | ||||
| } | ||||
| } | ||||
|   | ||||
| @@ -13,4 +13,4 @@ FS_Error sd_format_card(StorageData* storage); | ||||
| FS_Error sd_card_info(StorageData* storage, SDInfo* sd_info); | ||||
| #ifdef __cplusplus | ||||
| } | ||||
| #endif | ||||
| #endif | ||||
|   | ||||
| @@ -129,6 +129,7 @@ static int storage_int_device_erase(const struct lfs_config* c, lfs_block_t bloc | ||||
| } | ||||
|  | ||||
| static int storage_int_device_sync(const struct lfs_config* c) { | ||||
|     UNUSED(c); | ||||
|     FURI_LOG_D(TAG, "Device sync: skipping, cause "); | ||||
|     return 0; | ||||
| } | ||||
| @@ -648,6 +649,7 @@ static FS_Error storage_int_common_fs_info( | ||||
|     const char* fs_path, | ||||
|     uint64_t* total_space, | ||||
|     uint64_t* free_space) { | ||||
|     UNUSED(fs_path); | ||||
|     StorageData* storage = ctx; | ||||
|  | ||||
|     lfs_t* lfs = lfs_get_from_storage(storage); | ||||
|   | ||||
| @@ -10,4 +10,4 @@ void storage_int_init(StorageData* storage); | ||||
|  | ||||
| #ifdef __cplusplus | ||||
| } | ||||
| #endif | ||||
| #endif | ||||
|   | ||||
		Reference in New Issue
	
	Block a user