From 70be5ca73466d64cc932141f35c74fbc75ae1a55 Mon Sep 17 00:00:00 2001 From: Conrad Meyer Date: Wed, 21 Mar 2018 23:46:26 +0000 Subject: [PATCH] Apply r228478 (CTASSERT => _Static_assert()) to stand bootstrap.h Reported by: GCC (it doesn't like the unused array) Sponsored by: Dell EMC Isilon --- stand/common/bootstrap.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/stand/common/bootstrap.h b/stand/common/bootstrap.h index 56d399e4990d..7d9b9b4d7566 100644 --- a/stand/common/bootstrap.h +++ b/stand/common/bootstrap.h @@ -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_ */