Fixup empty parameter lists in function definitions

This commit is contained in:
K. Lange 2022-09-19 10:19:09 +09:00
parent 21885de9ad
commit 5f4d3df5d0
2 changed files with 7 additions and 7 deletions

View File

@ -400,14 +400,14 @@ static void blackenObject(KrkObj * object) {
} }
} }
static void traceReferences() { static void traceReferences(void) {
while (vm.grayCount > 0) { while (vm.grayCount > 0) {
KrkObj * object = vm.grayStack[--vm.grayCount]; KrkObj * object = vm.grayStack[--vm.grayCount];
blackenObject(object); blackenObject(object);
} }
} }
static size_t sweep() { static size_t sweep(void) {
KrkObj * previous = NULL; KrkObj * previous = NULL;
KrkObj * object = vm.objects; KrkObj * object = vm.objects;
size_t count = 0; size_t count = 0;
@ -468,7 +468,7 @@ static void markThreadRoots(KrkThreadState * thread) {
} }
} }
static void markRoots() { static void markRoots(void) {
KrkThreadState * thread = vm.threads; KrkThreadState * thread = vm.threads;
while (thread) { while (thread) {
markThreadRoots(thread); markThreadRoots(thread);

View File

@ -167,7 +167,7 @@ inline void krk_push(KrkValue value) {
* the repl relies on this it expects to be able to get the last * the repl relies on this it expects to be able to get the last
* pushed value and display it (if it's not None). * pushed value and display it (if it's not None).
*/ */
inline KrkValue krk_pop() { inline KrkValue krk_pop(void) {
if (unlikely(krk_currentThread.stackTop == krk_currentThread.stack)) { if (unlikely(krk_currentThread.stackTop == krk_currentThread.stack)) {
abort(); abort();
} }
@ -1027,7 +1027,7 @@ void krk_initVM(int flags) {
/** /**
* Reclaim resources used by the VM. * Reclaim resources used by the VM.
*/ */
void krk_freeVM() { void krk_freeVM(void) {
krk_freeTable(&vm.strings); krk_freeTable(&vm.strings);
krk_freeTable(&vm.modules); krk_freeTable(&vm.modules);
if (vm.specialMethodNames) free(vm.specialMethodNames); if (vm.specialMethodNames) free(vm.specialMethodNames);
@ -1162,7 +1162,7 @@ MAKE_UNARY_OP(_pos,pos,+)
* stack manipulation could result in a handler being in the wrong place, * stack manipulation could result in a handler being in the wrong place,
* at which point there's no guarantees about what happens. * at which point there's no guarantees about what happens.
*/ */
static int handleException() { static int handleException(void) {
int stackOffset, frameOffset; int stackOffset, frameOffset;
int exitSlot = (krk_currentThread.exitOnFrame >= 0) ? krk_currentThread.frames[krk_currentThread.exitOnFrame].outSlots : 0; int exitSlot = (krk_currentThread.exitOnFrame >= 0) ? krk_currentThread.frames[krk_currentThread.exitOnFrame].outSlots : 0;
for (stackOffset = (int)(krk_currentThread.stackTop - krk_currentThread.stack - 1); for (stackOffset = (int)(krk_currentThread.stackTop - krk_currentThread.stack - 1);
@ -2087,7 +2087,7 @@ static inline void commonMethodInvoke(size_t methodOffset, int args, const char
/** /**
* VM main loop. * VM main loop.
*/ */
static KrkValue run() { static KrkValue run(void) {
KrkCallFrame* frame = &krk_currentThread.frames[krk_currentThread.frameCount - 1]; KrkCallFrame* frame = &krk_currentThread.frames[krk_currentThread.frameCount - 1];
while (1) { while (1) {