diff --git a/main.c b/main.c index 2f2dade..b6a2751 100644 --- a/main.c +++ b/main.c @@ -6,7 +6,7 @@ #include "test_gc.h" #include "vm.h" -void test_int_alloc() { +void test_int_alloc(void) { struct virtualMachine *vm = initVM(); pushInt(vm, 100); pushInt(vm, 1000); @@ -18,7 +18,7 @@ void test_int_alloc() { free(vm); } -void test_pair_alloc() { +void test_pair_alloc(void) { struct virtualMachine *vm = initVM(); pushInt(vm, 100); pushInt(vm, 1000); @@ -32,7 +32,7 @@ void test_pair_alloc() { free(vm); } -void test_obj_count() { +void test_obj_count(void) { struct virtualMachine *vm = initVM(); pushInt(vm, 100); pushInt(vm, 1000); @@ -45,7 +45,7 @@ void test_obj_count() { free(vm); } -void test_nested_pair() { +void test_nested_pair(void) { struct virtualMachine *vm = initVM(); pushInt(vm, 100); pushInt(vm, 1000); @@ -61,7 +61,7 @@ void test_nested_pair() { free(vm); } -void test_unreachable() { +void test_unreachable(void) { struct virtualMachine *vm = initVM(); pushInt(vm, 100); pushInt(vm, 1000); @@ -74,7 +74,7 @@ void test_unreachable() { free(vm); } -void test_auto_gc() { +void test_auto_gc(void) { struct virtualMachine *vm = initVM(); for (size_t i = 0; i < 505; ++i) { diff --git a/vm.h b/vm.h index 8e7f0bc..445ef6a 100644 --- a/vm.h +++ b/vm.h @@ -40,7 +40,7 @@ struct garbageObject *initGarbage(struct virtualMachine *vm, enum garbageData type); // Create a new VM -struct virtualMachine *initVM(); +struct virtualMachine *initVM(void); // Generic function to push data onto the VM stack void push(struct virtualMachine *vm, struct garbageObject *value);