[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

@@ -364,6 +364,7 @@ static bool animation_manager_is_valid_idle_animation(
static StorageAnimation*
animation_manager_select_idle_animation(AnimationManager* animation_manager) {
UNUSED(animation_manager);
StorageAnimationList_t animation_list;
StorageAnimationList_init(animation_list);
animation_storage_fill_animation_list(&animation_list);

View File

@@ -130,7 +130,7 @@ void animation_storage_fill_animation_list(StorageAnimationList_t* animation_lis
flipper_format_free(file);
// add hard-coded animations
for(int i = 0; i < dolphin_internal_size; ++i) {
for(size_t i = 0; i < dolphin_internal_size; ++i) {
StorageAnimationList_push_back(*animation_list, (StorageAnimation*)&dolphin_internal[i]);
}
@@ -142,7 +142,7 @@ StorageAnimation* animation_storage_find_animation(const char* name) {
furi_assert(strlen(name));
StorageAnimation* storage_animation = NULL;
for(int i = 0; i < dolphin_blocking_size; ++i) {
for(size_t i = 0; i < dolphin_blocking_size; ++i) {
if(!strcmp(dolphin_blocking[i].manifest_info.name, name)) {
storage_animation = (StorageAnimation*)&dolphin_blocking[i];
break;
@@ -150,7 +150,7 @@ StorageAnimation* animation_storage_find_animation(const char* name) {
}
if(!storage_animation) {
for(int i = 0; i < dolphin_internal_size; ++i) {
for(size_t i = 0; i < dolphin_internal_size; ++i) {
if(!strcmp(dolphin_internal[i].manifest_info.name, name)) {
storage_animation = (StorageAnimation*)&dolphin_internal[i];
break;
@@ -365,7 +365,7 @@ static bool animation_storage_load_bubbles(BubbleAnimation* animation, FlipperFo
animation->frame_bubble_sequences =
malloc(sizeof(FrameBubble*) * animation->frame_bubble_sequences_count);
uint32_t current_slot = 0;
int32_t current_slot = 0;
for(int i = 0; i < animation->frame_bubble_sequences_count; ++i) {
FURI_CONST_ASSIGN_PTR(
animation->frame_bubble_sequences[i], malloc(sizeof(FrameBubble)));
@@ -374,7 +374,7 @@ static bool animation_storage_load_bubbles(BubbleAnimation* animation, FlipperFo
const FrameBubble* bubble = animation->frame_bubble_sequences[0];
int8_t index = -1;
for(;;) {
if(!flipper_format_read_uint32(ff, "Slot", &current_slot, 1)) break;
if(!flipper_format_read_int32(ff, "Slot", &current_slot, 1)) break;
if((current_slot != 0) && (index == -1)) break;
if(current_slot == index) {

View File

@@ -33,6 +33,7 @@ static void desktop_loader_callback(const void* message, void* context) {
}
static void desktop_lock_icon_callback(Canvas* canvas, void* context) {
UNUSED(context);
furi_assert(canvas);
canvas_draw_icon(canvas, 0, 0, &I_Lock_8x8);
}
@@ -298,6 +299,7 @@ static bool desktop_is_first_start() {
}
int32_t desktop_srv(void* p) {
UNUSED(p);
Desktop* desktop = desktop_alloc();
bool loaded = LOAD_DESKTOP_SETTINGS(&desktop->settings);

View File

@@ -53,4 +53,5 @@ bool desktop_settings_scene_pin_disable_on_event(void* context, SceneManagerEven
}
void desktop_settings_scene_pin_disable_on_exit(void* context) {
UNUSED(context);
}

View File

@@ -18,6 +18,7 @@ static void pin_error_back_callback(void* context) {
}
static void pin_error_done_callback(const PinCode* pin_code, void* context) {
UNUSED(pin_code);
furi_assert(context);
DesktopSettingsApp* app = context;
view_dispatcher_send_custom_event(app->view_dispatcher, SCENE_EVENT_EXIT);

View File

@@ -41,4 +41,5 @@ bool desktop_settings_scene_pin_setup_howto_on_event(void* context, SceneManager
}
void desktop_settings_scene_pin_setup_howto_on_exit(void* context) {
UNUSED(context);
}

View File

@@ -47,5 +47,6 @@ bool desktop_scene_fault_on_event(void* context, SceneManagerEvent event) {
}
void desktop_scene_fault_on_exit(void* context) {
UNUSED(context);
furi_hal_rtc_set_fault_data(0);
}

View File

@@ -50,4 +50,5 @@ bool desktop_scene_first_start_on_event(void* context, SceneManagerEvent event)
}
void desktop_scene_first_start_on_exit(void* context) {
UNUSED(context);
}

View File

@@ -81,4 +81,5 @@ bool desktop_scene_lock_menu_on_event(void* context, SceneManagerEvent event) {
}
void desktop_scene_lock_menu_on_exit(void* context) {
UNUSED(context);
}

View File

@@ -109,4 +109,5 @@ bool desktop_scene_locked_on_event(void* context, SceneManagerEvent event) {
}
void desktop_scene_locked_on_exit(void* context) {
UNUSED(context);
}

View File

@@ -43,4 +43,5 @@ bool desktop_scene_pin_timeout_on_event(void* context, SceneManagerEvent event)
}
void desktop_scene_pin_timeout_on_exit(void* context) {
UNUSED(context);
}

View File

@@ -51,6 +51,8 @@ static void desktop_view_pin_timeout_timer_callback(TimerHandle_t timer) {
}
static bool desktop_view_pin_timeout_input(InputEvent* event, void* context) {
UNUSED(event);
UNUSED(context);
return true;
}