Module Name: src Committed By: joerg Date: Fri Apr 17 14:59:23 UTC 2020
Modified Files: src/sys/sys: cdefs.h Log Message: Don't use typedef at all for __CTASSERT1. To generate a diff of this commit: cvs rdiff -u -r1.152 -r1.153 src/sys/sys/cdefs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/sys/cdefs.h diff -u src/sys/sys/cdefs.h:1.152 src/sys/sys/cdefs.h:1.153 --- src/sys/sys/cdefs.h:1.152 Fri Apr 17 14:33:42 2020 +++ src/sys/sys/cdefs.h Fri Apr 17 14:59:23 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: cdefs.h,v 1.152 2020/04/17 14:33:42 kamil Exp $ */ +/* $NetBSD: cdefs.h,v 1.153 2020/04/17 14:59:23 joerg Exp $ */ /* * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. @@ -172,10 +172,10 @@ __CONCAT(_,b)) #endif #define __CTASSERT0(x, y, z) __CTASSERT1(x, y, z) -#define __CTASSERT1(x, y, z) \ - typedef struct y ## z ## _struct __unused { \ - unsigned int y ## z : /*CONSTCOND*/(x) ? 1 : -1; \ - } y ## z ## _struct __unused +#define __CTASSERT1(x, y, z) \ + struct y ## z ## _struct { \ + unsigned int y ## z : /*CONSTCOND*/(x) ? 1 : -1; \ + } /* * The following macro is used to remove const cast-away warnings