[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:
@@ -89,6 +89,7 @@ void battery_test_free(BatteryTestApp* app) {
|
||||
}
|
||||
|
||||
int32_t battery_test_app(void* p) {
|
||||
UNUSED(p);
|
||||
BatteryTestApp* app = battery_test_alloc();
|
||||
// Disable battery low level notification
|
||||
power_enable_low_battery_level_notification(app->power, false);
|
||||
|
@@ -6,6 +6,8 @@
|
||||
#include <power/power_service/power.h>
|
||||
|
||||
void power_cli_off(Cli* cli, string_t args) {
|
||||
UNUSED(cli);
|
||||
UNUSED(args);
|
||||
Power* power = furi_record_open("power");
|
||||
printf("It's now safe to disconnect USB from your flipper\r\n");
|
||||
osDelay(666);
|
||||
@@ -13,26 +15,37 @@ void power_cli_off(Cli* cli, string_t args) {
|
||||
}
|
||||
|
||||
void power_cli_reboot(Cli* cli, string_t args) {
|
||||
UNUSED(cli);
|
||||
UNUSED(args);
|
||||
power_reboot(PowerBootModeNormal);
|
||||
}
|
||||
|
||||
void power_cli_reboot2dfu(Cli* cli, string_t args) {
|
||||
UNUSED(cli);
|
||||
UNUSED(args);
|
||||
power_reboot(PowerBootModeDfu);
|
||||
}
|
||||
|
||||
static void power_cli_info_callback(const char* key, const char* value, bool last, void* context) {
|
||||
UNUSED(last);
|
||||
UNUSED(context);
|
||||
printf("%-24s: %s\r\n", key, value);
|
||||
}
|
||||
|
||||
void power_cli_info(Cli* cli, string_t args) {
|
||||
UNUSED(cli);
|
||||
UNUSED(args);
|
||||
furi_hal_power_info_get(power_cli_info_callback, NULL);
|
||||
}
|
||||
|
||||
void power_cli_debug(Cli* cli, string_t args) {
|
||||
UNUSED(cli);
|
||||
UNUSED(args);
|
||||
furi_hal_power_dump_state();
|
||||
}
|
||||
|
||||
void power_cli_5v(Cli* cli, string_t args) {
|
||||
UNUSED(cli);
|
||||
if(!string_cmp(args, "0")) {
|
||||
furi_hal_power_disable_otg();
|
||||
} else if(!string_cmp(args, "1")) {
|
||||
@@ -43,6 +56,7 @@ void power_cli_5v(Cli* cli, string_t args) {
|
||||
}
|
||||
|
||||
void power_cli_3v3(Cli* cli, string_t args) {
|
||||
UNUSED(cli);
|
||||
if(!string_cmp(args, "0")) {
|
||||
furi_hal_power_disable_external_3_3v();
|
||||
} else if(!string_cmp(args, "1")) {
|
||||
@@ -69,6 +83,7 @@ static void power_cli_command_print_usage() {
|
||||
}
|
||||
|
||||
void power_cli(Cli* cli, string_t args, void* context) {
|
||||
UNUSED(context);
|
||||
string_t cmd;
|
||||
string_init(cmd);
|
||||
|
||||
|
@@ -75,6 +75,7 @@ void power_settings_app_free(PowerSettingsApp* app) {
|
||||
}
|
||||
|
||||
int32_t power_settings_app(void* p) {
|
||||
UNUSED(p);
|
||||
PowerSettingsApp* app = power_settings_app_alloc();
|
||||
view_dispatcher_run(app->view_dispatcher);
|
||||
power_settings_app_free(app);
|
||||
|
@@ -31,4 +31,5 @@ bool power_settings_scene_battery_info_on_event(void* context, SceneManagerEvent
|
||||
}
|
||||
|
||||
void power_settings_scene_battery_info_on_exit(void* context) {
|
||||
UNUSED(context);
|
||||
}
|
||||
|
@@ -33,6 +33,7 @@ void power_settings_scene_reboot_on_enter(void* context) {
|
||||
}
|
||||
|
||||
bool power_settings_scene_reboot_on_event(void* context, SceneManagerEvent event) {
|
||||
UNUSED(context);
|
||||
bool consumed = false;
|
||||
|
||||
if(event.type == SceneManagerEventTypeCustom) {
|
||||
|
Reference in New Issue
Block a user