From ab418e57b3d3ae989e7196056487b7f6634a677b Mon Sep 17 00:00:00 2001 From: Chewing_Bever Date: Thu, 26 Jan 2023 12:24:34 +0100 Subject: [PATCH] test: also test with -O3 which can produce extra errors --- .woodpecker/test-mem.yml | 2 ++ .woodpecker/test.yml | 13 +++---------- src/heap/vieter_heap_tree.c | 11 +---------- 3 files changed, 6 insertions(+), 20 deletions(-) diff --git a/.woodpecker/test-mem.yml b/.woodpecker/test-mem.yml index a9ce77b..48896a5 100644 --- a/.woodpecker/test-mem.yml +++ b/.woodpecker/test-mem.yml @@ -14,5 +14,7 @@ pipeline: pull: true commands: - make test-mem + - make clean + - make test-mem CFLAGS='-O3 -Werror -Wall' when: event: [push, pull_request] diff --git a/.woodpecker/test.yml b/.woodpecker/test.yml index 6f636ca..a603923 100644 --- a/.woodpecker/test.yml +++ b/.woodpecker/test.yml @@ -11,19 +11,12 @@ branches: platform: ${PLATFORM} pipeline: - build: + build-and-test: image: *image pull: true - commands: - - make - - make clean - - CFLAGS='-O3' make - when: - event: [push, pull_request] - - test: - image: *image commands: - make test + - make clean + - make test CFLAGS='-O3 -Werror -Wall' when: event: [push, pull_request] diff --git a/src/heap/vieter_heap_tree.c b/src/heap/vieter_heap_tree.c index bdfe091..10c5437 100644 --- a/src/heap/vieter_heap_tree.c +++ b/src/heap/vieter_heap_tree.c @@ -63,16 +63,7 @@ vieter_heap_node *vieter_heap_tree_merge_same_order(vieter_heap_node *root_a, vieter_heap_node *vieter_heap_tree_merge(vieter_heap_node *target_tree, vieter_heap_node *other_tree) { - /* vieter_heap_node *other_tree, *target_tree, *out; */ - vieter_heap_node *out; - - /* if (root_a->order <= root_b->order) { */ - /* target_tree = root_a; */ - /* other_tree = root_b; */ - /* } else { */ - /* target_tree = root_b; */ - /* other_tree = root_a; */ - /* } */ + vieter_heap_node *out = target_tree; vieter_heap_node *next_other_tree, *next_target_tree; vieter_heap_node *previous_target_tree = NULL;