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

@ -335,7 +335,7 @@ static inline bool gpio_get(uint gpio) {
*
* \return Bitmask of raw GPIO values, as bits 0-29
*/
static inline uint32_t gpio_get_all() {
static inline uint32_t gpio_get_all(void) {
return sio_hw->gpio_in;
}
@ -490,7 +490,7 @@ static inline uint gpio_get_dir(uint gpio) {
return gpio_is_dir_out(gpio); // note GPIO_OUT is 1/true and GPIO_IN is 0/false anyway
}
extern void gpio_debug_pins_init();
extern void gpio_debug_pins_init(void);
#ifdef __cplusplus
}