]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Teach it to compiler and analyzer that function `lafe_errc' is no return.
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>
Mon, 9 Nov 2009 10:56:48 +0000 (05:56 -0500)
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>
Mon, 9 Nov 2009 10:56:48 +0000 (05:56 -0500)
Found by Clang Static Analyzer.

SVN-Revision: 1626

libarchive_fe/err.h

index 164e2d38476b5516a0e88cce002e091281ae2c5d..dd79448139166b658e5e7625f1441bd6581961c4 100644 (file)
 #ifndef LAFE_ERR_H
 #define LAFE_ERR_H
 
+#if defined(__GNUC__) && (__GNUC__ > 2 || \
+                          (__GNUC__ == 2 && __GNUC_MINOR__ >= 5))
+#define __LA_DEAD       __attribute__((__noreturn__))
+#else
+#define __LA_DEAD
+#endif
+
 extern const char *lafe_progname;
 
 void   lafe_warnc(int code, const char *fmt, ...);
-void   lafe_errc(int eval, int code, const char *fmt, ...);
+void   lafe_errc(int eval, int code, const char *fmt, ...) __LA_DEAD;
 
 #endif