Code cleanup: srand, PVS warnings (#1974)

* Remove srand invocation

* PVS High priority fixes

* PVS High errors part 2

* Furi: heap tracing inheritance

* Furi add __builtin_unreachable to furi_thread_catch
This commit is contained in:
あく
2022-11-06 00:07:24 +09:00
committed by GitHub
parent 04e50c9f89
commit e8913f2e33
37 changed files with 76 additions and 85 deletions

View File

@@ -45,7 +45,7 @@ FuriStatus furi_semaphore_acquire(FuriSemaphore* instance, uint32_t timeout) {
stat = FuriStatusOk;
if(FURI_IS_IRQ_MODE() != 0U) {
if(FURI_IS_IRQ_MODE()) {
if(timeout != 0U) {
stat = FuriStatusErrorParameter;
} else {
@@ -80,7 +80,7 @@ FuriStatus furi_semaphore_release(FuriSemaphore* instance) {
stat = FuriStatusOk;
if(FURI_IS_IRQ_MODE() != 0U) {
if(FURI_IS_IRQ_MODE()) {
yield = pdFALSE;
if(xSemaphoreGiveFromISR(hSemaphore, &yield) != pdTRUE) {
@@ -104,7 +104,7 @@ uint32_t furi_semaphore_get_count(FuriSemaphore* instance) {
SemaphoreHandle_t hSemaphore = (SemaphoreHandle_t)instance;
uint32_t count;
if(FURI_IS_IRQ_MODE() != 0U) {
if(FURI_IS_IRQ_MODE()) {
count = (uint32_t)uxSemaphoreGetCountFromISR(hSemaphore);
} else {
count = (uint32_t)uxSemaphoreGetCount(hSemaphore);