Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 6 Dec 2008 07:37:14 +0000 (UTC)
From:      Tim Kientzle <kientzle@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r185686 - head/usr.bin/tar
Message-ID:  <200812060737.mB67bEAT087091@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kientzle
Date: Sat Dec  6 07:37:14 2008
New Revision: 185686
URL: http://svn.freebsd.org/changeset/base/185686

Log:
  Only use GCC-specific __dead2 marker when building with GCC.

Modified:
  head/usr.bin/tar/bsdtar.h
  head/usr.bin/tar/bsdtar_platform.h

Modified: head/usr.bin/tar/bsdtar.h
==============================================================================
--- head/usr.bin/tar/bsdtar.h	Sat Dec  6 07:30:40 2008	(r185685)
+++ head/usr.bin/tar/bsdtar.h	Sat Dec  6 07:37:14 2008	(r185686)
@@ -131,7 +131,7 @@ enum {
 
 
 void	bsdtar_errc(struct bsdtar *, int _eval, int _code,
-	    const char *fmt, ...) __dead2;
+	    const char *fmt, ...) __LA_DEAD;
 int	bsdtar_getopt(struct bsdtar *);
 void	bsdtar_warnc(struct bsdtar *, int _code, const char *fmt, ...);
 void	cleanup_exclusions(struct bsdtar *);

Modified: head/usr.bin/tar/bsdtar_platform.h
==============================================================================
--- head/usr.bin/tar/bsdtar_platform.h	Sat Dec  6 07:30:40 2008	(r185685)
+++ head/usr.bin/tar/bsdtar_platform.h	Sat Dec  6 07:37:14 2008	(r185686)
@@ -147,4 +147,14 @@
 #endif
 #endif
 
+/* How to mark functions that don't return. */
+/* This facilitates use of some newer static code analysis tools. */
+#undef __LA_DEAD
+#if defined(__GNUC__) && (__GNUC__ > 2 || \
+			  (__GNUC__ == 2 && __GNUC_MINOR__ >= 5))
+#define	__LA_DEAD	__attribute__((__noreturn__))
+#else
+#define	__LA_DEAD
+#endif
+
 #endif /* !BSDTAR_PLATFORM_H_INCLUDED */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200812060737.mB67bEAT087091>