From 6ac0be46f6bf51da700ee0793a686ee01032276e Mon Sep 17 00:00:00 2001 From: PatR Date: Thu, 23 Jan 2025 17:30:27 -0800 Subject: [PATCH] last analyzer bit for win/curses/cursmesg.c I got confused and thought that this one (actually pair) was more complicated than it actually is. have_mixed_leadin is used in an ordinary way, but resetting it to false happens in spots where it can't be used again. The analyzer complains that the assignments don't do anything useful. --- win/curses/cursmesg.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/win/curses/cursmesg.c b/win/curses/cursmesg.c index 9d9eceb1f..9608c1158 100644 --- a/win/curses/cursmesg.c +++ b/win/curses/cursmesg.c @@ -213,8 +213,9 @@ curses_message_win_puts(const char *message, boolean recursed) mvwadd_wch(win, my, mx, mixed_leadin_cchar); ++mx; message_length--; - have_mixed_leadin = FALSE; mesg_mixed = 0; + have_mixed_leadin = FALSE; + nhUse(have_mixed_leadin); } #endif mvwprintw(win, my, mx, "%s", tmpstr), mx += (int) strlen(tmpstr); @@ -234,8 +235,9 @@ curses_message_win_puts(const char *message, boolean recursed) mvwadd_wch(win, my, mx, mixed_leadin_cchar); ++mx; message_length--; - have_mixed_leadin = FALSE; mesg_mixed = 0; + have_mixed_leadin = FALSE; + nhUse(have_mixed_leadin); } #endif mvwprintw(win, my, mx, "%s", message), mx += message_length;