[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:
		| @@ -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); | ||||
|   | ||||
| @@ -14,4 +14,4 @@ private: | ||||
|     string_t string_header; | ||||
|     string_t string_data; | ||||
|     string_t string_decrypted; | ||||
| }; | ||||
| }; | ||||
|   | ||||
| @@ -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); | ||||
| } | ||||
| } | ||||
|   | ||||
| @@ -9,4 +9,4 @@ public: | ||||
|  | ||||
| private: | ||||
|     static void timeout_callback(void* context); | ||||
| }; | ||||
| }; | ||||
|   | ||||
| @@ -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); | ||||
|   | ||||
| @@ -9,4 +9,4 @@ public: | ||||
|  | ||||
| private: | ||||
|     string_t data_string; | ||||
| }; | ||||
| }; | ||||
|   | ||||
| @@ -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>(); | ||||
|   | ||||
| @@ -10,4 +10,4 @@ public: | ||||
| private: | ||||
|     static void exit_callback(void* context); | ||||
|     static void stay_callback(void* context); | ||||
| }; | ||||
| }; | ||||
|   | ||||
| @@ -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); | ||||
|   | ||||
| @@ -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; | ||||
| }; | ||||
| }; | ||||
|   | ||||
| @@ -10,4 +10,4 @@ public: | ||||
| private: | ||||
|     static void submenu_callback(void* context, uint32_t index); | ||||
|     uint32_t submenu_item_selected = 0; | ||||
| }; | ||||
| }; | ||||
|   | ||||
| @@ -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]); | ||||
|   | ||||
| @@ -12,4 +12,4 @@ private: | ||||
|     static void more_callback(void* context); | ||||
|  | ||||
|     string_t string[3]; | ||||
| }; | ||||
| }; | ||||
|   | ||||
| @@ -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>(); | ||||
|   | ||||
| @@ -10,4 +10,4 @@ public: | ||||
| private: | ||||
|     static void exit_callback(void* context); | ||||
|     static void stay_callback(void* context); | ||||
| }; | ||||
| }; | ||||
|   | ||||
| @@ -30,4 +30,4 @@ private: | ||||
|         0xBB, | ||||
|         0xBB, | ||||
|     }; | ||||
| }; | ||||
| }; | ||||
|   | ||||
| @@ -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, ""); | ||||
|   | ||||
| @@ -9,4 +9,4 @@ public: | ||||
|  | ||||
| private: | ||||
|     static void save_callback(void* context); | ||||
| }; | ||||
| }; | ||||
|   | ||||
| @@ -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); | ||||
|   | ||||
| @@ -9,4 +9,4 @@ public: | ||||
|  | ||||
| private: | ||||
|     static void timeout_callback(void* context); | ||||
| }; | ||||
| }; | ||||
|   | ||||
| @@ -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]; | ||||
| }; | ||||
| }; | ||||
|   | ||||
| @@ -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) { | ||||
|   | ||||
| @@ -12,4 +12,4 @@ private: | ||||
|  | ||||
|     string_t string_data; | ||||
|     string_t string_decrypted; | ||||
| }; | ||||
| }; | ||||
|   | ||||
| @@ -10,4 +10,4 @@ public: | ||||
| private: | ||||
|     static void submenu_callback(void* context, uint32_t index); | ||||
|     uint32_t submenu_item_selected = 0; | ||||
| }; | ||||
| }; | ||||
|   | ||||
| @@ -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 */) { | ||||
| } | ||||
|   | ||||
| @@ -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; | ||||
| }; | ||||
| }; | ||||
|   | ||||
| @@ -10,4 +10,4 @@ public: | ||||
| private: | ||||
|     static void submenu_callback(void* context, uint32_t index); | ||||
|     uint32_t submenu_item_selected = 0; | ||||
| }; | ||||
| }; | ||||
|   | ||||
| @@ -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); | ||||
|  | ||||
|   | ||||
| @@ -10,4 +10,4 @@ public: | ||||
| private: | ||||
|     string_t data_string; | ||||
|     bool card_not_supported; | ||||
| }; | ||||
| }; | ||||
|   | ||||
| @@ -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); | ||||
|   | ||||
| @@ -9,4 +9,4 @@ public: | ||||
|  | ||||
| private: | ||||
|     static void timeout_callback(void* context); | ||||
| }; | ||||
| }; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user