summaryrefslogtreecommitdiffstatshomepage
path: root/py
diff options
context:
space:
mode:
Diffstat (limited to 'py')
-rw-r--r--py/mpz.h2
-rw-r--r--py/objstr.c4
-rw-r--r--py/stackctrl.c6
-rw-r--r--py/stackctrl.h6
4 files changed, 9 insertions, 9 deletions
diff --git a/py/mpz.h b/py/mpz.h
index 35e06c5658..3ae9efe421 100644
--- a/py/mpz.h
+++ b/py/mpz.h
@@ -75,7 +75,7 @@ void mpz_init_from_int(mpz_t *z, mp_int_t val);
void mpz_init_fixed_from_int(mpz_t *z, mpz_dig_t *dig, mp_uint_t dig_alloc, mp_int_t val);
void mpz_deinit(mpz_t *z);
-mpz_t *mpz_zero();
+mpz_t *mpz_zero(void);
mpz_t *mpz_from_int(mp_int_t i);
mpz_t *mpz_from_ll(long long i, bool is_signed);
mpz_t *mpz_from_str(const char *str, mp_uint_t len, bool neg, mp_uint_t base);
diff --git a/py/objstr.c b/py/objstr.c
index cfe0ef115c..1bb89dda91 100644
--- a/py/objstr.c
+++ b/py/objstr.c
@@ -46,7 +46,7 @@ STATIC mp_obj_t str_modulo_format(mp_obj_t pattern, mp_uint_t n_args, const mp_o
mp_obj_t mp_obj_new_str_iterator(mp_obj_t str);
STATIC mp_obj_t mp_obj_new_bytes_iterator(mp_obj_t str);
STATIC NORETURN void bad_implicit_conversion(mp_obj_t self_in);
-STATIC NORETURN void arg_type_mixup();
+STATIC NORETURN void arg_type_mixup(void);
/******************************************************************************/
/* str */
@@ -1957,7 +1957,7 @@ STATIC void bad_implicit_conversion(mp_obj_t self_in) {
}
}
-STATIC void arg_type_mixup() {
+STATIC void arg_type_mixup(void) {
nlr_raise(mp_obj_new_exception_msg(&mp_type_TypeError, "Can't mix str and bytes arguments"));
}
diff --git a/py/stackctrl.c b/py/stackctrl.c
index 2ee5dd6472..0ba43c28c7 100644
--- a/py/stackctrl.c
+++ b/py/stackctrl.c
@@ -35,12 +35,12 @@
// Stack top at the start of program
char *stack_top;
-void mp_stack_ctrl_init() {
+void mp_stack_ctrl_init(void) {
volatile int stack_dummy;
stack_top = (char*)&stack_dummy;
}
-mp_uint_t mp_stack_usage() {
+mp_uint_t mp_stack_usage(void) {
// Assumes descending stack
volatile int stack_dummy;
return stack_top - (char*)&stack_dummy;
@@ -54,7 +54,7 @@ void mp_stack_set_limit(mp_uint_t limit) {
stack_limit = limit;
}
-void mp_stack_check() {
+void mp_stack_check(void) {
if (mp_stack_usage() >= stack_limit) {
nlr_raise(mp_obj_new_exception_msg(&mp_type_RuntimeError, "maximum recursion depth exceeded"));
}
diff --git a/py/stackctrl.h b/py/stackctrl.h
index a57b846b7d..4ed67774f8 100644
--- a/py/stackctrl.h
+++ b/py/stackctrl.h
@@ -24,13 +24,13 @@
* THE SOFTWARE.
*/
-void mp_stack_ctrl_init();
-mp_uint_t mp_stack_usage();
+void mp_stack_ctrl_init(void);
+mp_uint_t mp_stack_usage(void);
#if MICROPY_STACK_CHECK
void mp_stack_set_limit(mp_uint_t limit);
-void mp_stack_check();
+void mp_stack_check(void);
#define MP_STACK_CHECK() mp_stack_check()
#else