Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Mar 2018 23:46:27 +0000 (UTC)
From:      Conrad Meyer <cem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r331331 - head/stand/common
Message-ID:  <201803212346.w2LNkRhs071019@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cem
Date: Wed Mar 21 23:46:26 2018
New Revision: 331331
URL: https://svnweb.freebsd.org/changeset/base/331331

Log:
  Apply r228478 (CTASSERT => _Static_assert()) to stand bootstrap.h
  
  Reported by:	GCC (it doesn't like the unused array)
  Sponsored by:	Dell EMC Isilon

Modified:
  head/stand/common/bootstrap.h

Modified: head/stand/common/bootstrap.h
==============================================================================
--- head/stand/common/bootstrap.h	Wed Mar 21 23:45:48 2018	(r331330)
+++ head/stand/common/bootstrap.h	Wed Mar 21 23:46:26 2018	(r331331)
@@ -330,10 +330,8 @@ void	dev_cleanup(void);
 
 time_t	time(time_t *tloc);
 
-#ifndef CTASSERT                /* Allow lint to override */
-#define CTASSERT(x)             _CTASSERT(x, __LINE__)
-#define _CTASSERT(x, y)         __CTASSERT(x, y)
-#define __CTASSERT(x, y)        typedef char __assert ## y[(x) ? 1 : -1]
+#ifndef CTASSERT
+#define	CTASSERT(x)	_Static_assert(x, "compile-time assertion failed")
 #endif
 
 #endif /* !_BOOTSTRAP_H_ */



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