1
mirror of https://github.com/DarkFlippers/unleashed-firmware.git synced 2025-12-12 04:34:43 +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

@@ -22,7 +22,7 @@ void dolphin_deed(DolphinDeed deed) {
}
DolphinStats dolphin_stats(Dolphin* dolphin) {
furi_assert(dolphin);
furi_check(dolphin);
DolphinStats stats;
DolphinEvent event;
@@ -36,7 +36,7 @@ DolphinStats dolphin_stats(Dolphin* dolphin) {
}
void dolphin_flush(Dolphin* dolphin) {
furi_assert(dolphin);
furi_check(dolphin);
DolphinEvent event;
event.type = DolphinEventTypeFlush;
@@ -73,7 +73,7 @@ void dolphin_clear_limits_timer_callback(void* context) {
dolphin_event_send_async(dolphin, &event);
}
Dolphin* dolphin_alloc() {
Dolphin* dolphin_alloc(void) {
Dolphin* dolphin = malloc(sizeof(Dolphin));
dolphin->state = dolphin_state_alloc();
@@ -119,6 +119,7 @@ void dolphin_event_release(Dolphin* dolphin, DolphinEvent* event) {
}
FuriPubSub* dolphin_get_pubsub(Dolphin* dolphin) {
furi_check(dolphin);
return dolphin->pubsub;
}
@@ -201,6 +202,8 @@ int32_t dolphin_srv(void* p) {
}
void dolphin_upgrade_level(Dolphin* dolphin) {
furi_check(dolphin);
dolphin_state_increase_level(dolphin->state);
dolphin_flush(dolphin);
}