[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

@@ -3,7 +3,7 @@
#include "../view/elements/icon_element.h"
#include "../view/elements/string_element.h"
void LfRfidAppSceneDeleteConfirm::on_enter(LfRfidApp* app, bool need_restore) {
void LfRfidAppSceneDeleteConfirm::on_enter(LfRfidApp* app, bool /* need_restore */) {
string_init(string_data);
string_init(string_decrypted);
string_init(string_header);

View File

@@ -14,4 +14,4 @@ private:
string_t string_header;
string_t string_data;
string_t string_decrypted;
};
};

View File

@@ -1,6 +1,6 @@
#include "lfrfid_app_scene_delete_success.h"
void LfRfidAppSceneDeleteSuccess::on_enter(LfRfidApp* app, bool need_restore) {
void LfRfidAppSceneDeleteSuccess::on_enter(LfRfidApp* app, bool /* need_restore */) {
auto popup = app->view_controller.get<PopupVM>();
popup->set_icon(0, 2, &I_DolphinMafia_115x62);
@@ -35,4 +35,4 @@ void LfRfidAppSceneDeleteSuccess::timeout_callback(void* context) {
LfRfidApp::Event event;
event.type = LfRfidApp::EventType::Back;
app->view_controller.send_event(&event);
}
}

View File

@@ -9,4 +9,4 @@ public:
private:
static void timeout_callback(void* context);
};
};

View File

@@ -1,7 +1,7 @@
#include "lfrfid_app_scene_emulate.h"
#include <dolphin/dolphin.h>
void LfRfidAppSceneEmulate::on_enter(LfRfidApp* app, bool need_restore) {
void LfRfidAppSceneEmulate::on_enter(LfRfidApp* app, bool /* need_restore */) {
string_init(data_string);
DOLPHIN_DEED(DolphinDeedRfidEmulate);

View File

@@ -9,4 +9,4 @@ public:
private:
string_t data_string;
};
};

View File

@@ -3,7 +3,7 @@
#include "../view/elements/icon_element.h"
#include "../view/elements/string_element.h"
void LfRfidAppSceneExitConfirm::on_enter(LfRfidApp* app, bool need_restore) {
void LfRfidAppSceneExitConfirm::on_enter(LfRfidApp* app, bool /* need_restore */) {
auto container = app->view_controller.get<ContainerVM>();
auto button = container->add<ButtonElement>();

View File

@@ -10,4 +10,4 @@ public:
private:
static void exit_callback(void* context);
static void stay_callback(void* context);
};
};

View File

@@ -1,7 +1,7 @@
#include "lfrfid_app_scene_read.h"
#include <dolphin/dolphin.h>
void LfRfidAppSceneRead::on_enter(LfRfidApp* app, bool need_restore) {
void LfRfidAppSceneRead::on_enter(LfRfidApp* app, bool /* need_restore */) {
auto popup = app->view_controller.get<PopupVM>();
DOLPHIN_DEED(DolphinDeedRfidRead);

View File

@@ -6,4 +6,4 @@ public:
void on_enter(LfRfidApp* app, bool need_restore) final;
bool on_event(LfRfidApp* app, LfRfidApp::Event* event) final;
void on_exit(LfRfidApp* app) final;
};
};

View File

@@ -10,4 +10,4 @@ public:
private:
static void submenu_callback(void* context, uint32_t index);
uint32_t submenu_item_selected = 0;
};
};

View File

@@ -3,7 +3,7 @@
#include "../view/elements/icon_element.h"
#include "../view/elements/string_element.h"
void LfRfidAppSceneReadSuccess::on_enter(LfRfidApp* app, bool need_restore) {
void LfRfidAppSceneReadSuccess::on_enter(LfRfidApp* app, bool /* need_restore */) {
string_init(string[0]);
string_init(string[1]);
string_init(string[2]);

View File

@@ -12,4 +12,4 @@ private:
static void more_callback(void* context);
string_t string[3];
};
};

View File

@@ -3,7 +3,7 @@
#include "../view/elements/icon_element.h"
#include "../view/elements/string_element.h"
void LfRfidAppSceneRetryConfirm::on_enter(LfRfidApp* app, bool need_restore) {
void LfRfidAppSceneRetryConfirm::on_enter(LfRfidApp* app, bool /* need_restore */) {
auto container = app->view_controller.get<ContainerVM>();
auto button = container->add<ButtonElement>();

View File

@@ -10,4 +10,4 @@ public:
private:
static void exit_callback(void* context);
static void stay_callback(void* context);
};
};

View File

@@ -30,4 +30,4 @@ private:
0xBB,
0xBB,
};
};
};

View File

@@ -1,7 +1,7 @@
#include "lfrfid_app_scene_save_name.h"
#include <lib/toolbox/random_name.h>
void LfRfidAppSceneSaveName::on_enter(LfRfidApp* app, bool need_restore) {
void LfRfidAppSceneSaveName::on_enter(LfRfidApp* app, bool /* need_restore */) {
const char* key_name = app->worker.key.get_name();
bool key_name_empty = !strcmp(key_name, "");

View File

@@ -9,4 +9,4 @@ public:
private:
static void save_callback(void* context);
};
};

View File

@@ -3,7 +3,7 @@
#include <dolphin/dolphin.h>
#include <stdint.h>
void LfRfidAppSceneSaveSuccess::on_enter(LfRfidApp* app, bool need_restore) {
void LfRfidAppSceneSaveSuccess::on_enter(LfRfidApp* app, bool /* need_restore */) {
auto popup = app->view_controller.get<PopupVM>();
DOLPHIN_DEED(DolphinDeedRfidSave);

View File

@@ -9,4 +9,4 @@ public:
private:
static void timeout_callback(void* context);
};
};

View File

@@ -12,4 +12,4 @@ private:
uint32_t submenu_item_selected = 0;
static const uint8_t keys_count = static_cast<uint8_t>(LfrfidKeyType::KeyI40134);
string_t submenu_name[keys_count + 1];
};
};

View File

@@ -3,7 +3,7 @@
#include "../view/elements/icon_element.h"
#include "../view/elements/string_element.h"
void LfRfidAppSceneSavedInfo::on_enter(LfRfidApp* app, bool need_restore) {
void LfRfidAppSceneSavedInfo::on_enter(LfRfidApp* app, bool /* need_restore */) {
string_init(string_data);
string_init(string_decrypted);
@@ -59,10 +59,8 @@ void LfRfidAppSceneSavedInfo::on_enter(LfRfidApp* app, bool need_restore) {
app->view_controller.switch_to<ContainerVM>();
}
bool LfRfidAppSceneSavedInfo::on_event(LfRfidApp* app, LfRfidApp::Event* event) {
bool consumed = false;
return consumed;
bool LfRfidAppSceneSavedInfo::on_event(LfRfidApp* /* app */, LfRfidApp::Event* /* event */) {
return false;
}
void LfRfidAppSceneSavedInfo::on_exit(LfRfidApp* app) {

View File

@@ -12,4 +12,4 @@ private:
string_t string_data;
string_t string_decrypted;
};
};

View File

@@ -10,4 +10,4 @@ public:
private:
static void submenu_callback(void* context, uint32_t index);
uint32_t submenu_item_selected = 0;
};
};

View File

@@ -8,11 +8,9 @@ void LfRfidAppSceneSelectKey::on_enter(LfRfidApp* app, bool need_restore) {
}
}
bool LfRfidAppSceneSelectKey::on_event(LfRfidApp* app, LfRfidApp::Event* event) {
bool consumed = false;
return consumed;
bool LfRfidAppSceneSelectKey::on_event(LfRfidApp* /* app */, LfRfidApp::Event* /* event */) {
return false;
}
void LfRfidAppSceneSelectKey::on_exit(LfRfidApp* app) {
}
void LfRfidAppSceneSelectKey::on_exit(LfRfidApp* /* app */) {
}

View File

@@ -6,4 +6,4 @@ public:
void on_enter(LfRfidApp* app, bool need_restore) final;
bool on_event(LfRfidApp* app, LfRfidApp::Event* event) final;
void on_exit(LfRfidApp* app) final;
};
};

View File

@@ -10,4 +10,4 @@ public:
private:
static void submenu_callback(void* context, uint32_t index);
uint32_t submenu_item_selected = 0;
};
};

View File

@@ -1,6 +1,6 @@
#include "lfrfid_app_scene_write.h"
void LfRfidAppSceneWrite::on_enter(LfRfidApp* app, bool need_restore) {
void LfRfidAppSceneWrite::on_enter(LfRfidApp* app, bool /* need_restore */) {
card_not_supported = false;
string_init(data_string);

View File

@@ -10,4 +10,4 @@ public:
private:
string_t data_string;
bool card_not_supported;
};
};

View File

@@ -1,6 +1,6 @@
#include "lfrfid_app_scene_write_success.h"
void LfRfidAppSceneWriteSuccess::on_enter(LfRfidApp* app, bool need_restore) {
void LfRfidAppSceneWriteSuccess::on_enter(LfRfidApp* app, bool /* need_restore */) {
auto popup = app->view_controller.get<PopupVM>();
popup->set_header("Successfully\nwritten!", 94, 3, AlignCenter, AlignTop);
popup->set_icon(0, 6, &I_RFIDDolphinSuccess_108x57);

View File

@@ -9,4 +9,4 @@ public:
private:
static void timeout_callback(void* context);
};
};