[FL-2520] FW build with -Wextra (#1185)

* Fixing compiler warnings with -Wextra
* More warnings suppression, WIP
* Even more warning fixes
* Added new lines at end of text files.
* Padding fix
* Additional fixes to warnings on different build configurations; added -Wextra to default build pipeline
* Fixes for Secplus v1
* -additional warnings
* +-Wredundant-decls fixes
* FuriHal: print stack overflow task name in console
* FuriHal: add missing include

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
This commit is contained in:
hedger
2022-05-06 16:37:10 +03:00
committed by GitHub
parent 1ca98170d9
commit 4d6b170769
461 changed files with 940 additions and 519 deletions

View File

@@ -51,4 +51,4 @@ void encoder_cyfral_get_pulse(EncoderCyfral* cyfral, bool* polarity, uint32_t* l
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -51,4 +51,4 @@ void encoder_metakom_get_pulse(EncoderMetakom* metakom, bool* polarity, uint32_t
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -118,4 +118,4 @@ bool ibutton_key_dallas_crc_is_valid(iButtonKey* key) {
bool ibutton_key_dallas_is_1990_key(iButtonKey* key) {
return (key->data[0] == 0x01);
}
}

View File

@@ -142,4 +142,4 @@ bool ibutton_key_dallas_is_1990_key(iButtonKey* key);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -25,4 +25,4 @@
#define TM01_CMD_SWITCH_TO_CYFRAL 0xCA
#define TM01_CMD_SWITCH_TO_METAKOM 0xCB
#define DS1990_CMD_READ_ROM 0x33
#define DS1990_CMD_READ_ROM 0x33

View File

@@ -110,4 +110,4 @@ void ibutton_worker_stop(iButtonWorker* worker);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -27,9 +27,9 @@ typedef enum {
typedef struct {
const uint32_t quant;
const void (*start)(iButtonWorker* worker);
const void (*tick)(iButtonWorker* worker);
const void (*stop)(iButtonWorker* worker);
void (*const start) (iButtonWorker* worker);
void (*const tick) (iButtonWorker* worker);
void (*const stop) (iButtonWorker* worker);
} iButtonWorkerModeType;
typedef enum {
@@ -76,4 +76,4 @@ void ibutton_worker_switch_mode(iButtonWorker* worker, iButtonWorkerMode mode);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -49,12 +49,15 @@ const iButtonWorkerModeType ibutton_worker_modes[] = {
/*********************** IDLE ***********************/
void ibutton_worker_mode_idle_start(iButtonWorker* worker) {
UNUSED(worker);
}
void ibutton_worker_mode_idle_tick(iButtonWorker* worker) {
UNUSED(worker);
}
void ibutton_worker_mode_idle_stop(iButtonWorker* worker) {
UNUSED(worker);
}
/*********************** READ ***********************/
@@ -151,6 +154,7 @@ bool ibutton_worker_read_dallas(iButtonWorker* worker) {
}
void ibutton_worker_mode_read_start(iButtonWorker* worker) {
UNUSED(worker);
furi_hal_power_enable_otg();
}
@@ -172,6 +176,7 @@ void ibutton_worker_mode_read_tick(iButtonWorker* worker) {
}
void ibutton_worker_mode_read_stop(iButtonWorker* worker) {
UNUSED(worker);
furi_hal_power_disable_otg();
}
@@ -251,6 +256,7 @@ void ibutton_worker_emulate_timer_start(iButtonWorker* worker) {
}
void ibutton_worker_emulate_timer_stop(iButtonWorker* worker) {
UNUSED(worker);
furi_hal_ibutton_emulate_stop();
}
@@ -272,6 +278,7 @@ void ibutton_worker_mode_emulate_start(iButtonWorker* worker) {
}
void ibutton_worker_mode_emulate_tick(iButtonWorker* worker) {
UNUSED(worker);
}
void ibutton_worker_mode_emulate_stop(iButtonWorker* worker) {
@@ -327,4 +334,4 @@ void ibutton_worker_mode_write_tick(iButtonWorker* worker) {
void ibutton_worker_mode_write_stop(iButtonWorker* worker) {
furi_hal_power_disable_otg();
onewire_host_stop(worker->host);
}
}

View File

@@ -57,4 +57,4 @@ void ibutton_writer_stop(iButtonWriter* writer);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -35,4 +35,4 @@ PulseProtocol* protocol_cyfral_get_protocol(ProtocolCyfral* cyfral);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -35,4 +35,4 @@ PulseProtocol* protocol_metakom_get_protocol(ProtocolMetakom* metakom);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -13,4 +13,4 @@ uint8_t maxim_crc8(const uint8_t* data, const uint8_t data_size, const uint8_t c
}
}
return crc;
}
}

View File

@@ -11,4 +11,4 @@ uint8_t maxim_crc8(const uint8_t* data, const uint8_t data_size, const uint8_t c
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -71,4 +71,4 @@ uint8_t* onewire_device_get_id_p(OneWireDevice* device);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -23,6 +23,7 @@ void onewire_host_free(OneWireHost* host) {
}
bool onewire_host_reset(OneWireHost* host) {
UNUSED(host);
uint8_t r;
uint8_t retries = 125;
@@ -52,6 +53,7 @@ bool onewire_host_reset(OneWireHost* host) {
}
bool onewire_host_read_bit(OneWireHost* host) {
UNUSED(host);
bool result;
// drive low
@@ -88,6 +90,7 @@ void onewire_host_read_bytes(OneWireHost* host, uint8_t* buffer, uint16_t count)
}
void onewire_host_write_bit(OneWireHost* host, bool value) {
UNUSED(host);
if(value) {
// drive low
furi_hal_ibutton_pin_low();
@@ -120,10 +123,12 @@ void onewire_host_skip(OneWireHost* host) {
}
void onewire_host_start(OneWireHost* host) {
UNUSED(host);
furi_hal_ibutton_start_drive();
}
void onewire_host_stop(OneWireHost* host) {
UNUSED(host);
furi_hal_ibutton_stop();
}

View File

@@ -118,4 +118,4 @@ uint8_t onewire_host_search(OneWireHost* host, uint8_t* newAddr, OneWireHostSear
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -37,6 +37,7 @@ struct OneWireSlave {
/*********************** PRIVATE ***********************/
uint32_t onewire_slave_wait_while_gpio_is(OneWireSlave* bus, uint32_t time, const bool pin_value) {
UNUSED(bus);
uint32_t start = DWT->CYCCNT;
uint32_t time_ticks = time * furi_hal_delay_instructions_per_microsecond();
uint32_t time_captured;
@@ -253,6 +254,7 @@ void onewire_slave_start(OneWireSlave* bus) {
}
void onewire_slave_stop(OneWireSlave* bus) {
UNUSED(bus);
furi_hal_ibutton_stop();
furi_hal_ibutton_remove_interrupt();
}

View File

@@ -67,4 +67,4 @@ void pulse_decoder_get_data(PulseDecoder* decoder, int32_t index, uint8_t* data,
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -23,4 +23,4 @@ void pulse_glue_pop(PulseGlue* pulse_glue, uint32_t* length, uint32_t* period);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -64,4 +64,4 @@ void pulse_protocol_get_data(PulseProtocol* protocol, uint8_t* data, size_t leng
if(protocol->get_data_cb != NULL) {
protocol->get_data_cb(protocol->context, data, length);
}
}
}

View File

@@ -119,4 +119,4 @@ void pulse_protocol_reset(PulseProtocol* protocol);
#ifdef __cplusplus
}
#endif
#endif