[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

@@ -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);