Date: Wed, 6 Sep 2017 06:57:18 +0000 (UTC) From: Ryan Libby <rlibby@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323208 - stable/11/sys/dev/hptmv Message-ID: <201709060657.v866vIro002970@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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))
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201709060657.v866vIro002970>