summaryrefslogtreecommitdiffstats
path: root/hw/xen_disk.c
diff options
context:
space:
mode:
authorBlue Swirl2010-04-25 20:35:52 +0200
committerBlue Swirl2010-04-25 20:35:52 +0200
commit9678d9501bc5f2e6e06170013dec8667057c3b62 (patch)
tree98a3d703b5db9b598a639fa672bbe159a85b07c4 /hw/xen_disk.c
parentusb: remove dead assignments, spotted by clang analyzer (diff)
downloadqemu-9678d9501bc5f2e6e06170013dec8667057c3b62.tar.gz
qemu-9678d9501bc5f2e6e06170013dec8667057c3b62.tar.xz
qemu-9678d9501bc5f2e6e06170013dec8667057c3b62.zip
Remove dead assignments in various common files, spotted by clang analyzer
Value stored is never read. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw/xen_disk.c')
-rw-r--r--hw/xen_disk.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/hw/xen_disk.c b/hw/xen_disk.c
index 95017a1f5c..9a466f3cc1 100644
--- a/hw/xen_disk.c
+++ b/hw/xen_disk.c
@@ -575,7 +575,7 @@ static void blk_alloc(struct XenDevice *xendev)
static int blk_init(struct XenDevice *xendev)
{
struct XenBlkDev *blkdev = container_of(xendev, struct XenBlkDev, xendev);
- int index, mode, qflags, have_barriers, info = 0;
+ int index, qflags, have_barriers, info = 0;
char *h;
/* read xenstore entries */
@@ -609,10 +609,8 @@ static int blk_init(struct XenDevice *xendev)
/* read-only ? */
if (strcmp(blkdev->mode, "w") == 0) {
- mode = O_RDWR;
qflags = BDRV_O_RDWR;
} else {
- mode = O_RDONLY;
qflags = 0;
info |= VDISK_READONLY;
}