|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH v2] Fix compilation of checked build
* Redefine XEN_API to __declspec(dllexport) to avoid declaring LogPrintf
and similar symbols in the same binary as dllimport.
* The BUG() macro was not correctly identified as noreturn in checked
builds, causing a warning about uninitialized variables. Set the Value
variable before calling BUG() as a workaround.
Signed-off-by: Tu Dinh <ngoc-tu.dinh@xxxxxxxxxx>
---
src/xen/hypercall.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/xen/hypercall.c b/src/xen/hypercall.c
index 3c68709..e5b2927 100644
--- a/src/xen/hypercall.c
+++ b/src/xen/hypercall.c
@@ -30,6 +30,9 @@
* SUCH DAMAGE.
*/
+#undef XEN_API
+#define XEN_API __declspec(dllexport)
+
#include <ntddk.h>
#include <xen.h>
#include <intrin.h>
@@ -188,6 +191,7 @@ __Hypercall(
Value = hypercall2_vmmcall(ord, arg1, arg2);
break;
default:
+ Value = 0;
BUG("NO HYPERCALL INSTRUCTION");
}
break;
@@ -206,13 +210,14 @@ __Hypercall(
Value = hypercall3_vmmcall(ord, arg1, arg2, arg3);
break;
default:
+ Value = 0;
BUG("NO HYPERCALL INSTRUCTION");
}
break;
}
default:
- ASSERT(FALSE);
Value = 0;
+ BUG("INVALID HYPERCALL ARGUMENT COUNT");
}
va_end(Arguments);
--
2.53.0.windows.1
--
Ngoc Tu Dinh | Vates XCP-ng Developer
XCP-ng & Xen Orchestra - Vates solutions
web: https://vates.tech
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |