From 7e5dddf41e07b32e2c75fb5d968b9318dc58c92a Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Thu, 4 Feb 2021 13:40:42 +0100 Subject: [PATCH] Only compile list_is_valid() when NDEBUG is undefined --- list.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/list.c b/list.c index b9963af1..fe9c41e5 100644 --- a/list.c +++ b/list.c @@ -55,8 +55,9 @@ #include "list.h" #include "miscutil.h" +#ifndef NDEBUG static int list_is_valid (const struct list *the_list); - +#endif /********************************************************************* * @@ -123,6 +124,7 @@ void destroy_list (struct list *the_list) } +#ifndef NDEBUG /********************************************************************* * * Function : list_is_valid @@ -203,6 +205,8 @@ static int list_is_valid (const struct list *the_list) return 1; #endif } +#endif /* ndef NDEBUG */ + /********************************************************************* * -- 2.39.2