svn commit: r323208 - stable/11/sys/dev/hptmv

Ryan Libby rlibby at freebsd.org
Wed Sep 6 16:09:23 UTC 2017


On Tue, Sep 5, 2017 at 11:57 PM, Ryan Libby <rlibby at freebsd.org> wrote:
> 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
>

PR: 211540

> 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))
>
> _______________________________________________
> svn-src-all at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/svn-src-all
> To unsubscribe, send any mail to "svn-src-all-unsubscribe at freebsd.org"


More information about the svn-src-all mailing list