Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F165011317
D7130.id18176.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D7130.id18176.diff
View Options
Index: bhyverun.h
===================================================================
--- bhyverun.h
+++ bhyverun.h
@@ -29,10 +29,8 @@
#ifndef _FBSDRUN_H_
#define _FBSDRUN_H_
-#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
#define VMEXIT_CONTINUE (0)
Index: pci_emul.c
===================================================================
--- pci_emul.c
+++ pci_emul.c
@@ -31,9 +31,9 @@
#include <sys/param.h>
#include <sys/linker_set.h>
-#include <sys/errno.h>
#include <ctype.h>
+#include <errno.h>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
@@ -755,16 +755,10 @@
return (err);
}
-#ifdef __GNU_C__
-#define WRAPPED_CTASSERT(x) CTASSERT(x) __unused
-#else
-#define WRAPPED_CTASSERT(x) CTASSERT(x)
-#endif
+CTASSERT(sizeof(struct msicap) == 14);
+CTASSERT(sizeof(struct msixcap) == 12);
+CTASSERT(sizeof(struct pciecap) == 60);
-WRAPPED_CTASSERT(sizeof(struct msicap) == 14);
-WRAPPED_CTASSERT(sizeof(struct msixcap) == 12);
-WRAPPED_CTASSERT(sizeof(struct pciecap) == 60);
-
void
pci_populate_msicap(struct msicap *msicap, int msgnum, int nextptr)
{
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Aug 6, 8:02 AM (9 h, 1 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
36100152
Default Alt Text
D7130.id18176.diff (1 KB)
Attached To
Mode
D7130: Fix CTASSERT issue in a more clean way
Attached
Detach File
Event Timeline
Log In to Comment