[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

@@ -27,6 +27,7 @@ static void blink_test_update(void* ctx) {
}
static void blink_test_draw_callback(Canvas* canvas, void* ctx) {
UNUSED(ctx);
canvas_clear(canvas);
canvas_set_font(canvas, FontPrimary);
canvas_draw_str(canvas, 2, 10, "Blink application");
@@ -41,6 +42,7 @@ static void blink_test_input_callback(InputEvent* input_event, void* ctx) {
}
int32_t blink_test_app(void* p) {
UNUSED(p);
osMessageQueueId_t event_queue = osMessageQueueNew(8, sizeof(BlinkEvent), NULL);
// Configure view port

View File

@@ -70,10 +70,12 @@ static void display_test_submenu_callback(void* context, uint32_t index) {
}
static uint32_t display_test_previous_callback(void* context) {
UNUSED(context);
return DisplayTestViewSubmenu;
}
static uint32_t display_test_exit_callback(void* context) {
UNUSED(context);
return VIEW_NONE;
}
@@ -210,6 +212,7 @@ void display_test_free(DisplayTest* instance) {
}
int32_t display_test_run(DisplayTest* instance) {
UNUSED(instance);
view_dispatcher_switch_to_view(instance->view_dispatcher, DisplayTestViewSubmenu);
view_dispatcher_run(instance->view_dispatcher);
@@ -217,6 +220,8 @@ int32_t display_test_run(DisplayTest* instance) {
}
int32_t display_test_app(void* p) {
UNUSED(p);
DisplayTest* instance = display_test_alloc();
int32_t ret = display_test_run(instance);

View File

@@ -13,6 +13,7 @@ struct ViewDisplayTest {
};
static void view_display_test_draw_callback_intro(Canvas* canvas, void* _model) {
UNUSED(_model);
canvas_draw_str(canvas, 12, 24, "Use < and > to switch tests");
canvas_draw_str(canvas, 12, 36, "Use ^ and v to switch size");
canvas_draw_str(canvas, 32, 48, "Use (o) to flip");

View File

@@ -60,6 +60,7 @@ static void keypad_test_input_callback(InputEvent* input_event, void* ctx) {
}
int32_t keypad_test_app(void* p) {
UNUSED(p);
osMessageQueueId_t event_queue = osMessageQueueNew(32, sizeof(InputEvent), NULL);
furi_check(event_queue);

View File

@@ -70,6 +70,7 @@ static void text_box_test_input_callback(InputEvent* input_event, void* ctx) {
}
int32_t text_box_test_app(void* p) {
UNUSED(p);
osMessageQueueId_t event_queue = osMessageQueueNew(32, sizeof(InputEvent), NULL);
furi_check(event_queue);
@@ -90,7 +91,7 @@ int32_t text_box_test_app(void* p) {
Gui* gui = furi_record_open("gui");
gui_add_view_port(gui, view_port, GuiLayerFullscreen);
uint32_t test_renders_num = SIZEOF_ARRAY(text_box_test_render);
uint32_t test_renders_num = COUNT_OF(text_box_test_render);
InputEvent event;
while(osMessageQueueGet(event_queue, &event, NULL, osWaitForever) == osOK) {
TextBoxTestState* state = acquire_mutex_block(&state_mutex);

View File

@@ -80,11 +80,13 @@ static void uart_echo_view_draw_callback(Canvas* canvas, void* _model) {
}
static bool uart_echo_view_input_callback(InputEvent* event, void* context) {
bool consumed = false;
return consumed;
UNUSED(event);
UNUSED(context);
return false;
}
static uint32_t uart_echo_exit(void* context) {
UNUSED(context);
return VIEW_NONE;
}
@@ -170,7 +172,10 @@ static int32_t uart_echo_worker(void* context) {
notification_message(app->notification, &sequence_notification);
with_view_model(
app->view, (UartDumpModel * model) { return true; });
app->view, (UartDumpModel * model) {
UNUSED(model);
return true;
});
}
}
@@ -261,6 +266,7 @@ static void uart_echo_app_free(UartEchoApp* app) {
}
int32_t uart_echo_app(void* p) {
UNUSED(p);
UartEchoApp* app = uart_echo_app_alloc();
view_dispatcher_run(app->view_dispatcher);
uart_echo_app_free(app);

View File

@@ -18,6 +18,7 @@ typedef struct {
} UsbMouseEvent;
static void usb_mouse_render_callback(Canvas* canvas, void* ctx) {
UNUSED(ctx);
canvas_clear(canvas);
canvas_set_font(canvas, FontPrimary);
@@ -37,6 +38,7 @@ static void usb_mouse_input_callback(InputEvent* input_event, void* ctx) {
}
int32_t usb_mouse_app(void* p) {
UNUSED(p);
osMessageQueueId_t event_queue = osMessageQueueNew(8, sizeof(UsbMouseEvent), NULL);
furi_check(event_queue);
ViewPort* view_port = view_port_alloc();

View File

@@ -51,6 +51,7 @@ void usb_test_submenu_callback(void* context, uint32_t index) {
}
uint32_t usb_test_exit(void* context) {
UNUSED(context);
return VIEW_NONE;
}
@@ -113,6 +114,7 @@ void usb_test_app_free(UsbTestApp* app) {
}
int32_t usb_test_app(void* p) {
UNUSED(p);
UsbTestApp* app = usb_test_app_alloc();
view_dispatcher_run(app->view_dispatcher);

View File

@@ -6,6 +6,7 @@
#include <notification/notification_messages.h>
void vibro_test_draw_callback(Canvas* canvas, void* ctx) {
UNUSED(ctx);
canvas_clear(canvas);
canvas_set_font(canvas, FontPrimary);
canvas_draw_str(canvas, 2, 10, "Vibro application");
@@ -22,6 +23,7 @@ void vibro_test_input_callback(InputEvent* input_event, void* ctx) {
}
int32_t vibro_test_app(void* p) {
UNUSED(p);
osMessageQueueId_t event_queue = osMessageQueueNew(8, sizeof(InputEvent), NULL);
// Configure view port