]> git.proxmox.com Git - mirror_qemu.git/commit - block/raw-posix.c
block/raw-posix: fix compilation warning on OSX
authorDenis V. Lunev <den@openvz.org>
Thu, 12 Feb 2015 05:35:49 +0000 (08:35 +0300)
committerKevin Wolf <kwolf@redhat.com>
Mon, 9 Mar 2015 10:11:59 +0000 (11:11 +0100)
commita6dcf097fad2773fdee9ea12f8452dcc259e9ee1
tree51cb54cfe6c64d9380ff0146e3a9d3c093fdddfb
parent876eb1b0cc2b04927739cba10e4e73e8b990d65e
block/raw-posix: fix compilation warning on OSX

block/raw-posix.c:947:19: warning: unused variable 's' [-Wunused-variable]
    BDRVRawState *s = aiocb->bs->opaque;

This variable is used only when on of the following macros are defined
CONFIG_XFS, CONFIG_FALLOCATE, CONFIG_FALLOCATE_PUNCH_HOLE or
CONFIG_FALLOCATE_ZERO_RANGE. Fortunately, CONFIG_FALLOCATE_PUNCH_HOLE
and CONFIG_FALLOCATE_ZERO_RANGE could be defined only along with
CONFIG_FALLOCATE. Therefore checking for CONFIG_XFS or CONFIG_FALLOCATE
would be enough.

Signed-off-by: Denis V. Lunev <den@openvz.org>
CC: Peter Maydell <peter.maydell@linaro.org>
CC: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/raw-posix.c