minor refactor, fixed many warnings

This commit is contained in:
2021-01-01 23:06:24 -06:00
parent bccabdebd7
commit 7e9b61e018
26 changed files with 53 additions and 49 deletions

View File

@@ -78,7 +78,7 @@ void tableRemoveWhite(CState *state, CTable *tbl) {
}
void markArray(CState *state, CValueArray *array) {
for (int i = 0; i < array->count; i++) {
for (size_t i = 0; i < array->count; i++) {
markValue(state, array->values[i]);
}
}
@@ -132,7 +132,9 @@ void blackenObject(CState *state, CObj *obj) {
break;
}
default:
printf("Unknown type in blackenObject with %p, type %d\n", obj, obj->type);
#ifdef GC_DEBUG
printf("Unknown type in blackenObject with %p, type %d\n", (void*)obj, obj->type);
#endif
break;
}
}
@@ -300,4 +302,4 @@ COSMO_API void cosmoM_removeRoot(CState *state, CObj *oldRoot) {
prev = root;
root = root->nextRoot;
}
}
}