Introduction
Introduction Statistics Contact Development Disclaimer Help
mark die() using the GNU compiler hint __dead - sfeed_curses - sfeed curses UI …
git clone git://git.codemadness.org/sfeed_curses
Log
Files
Refs
README
LICENSE
---
commit f9354ef1a5b917bd26454efbe4e6d57a5aead514
parent 65c4468cd60794b94a619f5f65e24297756c0260
Author: Hiltjo Posthuma <[email protected]>
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(-)
---
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;
You are viewing proxied material from codemadness.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.