Skip to content

Commit bbf5cd0

Browse files
committed
py: Allow to compile with -Wstrict-prototypes.
1 parent 30d8a82 commit bbf5cd0

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

lib/mp-readline/readline.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ void readline_init0(void);
3434
int readline(vstr_t *line, const char *prompt);
3535

3636
void readline_init(vstr_t *line);
37-
void readline_note_newline();
37+
void readline_note_newline(void);
3838
int readline_process_char(int c);

py/objfun.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ typedef struct _mp_obj_fun_native_t {
300300
// TODO add mp_map_t *globals
301301
} mp_obj_fun_native_t;
302302

303-
typedef mp_obj_t (*native_fun_0_t)();
303+
typedef mp_obj_t (*native_fun_0_t)(void);
304304
typedef mp_obj_t (*native_fun_1_t)(mp_obj_t);
305305
typedef mp_obj_t (*native_fun_2_t)(mp_obj_t, mp_obj_t);
306306
typedef mp_obj_t (*native_fun_3_t)(mp_obj_t, mp_obj_t, mp_obj_t);
@@ -360,7 +360,7 @@ typedef struct _mp_obj_fun_viper_t {
360360
mp_uint_t type_sig;
361361
} mp_obj_fun_viper_t;
362362

363-
typedef mp_uint_t (*viper_fun_0_t)();
363+
typedef mp_uint_t (*viper_fun_0_t)(void);
364364
typedef mp_uint_t (*viper_fun_1_t)(mp_uint_t);
365365
typedef mp_uint_t (*viper_fun_2_t)(mp_uint_t, mp_uint_t);
366366
typedef mp_uint_t (*viper_fun_3_t)(mp_uint_t, mp_uint_t, mp_uint_t);
@@ -417,7 +417,7 @@ typedef struct _mp_obj_fun_asm_t {
417417
void *fun_data; // GC must be able to trace this pointer
418418
} mp_obj_fun_asm_t;
419419

420-
typedef mp_uint_t (*inline_asm_fun_0_t)();
420+
typedef mp_uint_t (*inline_asm_fun_0_t)(void);
421421
typedef mp_uint_t (*inline_asm_fun_1_t)(mp_uint_t);
422422
typedef mp_uint_t (*inline_asm_fun_2_t)(mp_uint_t, mp_uint_t);
423423
typedef mp_uint_t (*inline_asm_fun_3_t)(mp_uint_t, mp_uint_t, mp_uint_t);

0 commit comments

Comments
 (0)