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

@@ -108,7 +108,7 @@ static int u2f_uecc_random_cb(void* context, uint8_t* dest, unsigned size) {
return 0;
}
U2fData* u2f_alloc() {
U2fData* u2f_alloc(void) {
return malloc(sizeof(U2fData));
}

View File

@@ -20,7 +20,7 @@ typedef struct U2fData U2fData;
typedef void (*U2fEvtCallback)(U2fNotifyEvent evt, void* context);
U2fData* u2f_alloc();
U2fData* u2f_alloc(void);
bool u2f_init(U2fData* instance);

View File

@@ -21,7 +21,7 @@ static void u2f_app_tick_event_callback(void* context) {
scene_manager_handle_tick_event(app->scene_manager);
}
U2fApp* u2f_app_alloc() {
U2fApp* u2f_app_alloc(void) {
U2fApp* app = malloc(sizeof(U2fApp));
app->gui = furi_record_open(RECORD_GUI);

View File

@@ -67,7 +67,7 @@ bool u2f_data_check(bool cert_only) {
return state;
}
bool u2f_data_cert_check() {
bool u2f_data_cert_check(void) {
bool state = false;
Storage* fs_api = furi_record_open(RECORD_STORAGE);
File* file = storage_file_alloc(fs_api);

View File

@@ -8,7 +8,7 @@ extern "C" {
bool u2f_data_check(bool cert_only);
bool u2f_data_cert_check();
bool u2f_data_cert_check(void);
uint32_t u2f_data_cert_load(uint8_t* cert);

View File

@@ -59,7 +59,7 @@ static bool u2f_view_input_callback(InputEvent* event, void* context) {
return consumed;
}
U2fView* u2f_view_alloc() {
U2fView* u2f_view_alloc(void) {
U2fView* u2f = malloc(sizeof(U2fView));
u2f->view = view_alloc();

View File

@@ -14,7 +14,7 @@ typedef enum {
U2fMsgError,
} U2fViewMsg;
U2fView* u2f_view_alloc();
U2fView* u2f_view_alloc(void);
void u2f_view_free(U2fView* u2f);