hptmv: avoid gcc variably-modified warning

gcc produces a "variably modified X at file scope" warning for
structures that use these size definitions.

PR:		211540
Reviewed by:	markj
Approved by:	markj (mentor)
Sponsored by:	Dell EMC Isilon
Differential revision:	https://reviews.freebsd.org/D11416
This commit is contained in:
Ryan Libby 2017-07-06 05:32:22 +00:00
parent 423ec132f5
commit 32981ab80a

View file

@ -77,8 +77,8 @@ typedef struct _VDevice
} VDevice;
#define ARRAY_VDEV_SIZE ((UINT)(ULONG_PTR)&((PVDevice)0)->u+sizeof(RaidArray))
#define DISK_VDEV_SIZE ((UINT)(ULONG_PTR)&((PVDevice)0)->u+sizeof(Device))
#define ARRAY_VDEV_SIZE (offsetof(VDevice, u) + sizeof(RaidArray))
#define DISK_VDEV_SIZE (offsetof(VDevice, u) + sizeof(Device))
#define Map2pVDevice(pDev) ((PVDevice)((UINT_PTR)pDev - (UINT)(UINT_PTR)&((PVDevice)0)->u.disk))