util.h: add a note about __dead and noreturn hints - sfeed - RSS and Atom parser
 (HTM) git clone git://git.codemadness.org/sfeed
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit b2b2426f7742a8a640f1bd8bb9709452baebdca7
 (DIR) parent 1c9433f80c0209c304236f84b58f87bd1ddf261f
 (HTM) Author: Hiltjo Posthuma <hiltjo@codemadness.org>
       Date:   Sat,  2 Nov 2024 12:31:26 +0100
       
       util.h: add a note about __dead and noreturn hints
       
       - Add a note about the attribute for at least gcc/clang.
       - _Noreturn has been deprecated.
       - C23 introduces noreturn.
       
       This is useful for testing with static analyzers like clang analyzer:
               scan-build make
       
       Running with scan-build make would return all false-positives for functions
       using err(), errx() and die().
       
       Diffstat:
         M util.h                              |       3 ++-
       
       1 file changed, 2 insertions(+), 1 deletion(-)
       ---
 (DIR) diff --git a/util.h b/util.h
       @@ -57,7 +57,8 @@ enum {
                FieldLast
        };
        
       -/* hint for compilers and static analyzers that a function exits */
       +/* hint for compilers and static analyzers that a function does not return.
       +   some compilers use: __attribute__((noreturn)), _Noreturn, noreturn */
        #ifndef __dead
        #define __dead
        #endif