Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/sys Don't use typedef at all for __CTASSERT1.



details:   https://anonhg.NetBSD.org/src/rev/35dc8fc1f464
branches:  trunk
changeset: 930927:35dc8fc1f464
user:      joerg <joerg%NetBSD.org@localhost>
date:      Fri Apr 17 14:59:23 2020 +0000

description:
Don't use typedef at all for __CTASSERT1.

diffstat:

 sys/sys/cdefs.h |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (24 lines):

diff -r 8ca6d123916d -r 35dc8fc1f464 sys/sys/cdefs.h
--- a/sys/sys/cdefs.h   Fri Apr 17 14:55:24 2020 +0000
+++ b/sys/sys/cdefs.h   Fri Apr 17 14:59:23 2020 +0000
@@ -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



Home | Main Index | Thread Index | Old Index