https://bugs.exim.org/show_bug.cgi?id=2291

--- Comment #12 from Andrew Aitchison <e...@aitchison.me.uk> ---
Created attachment 1507
  --> https://bugs.exim.org/attachment.cgi?id=1507&action=edit
Teach cppcheck that log_write( ... LOG_PANIC_DIE ... ) does not return

I think this patch should teach cppcheck that log_write( ... LOG_PANIC_DIE ...
) does not return.

It uses C11 <stdnoreturn.h> (or the equivalent C23 attribute) and
__builtin_unreachable() but it compiles with 'gcc-7 --std=c99' and 'clang-9
--std=c99' as well as gcc-14 and clang-20 --std=c23

It is not happy with a compiler in --std=c89 or --std=c90 mode.

If I haven't fixed it, my log_write_die was called log_panic_die, but your name
is better.

I haven't change many source files to use this yet.
If you have a patch for the full set, that would be useful.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

-- 
## subscription configuration (requires account):
##   https://lists.exim.org/mailman3/postorius/lists/exim-dev.lists.exim.org/
## unsubscribe (doesn't require an account):
##   exim-dev-unsubscr...@lists.exim.org
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

Reply via email to