From 0927726900fa13f5e86d10cdc709441084d52216 Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 27 Dec 2023 11:13:22 -0500 Subject: [PATCH] static analyzer bit for trap.c src/trap.c(5794): warning: Dereferencing NULL pointer 'which'. --- src/trap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/trap.c b/src/trap.c index 2ffca0de5..af6d9c9c5 100644 --- a/src/trap.c +++ b/src/trap.c @@ -5791,6 +5791,7 @@ openholdingtrap( if (!which) which = t->tseen ? the_your[t->madeby_u] : strchr(vowels, *trapdescr) ? "an" : "a"; + assert(which != 0); if (*which) which = strcat(strcpy(whichbuf, which), " ");