[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:
@@ -7,4 +7,4 @@ extern "C" int32_t ibutton_app(void* p) {
|
||||
delete app;
|
||||
|
||||
return 255;
|
||||
}
|
||||
}
|
||||
|
@@ -141,4 +141,4 @@ private:
|
||||
|
||||
bool load_key_data(string_t key_path);
|
||||
void make_app_folder();
|
||||
};
|
||||
};
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
||||
|
@@ -24,6 +24,7 @@ public:
|
||||
|
||||
// payload
|
||||
union {
|
||||
uint32_t dummy;
|
||||
uint32_t menu_index;
|
||||
DialogExResult dialog_result;
|
||||
GuiButtonType widget_button_result;
|
||||
|
@@ -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;
|
||||
}
|
||||
}
|
||||
|
@@ -48,4 +48,4 @@ private:
|
||||
Gui* gui;
|
||||
|
||||
uint32_t previous_view_callback(void* context);
|
||||
};
|
||||
};
|
||||
|
@@ -9,4 +9,4 @@ public:
|
||||
|
||||
private:
|
||||
uint32_t submenu_item_selected = 0;
|
||||
};
|
||||
};
|
||||
|
@@ -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});
|
||||
}
|
||||
}
|
||||
|
@@ -10,4 +10,4 @@ public:
|
||||
|
||||
private:
|
||||
uint8_t new_key_data[IBUTTON_KEY_DATA_SIZE] = {};
|
||||
};
|
||||
};
|
||||
|
@@ -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;
|
||||
};
|
||||
};
|
||||
|
@@ -44,4 +44,4 @@ void iButtonSceneDeleteSuccess::on_exit(iButtonApp* app) {
|
||||
popup_disable_timeout(popup);
|
||||
popup_set_context(popup, NULL);
|
||||
popup_set_callback(popup, NULL);
|
||||
}
|
||||
}
|
||||
|
@@ -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;
|
||||
};
|
||||
};
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
||||
|
@@ -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;
|
||||
};
|
||||
};
|
||||
|
@@ -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;
|
||||
};
|
||||
};
|
||||
|
@@ -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) {
|
||||
|
@@ -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;
|
||||
};
|
||||
};
|
||||
|
@@ -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);
|
||||
}
|
||||
|
||||
|
@@ -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;
|
||||
};
|
||||
};
|
||||
|
@@ -71,4 +71,4 @@ void iButtonSceneReadCRCError::on_exit(iButtonApp* app) {
|
||||
dialog_ex_set_context(dialog_ex, NULL);
|
||||
|
||||
app->notify_red_off();
|
||||
}
|
||||
}
|
||||
|
@@ -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;
|
||||
};
|
||||
};
|
||||
|
@@ -9,4 +9,4 @@ public:
|
||||
|
||||
private:
|
||||
uint32_t submenu_item_selected = 0;
|
||||
};
|
||||
};
|
||||
|
@@ -71,4 +71,4 @@ void iButtonSceneReadNotKeyError::on_exit(iButtonApp* app) {
|
||||
dialog_ex_set_context(dialog_ex, NULL);
|
||||
|
||||
app->notify_red_off();
|
||||
}
|
||||
}
|
||||
|
@@ -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;
|
||||
};
|
||||
};
|
||||
|
@@ -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;
|
||||
};
|
||||
};
|
||||
|
@@ -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;
|
||||
};
|
||||
};
|
||||
|
@@ -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;
|
||||
};
|
||||
};
|
||||
|
@@ -49,4 +49,4 @@ void iButtonSceneSaveSuccess::on_exit(iButtonApp* app) {
|
||||
popup_disable_timeout(popup);
|
||||
popup_set_context(popup, NULL);
|
||||
popup_set_callback(popup, NULL);
|
||||
}
|
||||
}
|
||||
|
@@ -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;
|
||||
};
|
||||
};
|
||||
|
@@ -9,4 +9,4 @@ public:
|
||||
|
||||
private:
|
||||
uint32_t submenu_item_selected = 0;
|
||||
};
|
||||
};
|
||||
|
@@ -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*) {
|
||||
}
|
||||
|
@@ -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;
|
||||
};
|
||||
};
|
||||
|
@@ -9,4 +9,4 @@ public:
|
||||
|
||||
private:
|
||||
uint32_t submenu_item_selected = 0;
|
||||
};
|
||||
};
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
||||
|
@@ -9,4 +9,4 @@ public:
|
||||
|
||||
private:
|
||||
bool blink_yellow;
|
||||
};
|
||||
};
|
||||
|
@@ -49,4 +49,4 @@ void iButtonSceneWriteSuccess::on_exit(iButtonApp* app) {
|
||||
popup_disable_timeout(popup);
|
||||
popup_set_context(popup, NULL);
|
||||
popup_set_callback(popup, NULL);
|
||||
}
|
||||
}
|
||||
|
@@ -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;
|
||||
};
|
||||
};
|
||||
|
Reference in New Issue
Block a user