Page MenuHomeFreeBSD

D7130.id18176.diff
No OneTemporary

D7130.id18176.diff

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

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)

Event Timeline