From c7774b57b2b7523c9ffa3247fe86a32d6d1c6c37 Mon Sep 17 00:00:00 2001 From: Alessio Chiapperini Date: Thu, 14 Nov 2019 17:35:40 +0100 Subject: [PATCH] Fix missing pattern in print_list Add "catch-all" pattern in print_list function. --- list/list.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/list/list.c b/list/list.c index 275960a..1359d55 100644 --- a/list/list.c +++ b/list/list.c @@ -86,6 +86,10 @@ print_list(struct list *lst) case CONS: printf("%d,", lst->data.num); print_list(lst->data.next); + break; + default: + fprintf(stderr, "Non-exhaustive patterns in function %s\n", + __func__); } } -- 2.45.2