1
mirror of https://github.com/DarkFlippers/unleashed-firmware.git synced 2025-12-13 05:06:30 +04:00

Api Symbols: replace asserts with checks (#3507)

* Api Symbols: replace asserts with checks
* Api Symbols: replace asserts with checks part 2
* Update no args function signatures with void, to help compiler to track incorrect usage
* More unavoidable void
* Update PVS config and code to make it happy
* Format sources
* nfc: fix checks
* dead code cleanup & include fixes

Co-authored-by: gornekich <n.gorbadey@gmail.com>
Co-authored-by: hedger <hedger@users.noreply.github.com>
Co-authored-by: hedger <hedger@nanode.su>
This commit is contained in:
あく
2024-03-19 23:43:52 +09:00
committed by GitHub
parent a09ec4d976
commit acc39a4bc0
571 changed files with 3565 additions and 2704 deletions

View File

@@ -101,12 +101,13 @@ DialogMessageButton dialogs_app_process_module_message(const DialogsAppMessageDa
return ret;
}
DialogMessage* dialog_message_alloc() {
DialogMessage* dialog_message_alloc(void) {
DialogMessage* message = malloc(sizeof(DialogMessage));
return message;
}
void dialog_message_free(DialogMessage* message) {
furi_check(message);
free(message);
}
@@ -117,6 +118,8 @@ void dialog_message_set_text(
uint8_t y,
Align horizontal,
Align vertical) {
furi_check(message);
message->dialog_text = text;
message->dialog_text_x = x;
message->dialog_text_y = y;
@@ -131,6 +134,8 @@ void dialog_message_set_header(
uint8_t y,
Align horizontal,
Align vertical) {
furi_check(message);
message->header_text = text;
message->header_text_x = x;
message->header_text_y = y;
@@ -139,6 +144,8 @@ void dialog_message_set_header(
}
void dialog_message_set_icon(DialogMessage* message, const Icon* icon, uint8_t x, uint8_t y) {
furi_check(message);
message->icon = icon;
message->icon_x = x;
message->icon_y = y;
@@ -149,6 +156,8 @@ void dialog_message_set_buttons(
const char* left,
const char* center,
const char* right) {
furi_check(message);
message->left_button_text = left;
message->center_button_text = center;
message->right_button_text = right;