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
+11 -11
View File
@@ -10,7 +10,7 @@
#include CMSIS_device_header
bool furi_kernel_is_irq_or_masked() {
bool furi_kernel_is_irq_or_masked(void) {
bool irq = false;
BaseType_t state;
@@ -34,12 +34,12 @@ bool furi_kernel_is_irq_or_masked() {
return (irq);
}
bool furi_kernel_is_running() {
bool furi_kernel_is_running(void) {
return xTaskGetSchedulerState() != taskSCHEDULER_RUNNING;
}
int32_t furi_kernel_lock() {
furi_assert(!furi_kernel_is_irq_or_masked());
int32_t furi_kernel_lock(void) {
furi_check(!furi_kernel_is_irq_or_masked());
int32_t lock;
@@ -63,8 +63,8 @@ int32_t furi_kernel_lock() {
return (lock);
}
int32_t furi_kernel_unlock() {
furi_assert(!furi_kernel_is_irq_or_masked());
int32_t furi_kernel_unlock(void) {
furi_check(!furi_kernel_is_irq_or_masked());
int32_t lock;
@@ -94,7 +94,7 @@ int32_t furi_kernel_unlock() {
}
int32_t furi_kernel_restore_lock(int32_t lock) {
furi_assert(!furi_kernel_is_irq_or_masked());
furi_check(!furi_kernel_is_irq_or_masked());
switch(xTaskGetSchedulerState()) {
case taskSCHEDULER_SUSPENDED:
@@ -124,13 +124,13 @@ int32_t furi_kernel_restore_lock(int32_t lock) {
return (lock);
}
uint32_t furi_kernel_get_tick_frequency() {
uint32_t furi_kernel_get_tick_frequency(void) {
/* Return frequency in hertz */
return (configTICK_RATE_HZ_RAW);
}
void furi_delay_tick(uint32_t ticks) {
furi_assert(!furi_kernel_is_irq_or_masked());
furi_check(!furi_kernel_is_irq_or_masked());
if(ticks == 0U) {
taskYIELD();
} else {
@@ -139,7 +139,7 @@ void furi_delay_tick(uint32_t ticks) {
}
FuriStatus furi_delay_until_tick(uint32_t tick) {
furi_assert(!furi_kernel_is_irq_or_masked());
furi_check(!furi_kernel_is_irq_or_masked());
TickType_t tcnt, delay;
FuriStatus stat;
@@ -165,7 +165,7 @@ FuriStatus furi_delay_until_tick(uint32_t tick) {
return (stat);
}
uint32_t furi_get_tick() {
uint32_t furi_get_tick(void) {
TickType_t ticks;
if(furi_kernel_is_irq_or_masked() != 0U) {