[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:
@@ -2,7 +2,8 @@
|
||||
#include <furi.h>
|
||||
#include <furi_hal.h>
|
||||
|
||||
bool DecoderAnalyzer::read(uint8_t* _data, uint8_t _data_size) {
|
||||
// FIXME: unused args?
|
||||
bool DecoderAnalyzer::read(uint8_t* /* _data */, uint8_t /* _data_size */) {
|
||||
bool result = false;
|
||||
|
||||
if(ready) {
|
||||
@@ -21,6 +22,7 @@ bool DecoderAnalyzer::read(uint8_t* _data, uint8_t _data_size) {
|
||||
}
|
||||
|
||||
void DecoderAnalyzer::process_front(bool polarity, uint32_t time) {
|
||||
UNUSED(polarity);
|
||||
if(ready) return;
|
||||
|
||||
data[data_index] = time;
|
||||
|
@@ -2,7 +2,7 @@
|
||||
#include <furi.h>
|
||||
#include <furi_hal.h>
|
||||
|
||||
void DecoderGpioOut::process_front(bool polarity, uint32_t time) {
|
||||
void DecoderGpioOut::process_front(bool polarity, uint32_t /* time */) {
|
||||
furi_hal_gpio_write(&gpio_ext_pa7, polarity);
|
||||
}
|
||||
|
||||
|
@@ -21,4 +21,4 @@ private:
|
||||
|
||||
void reset_state();
|
||||
ProtocolHID10301 hid;
|
||||
};
|
||||
};
|
||||
|
@@ -73,4 +73,4 @@ void DecoderIndala::reset_state() {
|
||||
cursed_raw_data = 0;
|
||||
ready = false;
|
||||
cursed_data_valid = false;
|
||||
}
|
||||
}
|
||||
|
@@ -22,4 +22,4 @@ private:
|
||||
std::atomic<bool> ready;
|
||||
std::atomic<bool> cursed_data_valid;
|
||||
ProtocolIndala40134 indala;
|
||||
};
|
||||
};
|
||||
|
@@ -12,4 +12,4 @@
|
||||
#define EM_STOP_MASK (0x1LLU << EM_STOP_POS)
|
||||
|
||||
#define EM_HEADER_AND_STOP_MASK (EM_HEADER_MASK | EM_STOP_MASK)
|
||||
#define EM_HEADER_AND_STOP_DATA (EM_HEADER_MASK)
|
||||
#define EM_HEADER_AND_STOP_DATA (EM_HEADER_MASK)
|
||||
|
@@ -19,4 +19,4 @@ private:
|
||||
|
||||
uint64_t card_data;
|
||||
uint8_t card_data_index;
|
||||
};
|
||||
};
|
||||
|
@@ -23,4 +23,4 @@ private:
|
||||
void write_raw_bit(bool bit, uint8_t position);
|
||||
|
||||
OscFSK* fsk;
|
||||
};
|
||||
};
|
||||
|
@@ -20,4 +20,4 @@ private:
|
||||
bool last_bit;
|
||||
bool current_polarity;
|
||||
static const uint8_t clock_per_bit = 16;
|
||||
};
|
||||
};
|
||||
|
@@ -63,4 +63,4 @@ uint8_t lfrfid_key_get_type_data_count(LfrfidKeyType type) {
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
@@ -13,4 +13,4 @@ enum class LfrfidKeyType : uint8_t {
|
||||
const char* lfrfid_key_get_type_string(LfrfidKeyType type);
|
||||
const char* lfrfid_key_get_manufacturer_string(LfrfidKeyType type);
|
||||
bool lfrfid_key_get_string_type(const char* string, LfrfidKeyType* type);
|
||||
uint8_t lfrfid_key_get_type_data_count(LfrfidKeyType type);
|
||||
uint8_t lfrfid_key_get_type_data_count(LfrfidKeyType type);
|
||||
|
@@ -27,4 +27,4 @@ private:
|
||||
const uint16_t freq[2];
|
||||
const uint16_t osc_phase_max;
|
||||
int32_t osc_phase_current;
|
||||
};
|
||||
};
|
||||
|
@@ -57,4 +57,4 @@ public:
|
||||
virtual bool can_be_decoded(const uint8_t* encoded_data, const uint8_t encoded_data_size) = 0;
|
||||
|
||||
virtual ~ProtocolGeneric(){};
|
||||
};
|
||||
};
|
||||
|
@@ -19,4 +19,4 @@ public:
|
||||
const uint8_t decoded_data_size) final;
|
||||
|
||||
bool can_be_decoded(const uint8_t* encoded_data, const uint8_t encoded_data_size) final;
|
||||
};
|
||||
};
|
||||
|
@@ -234,4 +234,4 @@ bool ProtocolIndala40134::can_be_decoded(
|
||||
} while(false);
|
||||
|
||||
return can_be_decoded;
|
||||
}
|
||||
}
|
||||
|
@@ -33,4 +33,4 @@ private:
|
||||
uint8_t pulse_index = 0;
|
||||
static const uint8_t pulse_max = 6;
|
||||
Pulse pulses[pulse_max];
|
||||
};
|
||||
};
|
||||
|
@@ -36,7 +36,7 @@ const char* RfidKey::get_type_text() {
|
||||
return lfrfid_key_get_type_string(type);
|
||||
}
|
||||
|
||||
const uint8_t RfidKey::get_type_data_count() {
|
||||
uint8_t RfidKey::get_type_data_count() const {
|
||||
return lfrfid_key_get_type_data_count(type);
|
||||
}
|
||||
|
||||
|
@@ -14,7 +14,7 @@ public:
|
||||
LfrfidKeyType get_type();
|
||||
const uint8_t* get_data();
|
||||
const char* get_type_text();
|
||||
const uint8_t get_type_data_count();
|
||||
uint8_t get_type_data_count() const;
|
||||
char* get_name();
|
||||
uint8_t get_name_length();
|
||||
void clear();
|
||||
|
@@ -45,4 +45,4 @@ private:
|
||||
void sq_write_validate();
|
||||
uint16_t validate_counts;
|
||||
void sq_write_stop_validate();
|
||||
};
|
||||
};
|
||||
|
@@ -17,4 +17,4 @@ private:
|
||||
void write_byte(uint8_t value);
|
||||
void write_block(uint8_t page, uint8_t block, bool lock_bit, uint32_t data);
|
||||
void write_reset();
|
||||
};
|
||||
};
|
||||
|
@@ -22,4 +22,4 @@ private:
|
||||
uint32_t tick_count;
|
||||
|
||||
void do_nothing();
|
||||
};
|
||||
};
|
||||
|
Reference in New Issue
Block a user