Add -Wuninitialized -Wunused -Wcast-align to warnings checked by kitchen_sink (and fixup warnings) (#125)

This commit is contained in:
Graham Sanderson
2021-02-15 10:06:12 -06:00
committed by GitHub
parent 81c3d3fae6
commit 8b9907e7f2
15 changed files with 32 additions and 31 deletions

View File

@ -104,7 +104,7 @@ typedef struct {
uint32_t pinctrl;
} pio_sm_config;
static inline void check_sm_param(uint sm) {
static inline void check_sm_param(__unused uint sm) {
valid_params_if(PIO, sm < NUM_PIO_STATE_MACHINES);
}

View File

@ -50,13 +50,6 @@ int pio_claim_unused_sm(PIO pio, bool required) {
return index >= base ? index - base : -1;
}
void pio_load_program(PIO pio, const uint16_t *prog, uint8_t prog_len, uint8_t load_offset) {
// instructions are only 16 bits, but instruction memory locations are spaced 32 bits apart
// Adjust the addresses of any jump instructions to respect load offset
assert(load_offset + prog_len <= PIO_INSTRUCTION_COUNT);
}
static_assert(PIO_INSTRUCTION_COUNT <= 32, "");
static uint32_t _used_instruction_space[2];