mirror of
https://github.com/flipperdevices/flipperzero-firmware.git
synced 2025-12-12 04:41:26 +04:00
cleanup of various warnings from clangd (#3682)
* cleanup of various warnings from clangs * lfrfid_debug: cast fixes * subghz: binraw: round->roundf * furi: thread: updated internal stack size variable to size_t * github: fail faster on unsuccessful build * unit_tests: double trouble
This commit is contained in:
@@ -8,8 +8,6 @@
|
||||
#include <FreeRTOS.h>
|
||||
#include <task.h>
|
||||
|
||||
#include CMSIS_device_header
|
||||
|
||||
bool furi_kernel_is_irq_or_masked(void) {
|
||||
bool irq = false;
|
||||
BaseType_t state;
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#include "memmgr.h"
|
||||
#include "common_defines.h"
|
||||
#include <string.h>
|
||||
#include <furi_hal_memory.h>
|
||||
|
||||
|
||||
@@ -120,7 +120,7 @@ FuriThreadId furi_mutex_get_owner(FuriMutex* instance) {
|
||||
|
||||
hMutex = (SemaphoreHandle_t)((uint32_t)instance & ~1U);
|
||||
|
||||
if((hMutex == NULL)) {
|
||||
if(hMutex == NULL) {
|
||||
owner = 0;
|
||||
} else if(FURI_IS_IRQ_MODE()) {
|
||||
owner = (FuriThreadId)xSemaphoreGetMutexHolderFromISR(hMutex);
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#include "pubsub.h"
|
||||
#include "memmgr.h"
|
||||
#include "check.h"
|
||||
#include "mutex.h"
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#include "record.h"
|
||||
#include "check.h"
|
||||
#include "memmgr.h"
|
||||
#include "mutex.h"
|
||||
#include "event_flag.h"
|
||||
|
||||
|
||||
@@ -15,7 +15,9 @@
|
||||
|
||||
#define TAG "FuriThread"
|
||||
|
||||
#define THREAD_NOTIFY_INDEX 1 // Index 0 is used for stream buffers
|
||||
#define THREAD_NOTIFY_INDEX (1) // Index 0 is used for stream buffers
|
||||
|
||||
#define THREAD_MAX_STACK_SIZE (UINT16_MAX * sizeof(StackType_t))
|
||||
|
||||
typedef struct FuriThreadStdout FuriThreadStdout;
|
||||
|
||||
@@ -49,7 +51,7 @@ struct FuriThread {
|
||||
bool is_service;
|
||||
bool heap_trace_enabled;
|
||||
|
||||
configSTACK_DEPTH_TYPE stack_size;
|
||||
size_t stack_size;
|
||||
};
|
||||
|
||||
static size_t __furi_thread_stdout_write(FuriThread* thread, const char* data, size_t size);
|
||||
@@ -203,6 +205,7 @@ void furi_thread_set_stack_size(FuriThread* thread, size_t stack_size) {
|
||||
furi_check(thread);
|
||||
furi_check(thread->state == FuriThreadStateStopped);
|
||||
furi_check(stack_size % 4 == 0);
|
||||
furi_check(stack_size <= THREAD_MAX_STACK_SIZE);
|
||||
thread->stack_size = stack_size;
|
||||
}
|
||||
|
||||
@@ -263,7 +266,7 @@ void furi_thread_start(FuriThread* thread) {
|
||||
furi_check(thread);
|
||||
furi_check(thread->callback);
|
||||
furi_check(thread->state == FuriThreadStateStopped);
|
||||
furi_check(thread->stack_size > 0 && thread->stack_size < (UINT16_MAX * sizeof(StackType_t)));
|
||||
furi_check(thread->stack_size > 0);
|
||||
|
||||
furi_thread_set_state(thread, FuriThreadStateStarting);
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#include "timer.h"
|
||||
#include "check.h"
|
||||
#include "memmgr.h"
|
||||
#include "kernel.h"
|
||||
|
||||
#include <FreeRTOS.h>
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#include "furi.h"
|
||||
#include <string.h>
|
||||
|
||||
#include <FreeRTOS.h>
|
||||
#include <queue.h>
|
||||
|
||||
Reference in New Issue
Block a user