From 3e33447426c07b22d8df3172e630f281bcfa8fef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deuc=D0=B5?= <shurd@sasktel.net> Date: Fri, 3 Jan 2025 16:45:31 -0500 Subject: [PATCH] Try to tell Coverity that getch() isn't constant. I'm not sure if I can do this with events, or just issues, and I don't want to directly annotate this issue because that could lead to missing an issue after a future code change. The return value of getch() will never be const though. --- src/syncterm/term.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/syncterm/term.c b/src/syncterm/term.c index 2b049022cb..b1026da697 100644 --- a/src/syncterm/term.c +++ b/src/syncterm/term.c @@ -1218,6 +1218,7 @@ transfer_complete(bool success, bool was_binary) lprintf(LOG_NOTICE, "Hit any key or wait %u seconds to continue...", timeout); while (timeout > 0) { if (kbhit()) { + /* coverity[cond_const:FALSE] */ if (getch() == (CIO_KEY_QUIT & 0xff)) { if ((getch() << 8) == (CIO_KEY_QUIT & 0xff00)) check_exit(false); -- GitLab