py, unix, lib: Allow to compile with -Wold-style-definition.

crypto-aes
Damien George 8 years ago
parent cd34207409
commit abc1959e2c
  1. 2
      extmod/moductypes.c
  2. 2
      lib/mp-readline/readline.c
  3. 2
      py/gc.c
  4. 6
      py/modmicropython.c
  5. 4
      unix/modtime.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"));
}

@ -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;
}

@ -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);

@ -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);

@ -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

Loading…
Cancel
Save