From 1eba40602175e9ee231cba7577c3eee975680dcb Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Sat, 27 Nov 2021 21:09:18 +0100 Subject: [PATCH] test: Check that strdup() does not fail Warned-by: gcc --- test/fgetln.c | 1 + 1 file changed, 1 insertion(+) diff --git a/test/fgetln.c b/test/fgetln.c index 2eafa84..e137fe7 100644 --- a/test/fgetln.c +++ b/test/fgetln.c @@ -96,6 +96,7 @@ test_fgetln_multi(void) char *str; str = strdup("A\n"); + assert(str); str[0] += i; files[i].line_alloc = str;