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

@ -199,7 +199,7 @@ static inline void pwm_init(uint slice_num, pwm_config *c, bool start) {
*
* \return Set of default values.
*/
static inline pwm_config pwm_get_default_config() {
static inline pwm_config pwm_get_default_config(void) {
pwm_config c = {0, 0, 0};
pwm_config_set_phase_correct(&c, false);
pwm_config_set_clkdiv_int(&c, 1);
@ -471,7 +471,7 @@ static inline void pwm_clear_irq(uint slice_num) {
*
* \return Bitmask of all PWM interrupts currently set
*/
static inline int32_t pwm_get_irq_status_mask() {
static inline int32_t pwm_get_irq_status_mask(void) {
return pwm_hw->ints;
}