Clean up various C source and headers to appease -Wstrict-prototypes

In C, func() is a function taking an unspecified number of arguments,
vs func(void) a function taking no arguments. In C++ both forms indicate
"no arguments."

Update these headers to use the (void) form, which is correct in both
languages and avoids complaints when -Wstrict-prototypes is specified.
This commit is contained in:
Brian Swetland
2021-02-07 14:04:25 -08:00
committed by graham sanderson
parent 93c600736e
commit a362925eda
34 changed files with 105 additions and 104 deletions

View File

@ -354,7 +354,7 @@ static inline void sm_config_set_mov_status(pio_sm_config *c, enum pio_mov_statu
*
* \return the default state machine configuration which can then be modified.
*/
static inline pio_sm_config pio_get_default_sm_config() {
static inline pio_sm_config pio_get_default_sm_config(void) {
pio_sm_config c = {0, 0, 0};
sm_config_set_clkdiv_int_frac(&c, 1, 0);
sm_config_set_wrap(&c, 0, 31);

View File

@ -167,7 +167,7 @@ inline static uint pio_encode_set(enum pio_src_dest dest, uint value) {
return _pio_encode_instr_and_src_dest(pio_instr_bits_set, dest, value);
}
inline static uint pio_encode_nop() {
inline static uint pio_encode_nop(void) {
return pio_encode_mov(pio_y, pio_y);
}
@ -175,4 +175,4 @@ inline static uint pio_encode_nop() {
}
#endif
#endif
#endif