svn commit: r323208 - stable/11/sys/dev/hptmv
Ryan Libby
rlibby at FreeBSD.org
Wed Sep 6 06:57:20 UTC 2017
Author: rlibby
Date: Wed Sep 6 06:57:18 2017
New Revision: 323208
URL: https://svnweb.freebsd.org/changeset/base/323208
Log:
MFC r320714:
hptmv: avoid gcc variably-modified warning
Modified:
stable/11/sys/dev/hptmv/vdevice.h
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/dev/hptmv/vdevice.h
==============================================================================
--- stable/11/sys/dev/hptmv/vdevice.h Wed Sep 6 06:51:52 2017 (r323207)
+++ stable/11/sys/dev/hptmv/vdevice.h Wed Sep 6 06:57:18 2017 (r323208)
@@ -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))
More information about the svn-src-stable
mailing list