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

@ -62,7 +62,7 @@ static inline void check_hardware_alarm_num_param(uint alarm_num) {
*
* \return the 32 bit timestamp
*/
static inline uint32_t time_us_32() {
static inline uint32_t time_us_32(void) {
return timer_hw->timerawl;
}
@ -75,7 +75,7 @@ static inline uint32_t time_us_32() {
*
* \return the 64 bit timestamp
*/
uint64_t time_us_64();
uint64_t time_us_64(void);
/*! \brief Busy wait wasting cycles for the given (32 bit) number of microseconds
* \ingroup hardware_timer

View File

@ -92,7 +92,7 @@ static inline uint harware_alarm_irq_number(uint alarm_num) {
return TIMER_IRQ_0 + alarm_num;
}
static void hardware_alarm_irq_handler() {
static void hardware_alarm_irq_handler(void) {
// Determine which timer this IRQ is for
uint32_t ipsr;
__asm volatile ("mrs %0, ipsr" : "=r" (ipsr)::);