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

@ -36,7 +36,7 @@ extern "C" {
#define hard_assert_if(x, test) ({if (PARAM_ASSERTIONS_ENABLED(x)) hard_assert(!(test));})
#ifdef NDEBUG
extern void hard_assertion_failure();
extern void hard_assertion_failure(void);
static inline void hard_assert(bool condition, ...) {
if (!condition)
hard_assertion_failure();

View File

@ -71,14 +71,14 @@ extern "C" {
* PICO_DEFAULT_UART_TX_PIN
* PICO_DEFAULT_UART_RX_PIN
*/
void setup_default_uart();
void setup_default_uart(void);
/*! \brief Initialise the system clock to 48MHz
* \ingroup pico_stdlib
*
* Set the system clock to 48MHz, and set the peripheral clock to match.
*/
void set_sys_clock_48mhz();
void set_sys_clock_48mhz(void);
/*! \brief Initialise the system clock
* \ingroup pico_stdlib

View File

@ -58,7 +58,7 @@ extern "C" {
* \sa sleep_until()
* \sa time_us_64()
*/
static inline absolute_time_t get_absolute_time() {
static inline absolute_time_t get_absolute_time(void) {
absolute_time_t t;
update_us_since_boot(&t, time_us_64());
return t;
@ -350,7 +350,7 @@ typedef struct alarm_pool alarm_pool_t;
* \brief Create the default alarm pool (if not already created or disabled)
* \ingroup alarm
*/
void alarm_pool_init_default();
void alarm_pool_init_default(void);
#if !PICO_TIME_DEFAULT_ALARM_POOL_DISABLED
/*!
@ -360,7 +360,7 @@ void alarm_pool_init_default();
* \ingroup alarm
* \sa #PICO_TIME_DEFAULT_ALARM_POOL_HARDWARE_ALARM_NUM
*/
alarm_pool_t *alarm_pool_get_default();
alarm_pool_t *alarm_pool_get_default(void);
#endif
/**