Skip to content

Commit

Permalink
Fix 'misleading indentation' clang warning in check_heap_stats of gctest
Browse files Browse the repository at this point in the history
(fix of commit 4c6d773)

* tests/gctest.c (check_heap_stats): Indent code properly (after
comparison of max_heap_sz with init_heap_sz).
  • Loading branch information
ivmai committed Feb 12, 2024
1 parent 4c6d773 commit 0efb130
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/gctest.c
Original file line number Diff line number Diff line change
Expand Up @@ -2045,17 +2045,17 @@ static void check_heap_stats(void)

/* Garbage collect repeatedly so that all inaccessible objects */
/* can be finalized. */
while (GC_collect_a_little()) { } /* should work even if disabled GC */
for (i = 0; i < 16; i++) {
while (GC_collect_a_little()) { } /* should work even if disabled GC */
for (i = 0; i < 16; i++) {
GC_gcollect();
# ifndef GC_NO_FINALIZATION
# ifdef FINALIZE_ON_DEMAND
late_finalize_count +=
# endif
GC_invoke_finalizers();
# endif
}
if (print_stats) {
}
if (print_stats) {
struct GC_stack_base sb;
int res = GC_get_stack_base(&sb);

Expand All @@ -2067,7 +2067,7 @@ static void check_heap_stats(void)
GC_printf("GC_get_stack_base() failed: %d\n", res);
FAIL;
}
}
}
obj_count = 0;
(void)GC_call_with_reader_lock(count_reachable_objs, &obj_count, 0);
GC_printf("Completed %u tests\n", n_tests);
Expand Down

0 comments on commit 0efb130

Please sign in to comment.