summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2025-09-15 19:58:56 -0400
committerpommicket <pommicket@gmail.com>2025-09-15 19:58:56 -0400
commitaafaca51cfbdc66a6ff9af52121470f59b9559ac (patch)
tree3cf3d43fca5dba8cb9cdba733b258c9c9f57b319
parentd5cf3acb7a45b7e46bf51dc6a66030d7bc986597 (diff)
Check for leaks in `make test`
-rw-r--r--Makefile3
-rw-r--r--pom.c10
2 files changed, 2 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index 65a7055..f68e530 100644
--- a/Makefile
+++ b/Makefile
@@ -6,6 +6,7 @@ __build:
$(MAKE) -C $(BUILD_DIR)
test: __build
- valgrind --exit-on-first-error=yes --error-exitcode=1 $(BUILD_DIR)/tests
+ valgrind --exit-on-first-error=yes --error-exitcode=1 --track-origins=yes \
+ --leak-check=full --show-leak-kinds=all $(BUILD_DIR)/tests
.PHONY: __build test
diff --git a/pom.c b/pom.c
index 772df4a..488c7a3 100644
--- a/pom.c
+++ b/pom.c
@@ -904,16 +904,6 @@ conf_item_cmp_qsort(const void *va, const void *vb) {
return strcmp(item_a->key, item_b->key);
}
-/*
-// Returns true if `descendant` starts with `ancestor.`.
-static bool
-is_descendant(const char *ancestor, const char *descendant) {
- size_t ancestor_len = strlen(ancestor);
- return memcmp(ancestor, descendant, ancestor_len) == 0
- && descendant[ancestor_len] == '.';
-}
-*/
-
static size_t
conf_binary_search(const pom_conf *conf, const char *key, char nxt_char, bool *found) {
size_t lo = 0;