On 6 February 2015 at 16:40, Kevin Wolf <kw...@redhat.com> wrote: > From: "Denis V. Lunev" <d...@openvz.org> > > move code dealing with a block device to a separate function. This will > allow to implement additional processing for ordinary files.
> +static ssize_t handle_aiocb_write_zeroes(RawPosixAIOData *aiocb) > +{ > + BDRVRawState *s = aiocb->bs->opaque; > + > + if (aiocb->aio_type & QEMU_AIO_BLKDEV) { > + return handle_aiocb_write_zeroes_block(aiocb); > + } > + > +#ifdef CONFIG_XFS > + if (s->is_xfs) { > + return xfs_write_zeroes(s, aiocb->aio_offset, aiocb->aio_nbytes); > + } > +#endif > + > + return -ENOTSUP; > +} Hi. This patch has introduced a new compiler warning on OSX: block/raw-posix.c:947:19: warning: unused variable 's' [-Wunused-variable] BDRVRawState *s = aiocb->bs->opaque; ^ and indeed on any host which doesn't define any of CONFIG_XFS, CONFIG_FALLOCATE, CONFIG_FALLOCATE_PUNCH_HOLE or CONFIG_FALLOCATE_ZERO_RANGE. What's your preferred fix? Surrounding the variable declaration with #if defined(CONFIG_XFS) || defined(CONFIG_FALLOCATE) would work but I dunno if some less ugly approach is possible. [I don't yet build OSX with -Werror because we haven't fixed some of the deprecation warnings about the audio APIs, but I would like to eventually...] thanks -- PMM