summaryrefslogtreecommitdiff
path: root/src/VBox/VMM/VMMR3/PDMUsb.cpp
diff options
context:
space:
mode:
authorvboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f>2018-07-12 21:06:33 +0000
committervboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f>2018-07-12 21:06:33 +0000
commit639b95a4fd23d483db9aa2cde0141dfe6505b865 (patch)
tree4215101939c8681d33bce4666af0c8b6a602ff53 /src/VBox/VMM/VMMR3/PDMUsb.cpp
parent8736f7453c8f053d64679ab639bf6a011ce165ab (diff)
downloadVirtualBox-svn-639b95a4fd23d483db9aa2cde0141dfe6505b865.tar.gz
*: Made RT_UOFFSETOF, RT_OFFSETOF, RT_UOFFSETOF_ADD and RT_OFFSETOF_ADD work like __builtin_offsetof() and require compile time resolvable requests, adding RT_UOFFSETOF_DYN for the dynamic questions that can only be answered at runtime.
git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@73097 cfe28804-0f27-0410-a406-dd0f0b0b656f
Diffstat (limited to 'src/VBox/VMM/VMMR3/PDMUsb.cpp')
-rw-r--r--src/VBox/VMM/VMMR3/PDMUsb.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/VBox/VMM/VMMR3/PDMUsb.cpp b/src/VBox/VMM/VMMR3/PDMUsb.cpp
index 4c57b567644..5bcd4e63e2f 100644
--- a/src/VBox/VMM/VMMR3/PDMUsb.cpp
+++ b/src/VBox/VMM/VMMR3/PDMUsb.cpp
@@ -283,7 +283,7 @@ int pdmR3UsbLoadModules(PVM pVM)
{
LogFlow(("pdmR3UsbLoadModules:\n"));
- AssertRelease(!(RT_OFFSETOF(PDMUSBINS, achInstanceData) & 15));
+ AssertRelease(!(RT_UOFFSETOF(PDMUSBINS, achInstanceData) & 15));
AssertRelease(sizeof(pVM->pdm.s.pUsbInstances->Internal.s) <= sizeof(pVM->pdm.s.pUsbInstances->Internal.padding));
/*
@@ -608,7 +608,7 @@ static int pdmR3UsbCreateDevice(PVM pVM, PPDMUSBHUB pHub, PPDMUSB pUsbDev, int i
/*
* Allocate the device instance.
*/
- size_t cb = RT_OFFSETOF(PDMUSBINS, achInstanceData[pUsbDev->pReg->cbInstance]);
+ size_t cb = RT_UOFFSETOF_DYN(PDMUSBINS, achInstanceData[pUsbDev->pReg->cbInstance]);
cb = RT_ALIGN_Z(cb, 16);
PPDMUSBINS pUsbIns;
rc = MMR3HeapAllocZEx(pVM, MM_TAG_PDM_USB, cb, (void **)&pUsbIns);