mark die() using the GNU compiler hint __dead - sfeed_curses - sfeed curses UI (now part of sfeed, development is in sfeed)
 (HTM) git clone git://git.codemadness.org/sfeed_curses
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit f9354ef1a5b917bd26454efbe4e6d57a5aead514
 (DIR) parent 65c4468cd60794b94a619f5f65e24297756c0260
 (HTM) Author: Hiltjo Posthuma <hiltjo@codemadness.org>
       Date:   Tue, 16 Mar 2021 17:59:55 +0100
       
       mark die() using the GNU compiler hint __dead
       
       Fixed a false-positive warning from clang-analyzer (scan-build).
       
       For portability just define it so it compiles when it's not known.
       
       Diffstat:
         M sfeed_curses.c                      |       7 ++++++-
       
       1 file changed, 6 insertions(+), 1 deletion(-)
       ---
 (DIR) diff --git a/sfeed_curses.c b/sfeed_curses.c
       @@ -214,8 +214,13 @@ ttywrite(const char *s)
                return write(1, s, strlen(s));
        }
        
       +/* hint for compilers and static analyzers that a function exits */
       +#ifndef __dead
       +#define __dead
       +#endif
       +
        /* print to stderr, call cleanup() and _exit(). */
       -void
       +__dead void
        die(const char *fmt, ...)
        {
                va_list ap;