~spidernet/algebraiC

c7774b57b2b7523c9ffa3247fe86a32d6d1c6c37 — Alessio Chiapperini 5 years ago 83fdfbb
Fix missing pattern in print_list

Add "catch-all" pattern in print_list function.
1 files changed, 4 insertions(+), 0 deletions(-)

M list/list.c
M list/list.c => list/list.c +4 -0
@@ 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__);
        }
}