[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

@@ -7,4 +7,4 @@ extern "C" int32_t ibutton_app(void* p) {
delete app;
return 255;
}
}

View File

@@ -141,4 +141,4 @@ private:
bool load_key_data(string_t key_path);
void make_app_folder();
};
};

View File

@@ -240,6 +240,7 @@ void ibutton_cli_emulate(Cli* cli, string_t args) {
};
static void ibutton_cli(Cli* cli, string_t args, void* context) {
UNUSED(context);
string_t cmd;
string_init(cmd);
@@ -268,6 +269,7 @@ void onewire_cli_print_usage() {
};
static void onewire_cli_search(Cli* cli) {
UNUSED(cli);
OneWireHost* onewire = onewire_host_alloc();
uint8_t address[8];
bool done = false;
@@ -297,6 +299,7 @@ static void onewire_cli_search(Cli* cli) {
}
void onewire_cli(Cli* cli, string_t args, void* context) {
UNUSED(context);
string_t cmd;
string_init(cmd);
@@ -311,4 +314,4 @@ void onewire_cli(Cli* cli, string_t args, void* context) {
}
string_clear(cmd);
}
}

View File

@@ -24,6 +24,7 @@ public:
// payload
union {
uint32_t dummy;
uint32_t menu_index;
DialogExResult dialog_result;
GuiButtonType widget_button_result;

View File

@@ -129,7 +129,7 @@ void iButtonAppViewManager::send_event(iButtonEvent* event) {
furi_check(result == osOK);
}
uint32_t iButtonAppViewManager::previous_view_callback(void* context) {
uint32_t iButtonAppViewManager::previous_view_callback(void*) {
if(event_queue != NULL) {
iButtonEvent event;
event.type = iButtonEvent::Type::EventTypeBack;
@@ -137,4 +137,4 @@ uint32_t iButtonAppViewManager::previous_view_callback(void* context) {
}
return VIEW_IGNORE;
}
}

View File

@@ -48,4 +48,4 @@ private:
Gui* gui;
uint32_t previous_view_callback(void* context);
};
};

View File

@@ -9,4 +9,4 @@ public:
private:
uint32_t submenu_item_selected = 0;
};
};

View File

@@ -50,4 +50,4 @@ void iButtonSceneAddValue::on_exit(iButtonApp* app) {
byte_input_set_result_callback(byte_input, NULL, NULL, NULL, NULL, 0);
byte_input_set_header_text(byte_input, {0});
}
}

View File

@@ -10,4 +10,4 @@ public:
private:
uint8_t new_key_data[IBUTTON_KEY_DATA_SIZE] = {};
};
};

View File

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

View File

@@ -44,4 +44,4 @@ void iButtonSceneDeleteSuccess::on_exit(iButtonApp* app) {
popup_disable_timeout(popup);
popup_set_context(popup, NULL);
popup_set_callback(popup, NULL);
}
}

View File

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

View File

@@ -6,7 +6,10 @@ static void emulate_callback(void* context, bool emulated) {
furi_assert(context);
if(emulated) {
iButtonApp* app = static_cast<iButtonApp*>(context);
iButtonEvent event = {.type = iButtonEvent::Type::EventTypeWorkerEmulated};
iButtonEvent event = {
.payload = {.worker_write_result = iButtonWorkerWriteOK},
.type = iButtonEvent::Type::EventTypeWorkerEmulated,
};
app->get_view_manager()->send_event(&event);
}
}

View File

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

View File

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

View File

@@ -44,9 +44,8 @@ void iButtonSceneInfo::on_enter(iButtonApp* app) {
view_manager->switch_to(iButtonAppViewManager::Type::iButtonAppViewWidget);
}
bool iButtonSceneInfo::on_event(iButtonApp* app, iButtonEvent* event) {
bool consumed = false;
return consumed;
bool iButtonSceneInfo::on_event(iButtonApp*, iButtonEvent*) {
return false;
}
void iButtonSceneInfo::on_exit(iButtonApp* app) {

View File

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

View File

@@ -5,7 +5,10 @@
static void read_callback(void* context) {
furi_assert(context);
iButtonApp* app = static_cast<iButtonApp*>(context);
iButtonEvent event = {.type = iButtonEvent::Type::EventTypeWorkerRead};
iButtonEvent event = {
.payload = {.dummy = 0},
.type = iButtonEvent::Type::EventTypeWorkerRead,
};
app->get_view_manager()->send_event(&event);
}

View File

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

View File

@@ -71,4 +71,4 @@ void iButtonSceneReadCRCError::on_exit(iButtonApp* app) {
dialog_ex_set_context(dialog_ex, NULL);
app->notify_red_off();
}
}

View File

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

View File

@@ -9,4 +9,4 @@ public:
private:
uint32_t submenu_item_selected = 0;
};
};

View File

@@ -71,4 +71,4 @@ void iButtonSceneReadNotKeyError::on_exit(iButtonApp* app) {
dialog_ex_set_context(dialog_ex, NULL);
app->notify_red_off();
}
}

View File

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

View File

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

View File

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

View File

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

View File

@@ -49,4 +49,4 @@ void iButtonSceneSaveSuccess::on_exit(iButtonApp* app) {
popup_disable_timeout(popup);
popup_set_context(popup, NULL);
popup_set_callback(popup, NULL);
}
}

View File

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

View File

@@ -9,4 +9,4 @@ public:
private:
uint32_t submenu_item_selected = 0;
};
};

View File

@@ -10,9 +10,9 @@ void iButtonSceneSelectKey::on_enter(iButtonApp* app) {
}
}
bool iButtonSceneSelectKey::on_event(iButtonApp* app, iButtonEvent* event) {
bool iButtonSceneSelectKey::on_event(iButtonApp*, iButtonEvent*) {
return false;
}
void iButtonSceneSelectKey::on_exit(iButtonApp* app) {
void iButtonSceneSelectKey::on_exit(iButtonApp*) {
}

View File

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

View File

@@ -9,4 +9,4 @@ public:
private:
uint32_t submenu_item_selected = 0;
};
};

View File

@@ -108,4 +108,4 @@ void iButtonSceneWrite::on_exit(iButtonApp* app) {
popup_set_header(popup, NULL, 0, 0, AlignCenter, AlignBottom);
popup_set_text(popup, NULL, 0, 0, AlignCenter, AlignTop);
popup_set_icon(popup, 0, 0, NULL);
}
}

View File

@@ -9,4 +9,4 @@ public:
private:
bool blink_yellow;
};
};

View File

@@ -49,4 +49,4 @@ void iButtonSceneWriteSuccess::on_exit(iButtonApp* app) {
popup_disable_timeout(popup);
popup_set_context(popup, NULL);
popup_set_callback(popup, NULL);
}
}

View File

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