aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--extmod/moductypes.c2
-rw-r--r--lib/mp-readline/readline.c2
-rw-r--r--py/gc.c2
-rw-r--r--py/modmicropython.c6
-rw-r--r--unix/modtime.c4
5 files changed, 8 insertions, 8 deletions
diff --git a/extmod/moductypes.c b/extmod/moductypes.c
index 416565ed5..923d34488 100644
--- a/extmod/moductypes.c
+++ b/extmod/moductypes.c
@@ -117,7 +117,7 @@ typedef struct _mp_obj_uctypes_struct_t {
uint32_t flags;
} mp_obj_uctypes_struct_t;
-STATIC NORETURN void syntax_error() {
+STATIC NORETURN void syntax_error(void) {
nlr_raise(mp_obj_new_exception_msg(&mp_type_TypeError, "syntax error in uctypes descriptor"));
}
diff --git a/lib/mp-readline/readline.c b/lib/mp-readline/readline.c
index 78380e317..ae61f3f80 100644
--- a/lib/mp-readline/readline.c
+++ b/lib/mp-readline/readline.c
@@ -249,7 +249,7 @@ end_key:
return -1;
}
-void readline_note_newline() {
+void readline_note_newline(void) {
rl.orig_line_len = rl.line->len;
rl.cursor_pos = rl.orig_line_len;
}
diff --git a/py/gc.c b/py/gc.c
index 69072a4c2..121e50b78 100644
--- a/py/gc.c
+++ b/py/gc.c
@@ -649,7 +649,7 @@ void *gc_realloc(void *ptr_in, mp_uint_t n_bytes) {
}
#endif // Alternative gc_realloc impl
-void gc_dump_info() {
+void gc_dump_info(void) {
gc_info_t info;
gc_info(&info);
printf("GC: total: " UINT_FMT ", used: " UINT_FMT ", free: " UINT_FMT "\n", info.total, info.used, info.free);
diff --git a/py/modmicropython.c b/py/modmicropython.c
index 75f3e8dfe..e6adc355b 100644
--- a/py/modmicropython.c
+++ b/py/modmicropython.c
@@ -37,17 +37,17 @@
#if MICROPY_PY_MICROPYTHON_MEM_INFO
#if MICROPY_MEM_STATS
-STATIC mp_obj_t mp_micropython_mem_total() {
+STATIC mp_obj_t mp_micropython_mem_total(void) {
return MP_OBJ_NEW_SMALL_INT(m_get_total_bytes_allocated());
}
STATIC MP_DEFINE_CONST_FUN_OBJ_0(mp_micropython_mem_total_obj, mp_micropython_mem_total);
-STATIC mp_obj_t mp_micropython_mem_current() {
+STATIC mp_obj_t mp_micropython_mem_current(void) {
return MP_OBJ_NEW_SMALL_INT(m_get_current_bytes_allocated());
}
STATIC MP_DEFINE_CONST_FUN_OBJ_0(mp_micropython_mem_current_obj, mp_micropython_mem_current);
-STATIC mp_obj_t mp_micropython_mem_peak() {
+STATIC mp_obj_t mp_micropython_mem_peak(void) {
return MP_OBJ_NEW_SMALL_INT(m_get_peak_bytes_allocated());
}
STATIC MP_DEFINE_CONST_FUN_OBJ_0(mp_micropython_mem_peak_obj, mp_micropython_mem_peak);
diff --git a/unix/modtime.c b/unix/modtime.c
index 61b5e0dd5..c53e0dc38 100644
--- a/unix/modtime.c
+++ b/unix/modtime.c
@@ -57,7 +57,7 @@ void msec_sleep_tv(struct timeval *tv) {
#error Unsupported clock() implementation
#endif
-STATIC mp_obj_t mod_time_time() {
+STATIC mp_obj_t mod_time_time(void) {
#if MICROPY_PY_BUILTINS_FLOAT
struct timeval tv;
gettimeofday(&tv, NULL);
@@ -70,7 +70,7 @@ STATIC mp_obj_t mod_time_time() {
STATIC MP_DEFINE_CONST_FUN_OBJ_0(mod_time_time_obj, mod_time_time);
// Note: this is deprecated since CPy3.3, but pystone still uses it.
-STATIC mp_obj_t mod_time_clock() {
+STATIC mp_obj_t mod_time_clock(void) {
#if MICROPY_PY_BUILTINS_FLOAT
// float cannot represent full range of int32 precisely, so we pre-divide
// int to reduce resolution, and then actually do float division hoping