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

@@ -407,7 +407,7 @@ void subghz_view_receiver_exit(void* context) {
furi_timer_stop(subghz_receiver->timer);
}
SubGhzViewReceiver* subghz_view_receiver_alloc() {
SubGhzViewReceiver* subghz_view_receiver_alloc(void) {
SubGhzViewReceiver* subghz_receiver = malloc(sizeof(SubGhzViewReceiver));
// View allocation and configuration

View File

@@ -17,7 +17,7 @@ void subghz_view_receiver_set_callback(
SubGhzViewReceiverCallback callback,
void* context);
SubGhzViewReceiver* subghz_view_receiver_alloc();
SubGhzViewReceiver* subghz_view_receiver_alloc(void);
void subghz_view_receiver_free(SubGhzViewReceiver* subghz_receiver);

View File

@@ -433,7 +433,7 @@ void subghz_frequency_analyzer_exit(void* context) {
true);
}
SubGhzFrequencyAnalyzer* subghz_frequency_analyzer_alloc() {
SubGhzFrequencyAnalyzer* subghz_frequency_analyzer_alloc(void) {
SubGhzFrequencyAnalyzer* instance = malloc(sizeof(SubGhzFrequencyAnalyzer));
// View allocation and configuration

View File

@@ -12,7 +12,7 @@ void subghz_frequency_analyzer_set_callback(
SubGhzFrequencyAnalyzerCallback callback,
void* context);
SubGhzFrequencyAnalyzer* subghz_frequency_analyzer_alloc();
SubGhzFrequencyAnalyzer* subghz_frequency_analyzer_alloc(void);
void subghz_frequency_analyzer_free(SubGhzFrequencyAnalyzer* subghz_static);

View File

@@ -587,7 +587,7 @@ void subghz_read_raw_exit(void* context) {
true);
}
SubGhzReadRAW* subghz_read_raw_alloc() {
SubGhzReadRAW* subghz_read_raw_alloc(void) {
SubGhzReadRAW* instance = malloc(sizeof(SubGhzReadRAW));
// View allocation and configuration

View File

@@ -28,7 +28,7 @@ void subghz_read_raw_set_callback(
SubGhzReadRAWCallback callback,
void* context);
SubGhzReadRAW* subghz_read_raw_alloc();
SubGhzReadRAW* subghz_read_raw_alloc(void);
void subghz_read_raw_free(SubGhzReadRAW* subghz_static);

View File

@@ -201,7 +201,7 @@ void subghz_view_transmitter_exit(void* context) {
furi_assert(context);
}
SubGhzViewTransmitter* subghz_view_transmitter_alloc() {
SubGhzViewTransmitter* subghz_view_transmitter_alloc(void) {
SubGhzViewTransmitter* subghz_transmitter = malloc(sizeof(SubGhzViewTransmitter));
// View allocation and configuration

View File

@@ -26,7 +26,7 @@ void subghz_view_transmitter_set_model_type(
SubGhzViewTransmitter* subghz_transmitter,
SubGhzViewTransmitterModelType model_type);
SubGhzViewTransmitter* subghz_view_transmitter_alloc();
SubGhzViewTransmitter* subghz_view_transmitter_alloc(void);
void subghz_view_transmitter_free(SubGhzViewTransmitter* subghz_transmitter);