diff --git a/v0/include.mk b/v0/include.mk index 3ca5d89..bc390ad 100644 --- a/v0/include.mk +++ b/v0/include.mk @@ -20,7 +20,7 @@ v0/bin/test: $(V0_SRC_OBJ_NO_MAIN) $(V0_TEST_OBJ) $(CC) $(CFLAGS) -o $@ $^ test:: v0/bin/test - valgrind --leak-check=full --error-exitcode=1 v0/bin/test + valgrind --quiet --leak-check=full --error-exitcode=1 v0/bin/test generate_golden:: v0/bin/test GENERATE_GOLDEN=1 v0/bin/test diff --git a/v0/parser.c b/v0/parser.c index aa1462d..fc55237 100644 --- a/v0/parser.c +++ b/v0/parser.c @@ -22,6 +22,9 @@ Module* parser_parse(TokenStream* ts) { fprintf(stderr, "Out of memory\n"); exit(1); } + module->name = NULL; + module->imports = NULL; + module->import_count = 0; module->name = (char*)malloc(t.text.length + 1); if (module->name == NULL) { diff --git a/v0/test.c b/v0/test.c index 4cf8248..2f23397 100644 --- a/v0/test.c +++ b/v0/test.c @@ -196,6 +196,7 @@ int main(int argc, char** argv) { } if (s_testSource) free(s_testSource); + log_clear(); if (failedCount > 0) { printf("\nFailed tests:\n");