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:
committed by
Graham Sanderson
parent
9546c1ce32
commit
ebb228bfea
@ -51,7 +51,7 @@ typedef struct stdio_driver stdio_driver_t;
|
||||
*
|
||||
* \see stdio_uart, stdio_usb, stdio_semihosting
|
||||
*/
|
||||
void stdio_init_all();
|
||||
void stdio_init_all(void);
|
||||
|
||||
/*! \brief Initialize all of the present standard stdio types that are linked into the binary.
|
||||
* \ingroup pico_stdio
|
||||
@ -61,7 +61,7 @@ void stdio_init_all();
|
||||
*
|
||||
* \see stdio_uart, stdio_usb, stdio_semihosting
|
||||
*/
|
||||
void stdio_flush();
|
||||
void stdio_flush(void);
|
||||
|
||||
/*! \brief Return a character from stdin if there is one available within a timeout
|
||||
* \ingroup pico_stdio
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
struct stdio_driver {
|
||||
void (*out_chars)(const char *buf, int len);
|
||||
void (*out_flush)();
|
||||
void (*out_flush)(void);
|
||||
int (*in_chars)(char *buf, int len);
|
||||
stdio_driver_t *next;
|
||||
#if PICO_STDIO_ENABLE_CRLF_SUPPORT
|
||||
|
@ -33,7 +33,7 @@ static stdio_driver_t *filter;
|
||||
#if PICO_STDOUT_MUTEX
|
||||
auto_init_mutex(print_mutex);
|
||||
|
||||
bool stdout_serialize_begin() {
|
||||
bool stdout_serialize_begin(void) {
|
||||
int core_num = get_core_num();
|
||||
uint32_t owner;
|
||||
if (!mutex_try_enter(&print_mutex, &owner)) {
|
||||
@ -46,15 +46,15 @@ bool stdout_serialize_begin() {
|
||||
return true;
|
||||
}
|
||||
|
||||
void stdout_serialize_end() {
|
||||
void stdout_serialize_end(void) {
|
||||
mutex_exit(&print_mutex);
|
||||
}
|
||||
|
||||
#else
|
||||
static bool print_serialize_begin() {
|
||||
static bool print_serialize_begin(void) {
|
||||
return true;
|
||||
}
|
||||
static void print_serialize_end() {
|
||||
static void print_serialize_end(void) {
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -255,7 +255,7 @@ void stdio_init_all() {
|
||||
#endif
|
||||
}
|
||||
|
||||
int WRAPPER_FUNC(getchar)() {
|
||||
int WRAPPER_FUNC(getchar)(void) {
|
||||
char buf[1];
|
||||
if (0 == stdio_get_until(buf, sizeof(buf), at_the_end_of_time)) {
|
||||
return PICO_ERROR_TIMEOUT;
|
||||
|
Reference in New Issue
Block a user