[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 18 of 18] tools/blktap+blktap2: fix build errors caused by Werror, remove unused variables



# HG changeset patch
# User Olaf Hering <olaf@xxxxxxxxx>
# Date 1333397703 -7200
# Node ID 33af0a492bf7d2d682fe87f6a0a1501efc187508
# Parent  a85817bc44e57a805afffc3e91d5bf7051a361e0
tools/blktap+blktap2: fix build errors caused by Werror, remove unused variables

-O2 -Wall -Werror triggers these warnings below.
The patch removes all listed local variables, a few static arrays in
header files will be changed in another patch.

xenbus.c: In function 'ueblktap_setup':
xenbus.c:325:6: warning: unused variable 'len' [-Wunused-variable]
xenbus.c:324:25: warning: unused variable 'dev' [-Wunused-variable]
xenbus.c: In function 'ueblktap_probe':
xenbus.c:453:11: warning: unused variable 'blkif' [-Wunused-variable]
xenbus.c:451:42: warning: unused variable 'p' [-Wunused-variable]
--
xs_api.c: In function 'xs_gather':
xs_api.c:64:19: warning: unused variable 'i' [-Wunused-variable]
xs_api.c:64:15: warning: unused variable 'num' [-Wunused-variable]
xs_api.c:63:16: warning: unused variable 'e' [-Wunused-variable]
xs_api.c: In function 'convert_dev_name_to_num':
xs_api.c:216:6: warning: unused variable 'maj' [-Wunused-variable]
xs_api.c: In function 'xs_fire_next_watch':
xs_api.c:344:6: warning: unused variable 'er' [-Wunused-variable]
--
blktapctrl.c: In function 'del_disktype':
blktapctrl.c:257:43: warning: unused variable 'close' [-Wunused-variable]
blktapctrl.c:257:32: warning: unused variable 'count' [-Wunused-variable]
blktapctrl.c: In function 'write_msg':
blktapctrl.c:301:11: warning: unused variable 'seed' [-Wunused-variable]
blktapctrl.c:300:19: warning: unused variable 'img' [-Wunused-variable]
blktapctrl.c: In function 'read_msg':
blktapctrl.c:411:25: warning: unused variable 'len' [-Wunused-variable]
blktapctrl.c:410:8: warning: unused variable 'p' [-Wunused-variable]
blktapctrl.c: In function 'blktapctrl_new_blkif':
blktapctrl.c:656:19: warning: unused variable 'wrctldev' [-Wunused-variable]
blktapctrl.c:656:8: warning: unused variable 'rdctldev' [-Wunused-variable]
blktapctrl.c:655:45: warning: unused variable 'new' [-Wunused-variable]
blktapctrl.c:655:29: warning: unused variable 'fd_write' [-Wunused-variable]
blktapctrl.c:655:20: warning: unused variable 'fd_read' [-Wunused-variable]
blktapctrl.c: In function 'open_ctrl_socket':
blktapctrl.c:765:17: warning: unused variable 'timeout' [-Wunused-variable]
blktapctrl.c:764:9: warning: unused variable 'socks' [-Wunused-variable]
blktapctrl.c: In function 'main':
blktapctrl.c:835:26: warning: unused variable 'xs_fd' [-Wunused-variable]
blktapctrl.c:834:17: warning: unused variable 'ctlinfo' [-Wunused-variable]
blktapctrl.c:833:8: warning: unused variable 'devname' [-Wunused-variable]
--
tapdisk.c: In function 'daemonize':
tapdisk.c:65:6: warning: unused variable 'i' [-Wunused-variable]
tapdisk.c: In function 'add_fd_entry':
tapdisk.c:157:6: warning: unused variable 'i' [-Wunused-variable]
tapdisk.c: In function 'read_msg':
tapdisk.c:372:36: warning: unused variable 'io_fd' [-Wunused-variable]
tapdisk.c:372:27: warning: unused variable 'tap_fd' [-Wunused-variable]
tapdisk.c: In function 'do_cow_read':
tapdisk.c:596:11: warning: unused variable 'early' [-Wunused-variable]
tapdisk.c: In function 'get_io_request':
tapdisk.c:647:7: warning: unused variable 'done' [-Wunused-variable]
tapdisk.c:634:6: warning: unused variable 'early' [-Wunused-variable]
tapdisk.c:629:24: warning: unused variable 'rc' [-Wunused-variable]
tapdisk.c: In function 'main':
tapdisk.c:769:18: warning: unused variable 'writefds' [-Wunused-variable]
tapdisk.c:768:8: warning: unused variable 'p' [-Wunused-variable]
tapdisk.c:767:11: warning: unused variable 'msglen' [-Wunused-variable]
tapdisk.c:767:6: warning: unused variable 'len' [-Wunused-variable]
--
block-aio.c: In function 'get_image_info':
block-aio.c:67:17: warning: unused variable 'statBuf' [-Wunused-variable]
block-aio.c:66:16: warning: unused variable 'total_size' [-Wunused-variable]
block-aio.c:65:7: warning: unused variable 'size' [-Wunused-variable]
block-aio.c: In function 'tdaio_open':
block-aio.c:123:6: warning: unused variable 'i' [-Wunused-variable]
--
block-sync.c: In function 'get_image_info':
block-sync.c:59:17: warning: unused variable 'statBuf' [-Wunused-variable]
block-sync.c:58:16: warning: unused variable 'total_size' [-Wunused-variable]
block-sync.c:57:7: warning: unused variable 'size' [-Wunused-variable]
block-sync.c: In function 'tdsync_open':
block-sync.c:114:6: warning: unused variable 'i' [-Wunused-variable]
--
block-ram.c: In function 'get_image_info':
block-ram.c:69:17: warning: unused variable 'statBuf' [-Wunused-variable]
block-ram.c:68:16: warning: unused variable 'total_size' [-Wunused-variable]
block-ram.c:67:7: warning: unused variable 'size' [-Wunused-variable]
block-ram.c: In function 'tdram_queue_read':
block-ram.c:228:22: warning: unused variable 'prv' [-Wunused-variable]
block-ram.c: In function 'tdram_queue_write':
block-ram.c:242:22: warning: unused variable 'prv' [-Wunused-variable]
block-ram.c: In function 'tdram_close':
block-ram.c:260:22: warning: unused variable 'prv' [-Wunused-variable]
--
block-qcow.c: In function 'tdqcow_open':
block-qcow.c:725:10: warning: unused variable 'len' [-Wunused-variable]
block-qcow.c: In function 'tdqcow_queue_write':
block-qcow.c:1012:6: warning: unused variable 'ret' [-Wunused-variable]
block-qcow.c: In function 'tdqcow_do_callbacks':
block-qcow.c:1102:41: warning: unused variable 'ptr' [-Wunused-variable]
block-qcow.c:1102:13: warning: unused variable 'ret' [-Wunused-variable]
block-qcow.c: In function 'qcow_create':
block-qcow.c:1146:21: warning: unused variable 'adjust' [-Wunused-variable]
--
block-qcow2.c: In function 'qcow_read':
block-qcow2.c:955:32: warning: unused variable 'n1' [-Wunused-variable]
block-qcow2.c: In function 'qcow_queue_write':
block-qcow2.c:1148:17: warning: unused variable 'src_buf' [-Wunused-variable]
block-qcow2.c: In function 'qcow_do_callbacks':
block-qcow2.c:1864:34: warning: unused variable 'ptr' [-Wunused-variable]
block-qcow2.c:1864:6: warning: unused variable 'ret' [-Wunused-variable]
--
tapaio.c: In function 'tap_aio_init':
tapaio.c:186:7: warning: unused variable 'ioidx' [-Wunused-variable]
--
img2qcow.c: In function 'print_bytes':
img2qcow.c:66:7: warning: unused variable 'i' [-Wunused-variable]
img2qcow.c: In function 'get_image_info':
img2qcow.c:107:17: warning: unused variable 'statBuf' [-Wunused-variable]
img2qcow.c:106:16: warning: unused variable 'total_size' [-Wunused-variable]
img2qcow.c:105:7: warning: unused variable 'size' [-Wunused-variable]
--
qcow2raw.c: In function 'print_bytes':
qcow2raw.c:70:7: warning: unused variable 'i' [-Wunused-variable]
qcow2raw.c: In function 'main':
qcow2raw.c:151:24: warning: unused variable 'input' [-Wunused-variable]
qcow2raw.c:151:20: warning: unused variable 'len' [-Wunused-variable]
--
lvm-util.c: In function 'lvm_scan_lvs':
lvm-util.c:221:29: warning: unused variable 'dev' [-Wunused-variable]
--
libvhd.c: In function 'vhd_read_header':
libvhd.c:1031:6: warning: unused variable 'err' [-Wunused-variable]
libvhd.c: In function 'vhd_write_header':
libvhd.c:2011:6: warning: unused variable 'err' [-Wunused-variable]
libvhd.c: In function 'vhd_write_bitmap':
libvhd.c:2146:9: warning: unused variable 'secs' [-Wunused-variable]
libvhd.c: In function '__vhd_io_allocate_block':
libvhd.c:3206:6: warning: unused variable 'i' [-Wunused-variable]
--
libvhd-journal.c: In function 'vhd_journal_update':
libvhd-journal.c:356:8: warning: unused variable 'eof' [-Wunused-variable]
libvhd-journal.c: In function 'vhd_journal_add_metadata':
libvhd-journal.c:610:8: warning: unused variable 'eof' [-Wunused-variable]
libvhd-journal.c: In function 'vhd_journal_create':
libvhd-journal.c:1259:14: warning: unused variable 'stats' [-Wunused-variable]
libvhd-journal.c:1258:8: warning: unused variable 'off' [-Wunused-variable]
libvhd-journal.c:1257:9: warning: unused variable 'size' [-Wunused-variable]
libvhd-journal.c:1256:6: warning: unused variable 'i' [-Wunused-variable]
libvhd-journal.c:1255:8: warning: unused variable 'buf' [-Wunused-variable]
--
vhd-util-read.c: In function 'vhd_print_header':
vhd-util-read.c:73:47: warning: unused variable 'out' [-Wunused-variable]
vhd-util-read.c: In function 'vhd_print_footer':
vhd-util-read.c:108:50: warning: unused variable 'cksm_save' [-Wunused-variable]
--
vhd-util-resize.c: In function 'vhd_dynamic_grow':
vhd-util-resize.c:880:6: warning: unused variable 'i' [-Wunused-variable]
--
vhd-util-set-field.c: In function 'vhd_util_set_field':
vhd-util-set-field.c:40:8: warning: unused variable 'eof' [-Wunused-variable]
--
vhd-util-scan.c: In function 'vhd_util_scan_pretty_allocate_list':
vhd-util-scan.c:118:20: warning: unused variable 'list' [-Wunused-variable]
vhd-util-scan.c: In function 'vhd_util_scan_extract_volume_name':
vhd-util-scan.c:446:6: warning: unused variable 'err' [-Wunused-variable]
vhd-util-scan.c: In function 'vhd_util_scan_get_parent':
vhd-util-scan.c:513:6: warning: unused variable 'i' [-Wunused-variable]
vhd-util-scan.c: In function 'vhd_util_scan_open_volume':
vhd-util-scan.c:681:6: warning: unused variable 'err' [-Wunused-variable]
--
vhd-util-check.c: In function 'vhd_util_check_validate_parent':
vhd-util-check.c:312:11: warning: unused variable 'status' [-Wunused-variable]
vhd-util-check.c: In function 'vhd_util_check':
vhd-util-check.c:928:16: warning: unused variable 'vhd' [-Wunused-variable]
--
libvhd.c: In function 'vhd_read_header':
libvhd.c:1031:6: warning: unused variable 'err' [-Wunused-variable]
libvhd.c: In function 'vhd_write_header':
libvhd.c:2011:6: warning: unused variable 'err' [-Wunused-variable]
libvhd.c: In function 'vhd_write_bitmap':
libvhd.c:2146:9: warning: unused variable 'secs' [-Wunused-variable]
libvhd.c: In function '__vhd_io_allocate_block':
libvhd.c:3206:6: warning: unused variable 'i' [-Wunused-variable]
--
libvhd-journal.c: In function 'vhd_journal_update':
libvhd-journal.c:356:8: warning: unused variable 'eof' [-Wunused-variable]
libvhd-journal.c: In function 'vhd_journal_add_metadata':
libvhd-journal.c:610:8: warning: unused variable 'eof' [-Wunused-variable]
libvhd-journal.c: In function 'vhd_journal_create':
libvhd-journal.c:1259:14: warning: unused variable 'stats' [-Wunused-variable]
libvhd-journal.c:1258:8: warning: unused variable 'off' [-Wunused-variable]
libvhd-journal.c:1257:9: warning: unused variable 'size' [-Wunused-variable]
libvhd-journal.c:1256:6: warning: unused variable 'i' [-Wunused-variable]
libvhd-journal.c:1255:8: warning: unused variable 'buf' [-Wunused-variable]
--
vhd-util-read.c: In function 'vhd_print_header':
vhd-util-read.c:73:47: warning: unused variable 'out' [-Wunused-variable]
vhd-util-read.c: In function 'vhd_print_footer':
vhd-util-read.c:108:50: warning: unused variable 'cksm_save' [-Wunused-variable]
--
vhd-util-resize.c: In function 'vhd_dynamic_grow':
vhd-util-resize.c:880:6: warning: unused variable 'i' [-Wunused-variable]
--
vhd-util-set-field.c: In function 'vhd_util_set_field':
vhd-util-set-field.c:40:8: warning: unused variable 'eof' [-Wunused-variable]
--
vhd-util-scan.c: In function 'vhd_util_scan_pretty_allocate_list':
vhd-util-scan.c:118:20: warning: unused variable 'list' [-Wunused-variable]
vhd-util-scan.c: In function 'vhd_util_scan_extract_volume_name':
vhd-util-scan.c:446:6: warning: unused variable 'err' [-Wunused-variable]
vhd-util-scan.c: In function 'vhd_util_scan_get_parent':
vhd-util-scan.c:513:6: warning: unused variable 'i' [-Wunused-variable]
vhd-util-scan.c: In function 'vhd_util_scan_open_volume':
vhd-util-scan.c:681:6: warning: unused variable 'err' [-Wunused-variable]
--
vhd-util-check.c: In function 'vhd_util_check_validate_parent':
vhd-util-check.c:312:11: warning: unused variable 'status' [-Wunused-variable]
vhd-util-check.c: In function 'vhd_util_check':
vhd-util-check.c:928:16: warning: unused variable 'vhd' [-Wunused-variable]
--
../../lvm/lvm-util.c: In function 'lvm_scan_lvs':
../../lvm/lvm-util.c:221:29: warning: unused variable 'dev' [-Wunused-variable]
--
tapdisk-vbd.c: In function 'tapdisk_vbd_add_block_cache':
tapdisk-vbd.c:202:15: warning: unused variable 'driver' [-Wunused-variable]
tapdisk-vbd.c: In function 'tapdisk_vbd_open_level':
tapdisk-vbd.c:316:15: warning: unused variable 'driver' [-Wunused-variable]
tapdisk-vbd.c: In function '__tapdisk_vbd_open_vdi':
tapdisk-vbd.c:389:20: warning: unused variable 'images' [-Wunused-variable]
tapdisk-vbd.c: In function '__tapdisk_vbd_complete_td_request':
tapdisk-vbd.c:1199:17: warning: unused variable 'image' [-Wunused-variable]
--
tapdisk-control.c: In function 'tapdisk_control_allocate_connection':
tapdisk-control.c:92:9: warning: unused variable 'sz' [-Wunused-variable]
tapdisk-control.c: In function 'tapdisk_control_list':
tapdisk-control.c:255:13: warning: unused variable 'i' [-Wunused-variable]
tapdisk-control.c: In function 'tapdisk_control_attach_vbd':
tapdisk-control.c:317:10: warning: unused variable 'image' [-Wunused-variable]
tapdisk-control.c:316:24: warning: unused variable 'params' [-Wunused-variable]
tapdisk-control.c: In function 'tapdisk_control_create_socket':
tapdisk-control.c:761:11: warning: unused variable 'flags' [-Wunused-variable]
tapdisk-control.c: In function 'tapdisk_control_open':
tapdisk-control.c:832:6: warning: unused variable 'err' [-Wunused-variable]
--
tapdisk-interface.c: In function 'td_load':
tapdisk-interface.c:40:6: warning: unused variable 'err' [-Wunused-variable]
--
tapdisk-server.c: In function 'tapdisk_server_kick_responses':
tapdisk-server.c:183:6: warning: unused variable 'n' [-Wunused-variable]
--
tapdisk-queue.c: In function 'tapdisk_rwio_setup':
tapdisk-queue.c:197:6: warning: unused variable 'err' [-Wunused-variable]
tapdisk-queue.c: In function 'tapdisk_lio_setup':
tapdisk-queue.c:477:9: warning: unused variable 'sz' [-Wunused-variable]
tapdisk-queue.c: In function 'tapdisk_init_queue':
tapdisk-queue.c:611:6: warning: unused variable 'i' [-Wunused-variable]
--
tapdisk-filter.c: In function 'check_data':
tapdisk-filter.c:159:14: warning: unused variable 'sec' [-Wunused-variable]
--
tapdisk-utils.c: In function 'tapdisk_get_image_size':
tapdisk-utils.c:114:6: warning: unused variable 'ret' [-Wunused-variable]
--
io-optimize.c: In function 'io_merge':
io-optimize.c:222:15: warning: unused variable 'ophead' [-Wunused-variable]
--
block-aio.c: In function 'tdaio_get_image_info':
block-aio.c:69:17: warning: unused variable 'statBuf' [-Wunused-variable]
block-aio.c:68:16: warning: unused variable 'total_size' [-Wunused-variable]
block-aio.c:67:7: warning: unused variable 'size' [-Wunused-variable]
--
block-ram.c: In function 'get_image_info':
block-ram.c:60:17: warning: unused variable 'statBuf' [-Wunused-variable]
block-ram.c:59:16: warning: unused variable 'total_size' [-Wunused-variable]
block-ram.c:58:7: warning: unused variable 'size' [-Wunused-variable]
block-ram.c: In function 'tdram_queue_read':
block-ram.c:203:22: warning: unused variable 'prv' [-Wunused-variable]
block-ram.c: In function 'tdram_queue_write':
block-ram.c:214:22: warning: unused variable 'prv' [-Wunused-variable]
block-ram.c: In function 'tdram_close':
block-ram.c:227:22: warning: unused variable 'prv' [-Wunused-variable]
--
block-vhd.c: In function '_vhd_close':
block-vhd.c:729:21: warning: unused variable 'bm' [-Wunused-variable]
block-vhd.c: In function 'vhd_validate_parent':
block-vhd.c:776:14: warning: unused variable 'stats' [-Wunused-variable]
block-vhd.c:775:11: warning: unused variable 'status' [-Wunused-variable]
block-vhd.c: In function 'allocate_block':
block-vhd.c:1383:8: warning: unused variable 'zeros' [-Wunused-variable]
block-vhd.c: In function 'start_new_bitmap_transaction':
block-vhd.c:1863:9: warning: unused variable 'error' [-Wunused-variable]
--
block-log.c: In function 'shmem_open':
block-log.c:220:10: warning: unused variable 'l' [-Wunused-variable]
block-log.c:220:7: warning: unused variable 'i' [-Wunused-variable]
block-log.c: In function 'ctl_kick':
block-log.c:489:22: warning: unused variable 'rspend' [-Wunused-variable]
block-log.c:489:12: warning: unused variable 'rspstart' [-Wunused-variable]
block-log.c: In function 'ctl_request':
block-log.c:560:11: warning: unused variable 'i' [-Wunused-variable]
block-log.c: In function 'tdlog_queue_write':
block-log.c:638:7: warning: unused variable 'rc' [-Wunused-variable]
--
block-qcow.c: In function 'gen_cksum':
block-qcow.c:86:7: warning: unused variable 'i' [-Wunused-variable]
block-qcow.c: In function 'init_aio_state':
block-qcow.c:104:18: warning: unused variable 'bs' [-Wunused-variable]
block-qcow.c:103:9: warning: unused variable 'ret' [-Wunused-variable]
block-qcow.c: In function 'tdqcow_open':
block-qcow.c:868:10: warning: unused variable 'len' [-Wunused-variable]
block-qcow.c: In function 'tdqcow_queue_read':
block-qcow.c:987:19: warning: unused variable 'prv' [-Wunused-variable]
block-qcow.c:985:36: warning: unused variable 'i' [-Wunused-variable]
block-qcow.c:985:6: warning: unused variable 'ret' [-Wunused-variable]
block-qcow.c: In function 'tdqcow_queue_write':
block-qcow.c:1057:19: warning: unused variable 'prv' [-Wunused-variable]
block-qcow.c:1056:16: warning: unused variable 'cb' [-Wunused-variable]
block-qcow.c:1054:36: warning: unused variable 'i' [-Wunused-variable]
block-qcow.c:1054:6: warning: unused variable 'ret' [-Wunused-variable]
block-qcow.c: In function 'qcow_create':
block-qcow.c:1181:21: warning: unused variable 'adjust' [-Wunused-variable]
--
block-remus.c: In function 'ramdisk_start_flush':
block-remus.c:581:19: warning: unused variable 'batchlen' [-Wunused-variable]
block-remus.c:581:9: warning: unused variable 'j' [-Wunused-variable]
block-remus.c:580:6: warning: unused variable 'rc' [-Wunused-variable]
block-remus.c:578:12: warning: unused variable 'key' [-Wunused-variable]
block-remus.c: In function 'primary_do_connect':
block-remus.c:749:6: warning: unused variable 'rc' [-Wunused-variable]
block-remus.c: In function 'remus_client_event':
block-remus.c:1031:6: warning: unused variable 'rc' [-Wunused-variable]
block-remus.c: In function 'backup_queue_read':
block-remus.c:1154:6: warning: unused variable 'i' [-Wunused-variable]
block-remus.c: In function 'backup_queue_write':
block-remus.c:1171:24: warning: unused variable 's' [-Wunused-variable]
block-remus.c: In function 'backup_start':
block-remus.c:1186:6: warning: unused variable 'fd' [-Wunused-variable]
block-remus.c: In function 'server_do_wreq':
block-remus.c:1203:11: warning: unused variable 'rc' [-Wunused-variable]
block-remus.c:1201:24: warning: unused variable 'twreq' [-Wunused-variable]
block-remus.c: In function 'get_args':
block-remus.c:1433:9: warning: unused variable 'ipver' [-Wunused-variable]
block-remus.c:1432:9: warning: unused variable 'addr' [-Wunused-variable]
--
td.c: In function 'td_coalesce':
td.c:360:15: warning: unused variable 'pname' [-Wunused-variable]
td.c: In function 'td_set_field':
td.c:548:11: warning: unused variable 'i' [-Wunused-variable]
td.c:548:6: warning: unused variable 'ret' [-Wunused-variable]
--
tapdisk-client.c: In function 'writelog_map':
tapdisk-client.c:244:9: warning: unused variable 'shm' [-Wunused-variable]
--
tapdisk-stream.c: In function 'main':
tapdisk-stream.c:550:21: warning: unused variable 'info' [-Wunused-variable]
--
tapdisk-diff.c: In function 'tapdisk_stream_enqueue2':
tapdisk-diff.c:469:9: warning: unused variable 'blk' [-Wunused-variable]
tapdisk-diff.c:469:6: warning: unused variable 'i' [-Wunused-variable]
tapdisk-diff.c: In function 'main':
tapdisk-diff.c:720:21: warning: unused variable 'info' [-Wunused-variable]
--
lock.c: In function 'main':
lock.c:962:13: warning: unused variable 'dlock' [-Wunused-variable]
--
img2qcow.c: In function 'print_bytes':
img2qcow.c:84:7: warning: unused variable 'i' [-Wunused-variable]
img2qcow.c: In function 'get_image_info':
img2qcow.c:117:17: warning: unused variable 'statBuf' [-Wunused-variable]
img2qcow.c:116:16: warning: unused variable 'total_size' [-Wunused-variable]
img2qcow.c:115:7: warning: unused variable 'size' [-Wunused-variable]
img2qcow.c: In function 'main':
img2qcow.c:167:17: warning: unused variable 'timeout' [-Wunused-variable]
img2qcow.c: At top level:
img2qcow.c:73:17: warning: 'read_idx' defined but not used [-Wunused-variable]
img2qcow.c:76:27: warning: 'written' defined but not used [-Wunused-variable]
--
qcow2raw.c: In function 'print_bytes':
qcow2raw.c:90:7: warning: unused variable 'i' [-Wunused-variable]
qcow2raw.c: In function 'send_read_responses':
qcow2raw.c:147:6: warning: unused variable 'ret' [-Wunused-variable]
qcow2raw.c: In function 'main':
qcow2raw.c:201:24: warning: unused variable 'input' [-Wunused-variable]
qcow2raw.c:201:20: warning: unused variable 'len' [-Wunused-variable]
qcow2raw.c: At top level:
qcow2raw.c:74:17: warning: 'read_idx' defined but not used [-Wunused-variable]
--
tap-ctl-list.c: In function 'tap_ctl_alloc_list':
tap-ctl-list.c:116:22: warning: unused variable 'entry' [-Wunused-variable]
tap-ctl-list.c: In function '_tap_ctl_find_tapdisks':
tap-ctl-list.c:274:7: warning: unused variable 'n' [-Wunused-variable]
--
tap-ctl-spawn.c: In function '__tap_ctl_spawn':
tap-ctl-spawn.c:42:6: warning: unused variable 'err' [-Wunused-variable]
--
tap-ctl-check.c: In function 'tap_ctl_check':
tap-ctl-check.c:68:8: warning: unused variable 'uid' [-Wunused-variable]
--
tap-ctl-list.c: In function 'tap_ctl_alloc_list':
tap-ctl-list.c:116:22: warning: unused variable 'entry' [-Wunused-variable]
tap-ctl-list.c: In function '_tap_ctl_find_tapdisks':
tap-ctl-list.c:274:7: warning: unused variable 'n' [-Wunused-variable]
--
tap-ctl-spawn.c: In function '__tap_ctl_spawn':
tap-ctl-spawn.c:42:6: warning: unused variable 'err' [-Wunused-variable]
--
tap-ctl-check.c: In function 'tap_ctl_check':
tap-ctl-check.c:68:8: warning: unused variable 'uid' [-Wunused-variable]

Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>

diff -r a85817bc44e5 -r 33af0a492bf7 tools/blktap/drivers/blktapctrl.c
--- a/tools/blktap/drivers/blktapctrl.c
+++ b/tools/blktap/drivers/blktapctrl.c
@@ -254,7 +254,7 @@ static int qemu_instance_has_disks(pid_t
 static int del_disktype(blkif_t *blkif)
 {
        driver_list_entry_t *entry, **pprev;
-       int type = blkif->drivertype, count = 0, close = 0;
+       int type = blkif->drivertype;
 
        if (type > MAX_DISK_TYPES)
                return 1;
@@ -297,8 +297,7 @@ static int write_msg(int fd, int msgtype
        int msglen, len, ret;
        fd_set writefds;
        struct timeval timeout;
-       image_t *image, *img;
-       uint32_t seed;
+       image_t *image;
 
        blkif = (blkif_t *)ptr;
        blk = blkif->info;
@@ -407,8 +406,8 @@ static int read_msg(int fd, int msgtype,
        blkif_info_t *blk;
        msg_hdr_t *msg;
        msg_pid_t *msg_pid;
-       char *p, *buf;
-       int msglen = MSG_SIZE, len, ret;
+       char *buf;
+       int msglen = MSG_SIZE, ret;
        fd_set readfds;
        struct timeval timeout;
        image_t *image, *img;
@@ -652,8 +651,8 @@ fail:
 static int blktapctrl_new_blkif(blkif_t *blkif)
 {
        blkif_info_t *blk;
-       int major, minor, fd_read, fd_write, type, new;
-       char *rdctldev, *wrctldev, *ptr;
+       int major, minor, type;
+       char *ptr;
        image_t *image;
        blkif_t *exist = NULL;
        static uint16_t next_cookie = 0;
@@ -761,8 +760,6 @@ int open_ctrl_socket(char *devname)
 {
        int ret;
        int ipc_fd;
-       fd_set socks;
-       struct timeval timeout;
 
        if (mkdir(BLKTAP_CTRL_DIR, 0755) == 0)
                DPRINTF("Created %s directory\n", BLKTAP_CTRL_DIR);
@@ -830,9 +827,7 @@ static void write_pidfile(long pid)
 
 int main(int argc, char *argv[])
 {
-       char *devname;
-       tapdev_info_t *ctlinfo;
-       int tap_pfd, store_pfd, xs_fd, ret, timeout, pfd_count, count=0;
+       int tap_pfd, store_pfd, ret, timeout, pfd_count, count=0;
        struct xs_handle *h;
        struct pollfd  pfd[NUM_POLL_FDS];
        pid_t process;
diff -r a85817bc44e5 -r 33af0a492bf7 tools/blktap/drivers/block-aio.c
--- a/tools/blktap/drivers/block-aio.c
+++ b/tools/blktap/drivers/block-aio.c
@@ -62,9 +62,6 @@ struct tdaio_state {
 static int get_image_info(struct td_state *s, int fd)
 {
        int ret;
-       long size;
-       unsigned long total_size;
-       struct statvfs statBuf;
        struct stat stat;
 
        ret = fstat(fd, &stat);
@@ -120,7 +117,7 @@ static inline void init_fds(struct disk_
 /* Open the disk file and initialize aio state. */
 static int tdaio_open (struct disk_driver *dd, const char *name, td_flag_t 
flags)
 {
-       int i, fd, ret = 0, o_flags;
+       int fd, ret = 0, o_flags;
        struct td_state    *s   = dd->td_state;
        struct tdaio_state *prv = (struct tdaio_state *)dd->private;
 
diff -r a85817bc44e5 -r 33af0a492bf7 tools/blktap/drivers/block-qcow.c
--- a/tools/blktap/drivers/block-qcow.c
+++ b/tools/blktap/drivers/block-qcow.c
@@ -722,7 +722,7 @@ static inline void init_fds(struct disk_
 /* Open the disk file and initialize qcow state. */
 static int tdqcow_open (struct disk_driver *dd, const char *name, td_flag_t 
flags)
 {
-       int fd, len, i, shift, ret, size, l1_table_size, o_flags, 
l1_table_block;
+       int fd, i, shift, ret, size, l1_table_size, o_flags, l1_table_block;
        int max_aio_reqs;
        struct td_state     *bs = dd->td_state;
        struct tdqcow_state *s  = (struct tdqcow_state *)dd->private;
@@ -1009,7 +1009,7 @@ static int tdqcow_queue_write(struct dis
                       int id, void *private)
 {
        struct tdqcow_state *s = (struct tdqcow_state *)dd->private;
-       int ret = 0, index_in_cluster, n, i;
+       int index_in_cluster, n, i;
        uint64_t cluster_offset, sec, nr_secs;
 
        sec     = sector;
@@ -1099,7 +1099,7 @@ static int tdqcow_close(struct disk_driv
 
 static int tdqcow_do_callbacks(struct disk_driver *dd, int sid)
 {
-        int ret, i, nr_events, rsp = 0,*ptr;
+        int i, nr_events, rsp = 0;
         struct io_event *ep;
         struct tdqcow_state *prv = (struct tdqcow_state *)dd->private;
 
@@ -1143,7 +1143,7 @@ int qcow_create(const char *filename, ui
                const char *backing_file, int sparse)
 {
        int fd, header_size, backing_filename_len, l1_size, i;
-       int shift, length, adjust, flags = 0, ret = 0;
+       int shift, length, flags = 0, ret = 0;
        QCowHeader header;
        QCowHeader_ext exthdr;
        char backing_filename[PATH_MAX], *ptr;
diff -r a85817bc44e5 -r 33af0a492bf7 tools/blktap/drivers/block-qcow2.c
--- a/tools/blktap/drivers/block-qcow2.c
+++ b/tools/blktap/drivers/block-qcow2.c
@@ -952,7 +952,10 @@ static int qcow_read(struct disk_driver 
                uint8_t *buf, int nb_sectors)
 {
        BDRVQcowState *s = bs->private;
-       int ret, index_in_cluster, n, n1;
+       int ret, index_in_cluster, n;
+#if 0
+       int n1;
+#endif
        uint64_t cluster_offset;
 
        while (nb_sectors > 0) {
@@ -1145,8 +1148,6 @@ static int qcow_queue_write(struct disk_
        BDRVQcowState *s = bs->private;
        int i, n, index_in_cluster;
        uint64_t cluster_offset;
-       const uint8_t *src_buf;
-               
        
        /*Check we can get a lock*/
        for (i = 0; i < nb_sectors; i++) 
@@ -1861,7 +1862,7 @@ static int qcow_do_callbacks(struct disk
 
 static int qcow_do_callbacks(struct disk_driver *dd, int sid)
 {
-       int ret, i, nr_events, rsp = 0,*ptr;
+       int i, nr_events, rsp = 0;
        struct io_event *ep;
        struct BDRVQcowState *prv = (struct BDRVQcowState*)dd->private;
 
diff -r a85817bc44e5 -r 33af0a492bf7 tools/blktap/drivers/block-ram.c
--- a/tools/blktap/drivers/block-ram.c
+++ b/tools/blktap/drivers/block-ram.c
@@ -64,9 +64,6 @@ struct tdram_state {
 static int get_image_info(struct td_state *s, int fd)
 {
        int ret;
-       long size;
-       unsigned long total_size;
-       struct statvfs statBuf;
        struct stat stat;
 
        ret = fstat(fd, &stat);
@@ -225,7 +222,6 @@ static int tdram_queue_read(struct disk_
                      int id, void *private)
 {
        struct td_state    *s   = dd->td_state;
-       struct tdram_state *prv = (struct tdram_state *)dd->private;
        int      size    = nb_sectors * s->sector_size;
        uint64_t offset  = sector * (uint64_t)s->sector_size;
 
@@ -239,7 +235,6 @@ static int tdram_queue_write(struct disk
                      int id, void *private)
 {
        struct td_state    *s   = dd->td_state;
-       struct tdram_state *prv = (struct tdram_state *)dd->private;
        int      size    = nb_sectors * s->sector_size;
        uint64_t offset  = sector * (uint64_t)s->sector_size;
        
@@ -257,8 +252,6 @@ static int tdram_submit(struct disk_driv
 
 static int tdram_close(struct disk_driver *dd)
 {
-       struct tdram_state *prv = (struct tdram_state *)dd->private;
-       
        connections--;
        
        return 0;
diff -r a85817bc44e5 -r 33af0a492bf7 tools/blktap/drivers/block-sync.c
--- a/tools/blktap/drivers/block-sync.c
+++ b/tools/blktap/drivers/block-sync.c
@@ -54,9 +54,6 @@ struct tdsync_state {
 static int get_image_info(struct td_state *s, int fd)
 {
        int ret;
-       long size;
-       unsigned long total_size;
-       struct statvfs statBuf;
        struct stat stat;
 
        ret = fstat(fd, &stat);
@@ -111,7 +108,7 @@ static inline void init_fds(struct disk_
 /* Open the disk file and initialize aio state. */
 static int tdsync_open (struct disk_driver *dd, const char *name, td_flag_t 
flags)
 {
-       int i, fd, ret = 0, o_flags;
+       int fd, ret = 0, o_flags;
        struct td_state     *s   = dd->td_state;
        struct tdsync_state *prv = (struct tdsync_state *)dd->private;
        
diff -r a85817bc44e5 -r 33af0a492bf7 tools/blktap/drivers/img2qcow.c
--- a/tools/blktap/drivers/img2qcow.c
+++ b/tools/blktap/drivers/img2qcow.c
@@ -63,7 +63,7 @@ static char output[25];
 
 static void print_bytes(void *ptr, int length)
 {
-  int i,k;
+  int k;
   unsigned char *p = ptr;
 
     DFPRINTF("Buf dump, length %d:\n",length);
@@ -102,9 +102,6 @@ static inline void LOCAL_FD_SET(fd_set *
 static int get_image_info(struct td_state *s, int fd)
 {
        int ret;
-       long size;
-       unsigned long total_size;
-       struct statvfs statBuf;
        struct stat stat;
 
        ret = fstat(fd, &stat);
diff -r a85817bc44e5 -r 33af0a492bf7 tools/blktap/drivers/qcow2raw.c
--- a/tools/blktap/drivers/qcow2raw.c
+++ b/tools/blktap/drivers/qcow2raw.c
@@ -67,7 +67,7 @@ static char output[25];
 
 static void print_bytes(void *ptr, int length)
 {
-  int i,k;
+  int k;
   unsigned char *p = ptr;
 
     DFPRINTF("Buf dump, length %d:\n",length);
@@ -148,7 +148,7 @@ static int send_read_responses(struct di
 
 int main(int argc, char *argv[])
 {
-       int ret = -1, fd, len,input;
+       int ret = -1, fd;
        uint64_t size;
        fd_set readfds;
        struct timeval timeout;
diff -r a85817bc44e5 -r 33af0a492bf7 tools/blktap/drivers/tapaio.c
--- a/tools/blktap/drivers/tapaio.c
+++ b/tools/blktap/drivers/tapaio.c
@@ -183,7 +183,6 @@ int tap_aio_init(tap_aio_context_t *ctx,
                int max_aio_reqs)
 {
        int i, ret;
-       long ioidx;
 
        ctx->iocb_list = NULL;
        ctx->pending_aio = NULL;
diff -r a85817bc44e5 -r 33af0a492bf7 tools/blktap/drivers/tapdisk.c
--- a/tools/blktap/drivers/tapdisk.c
+++ b/tools/blktap/drivers/tapdisk.c
@@ -62,7 +62,9 @@ static void usage(void)
 
 static void daemonize(void)
 {
+#if 0
        int i;
+#endif
 
        if (getppid()==1) return; /* already a daemon */
        if (fork() != 0) exit(0);
@@ -154,7 +156,6 @@ static inline int LOCAL_FD_SET(fd_set *r
 static inline fd_list_entry_t *add_fd_entry(int tap_fd, struct td_state *s)
 {
        fd_list_entry_t **pprev, *entry;
-       int i;
 
        DPRINTF("Adding fd_list_entry\n");
 
@@ -369,7 +370,7 @@ static int open_disk(struct td_state *s,
 
 static int read_msg(char *buf)
 {
-       int length, len, msglen, tap_fd, *io_fd;
+       int length, len, msglen;
        char *ptr, *path;
        image_t *img;
        msg_hdr_t *msg;
@@ -593,7 +594,7 @@ int do_cow_read(struct disk_driver *dd, 
                int sidx, uint64_t sector, int nr_secs)
 {
        char *page;
-       int ret, early;
+       int ret;
        uint64_t seg_start, seg_end;
        struct td_state  *s = dd->td_state;
        tapdev_info_t *info = s->ring_info;
@@ -626,12 +627,11 @@ int do_cow_read(struct disk_driver *dd, 
 
 static void get_io_request(struct td_state *s)
 {
-       RING_IDX          rp, rc, j, i;
+       RING_IDX          rp, j, i;
        blkif_request_t  *req;
        int idx, nsects, ret;
        uint64_t sector_nr;
        char *page;
-       int early = 0; /* count early completions */
        struct disk_driver *dd = s->disks;
        struct tap_disk *drv   = dd->drv;
        blkif_t *blkif = s->blkif;
@@ -644,7 +644,7 @@ static void get_io_request(struct td_sta
        xen_rmb();
        for (j = info->fe_ring.req_cons; j != rp; j++)
        {
-               int done = 0, start_seg = 0; 
+               int start_seg = 0; 
 
                req = NULL;
                req = RING_GET_REQUEST(&info->fe_ring, j);
@@ -764,9 +764,9 @@ static void get_io_request(struct td_sta
 
 int main(int argc, char *argv[])
 {
-       int len, msglen, ret;
-       char *p, *buf;
-       fd_set readfds, writefds;       
+       int ret;
+       char *buf;
+       fd_set readfds; 
        fd_list_entry_t *ptr;
        struct td_state *s;
        char openlogbuf[128];
diff -r a85817bc44e5 -r 33af0a492bf7 tools/blktap/lib/xenbus.c
--- a/tools/blktap/lib/xenbus.c
+++ b/tools/blktap/lib/xenbus.c
@@ -321,8 +321,8 @@ static int check_image(struct xs_handle 
 static void ueblktap_setup(struct xs_handle *h, char *bepath)
 {
        struct backend_info *be;
-       char *path = NULL, *p,*dev;
-       int len, er, deverr;
+       char *path = NULL, *p;
+       int er, deverr;
        long int pdev = 0, handle;
        blkif_info_t *blk;
        const char* errmsg = NULL;
@@ -449,9 +449,8 @@ static void ueblktap_probe(struct xs_han
                           const char *bepath_im)
 {
        struct backend_info *be = NULL;
-       char *frontend = NULL, *bepath = NULL, *p;
+       char *frontend = NULL, *bepath = NULL;
        int er, len;
-       blkif_t *blkif;
        
        
        bepath = strdup(bepath_im);
diff -r a85817bc44e5 -r 33af0a492bf7 tools/blktap/lib/xs_api.c
--- a/tools/blktap/lib/xs_api.c
+++ b/tools/blktap/lib/xs_api.c
@@ -60,8 +60,8 @@ int xs_gather(struct xs_handle *xs, cons
 {
        va_list ap;
        const char *name;
-       char *path, **e;
-       int ret = 0, num,i;
+       char *path;
+       int ret = 0;
        unsigned int len;
        xs_transaction_t xth;
 
@@ -213,7 +213,7 @@ int convert_dev_name_to_num(char *name) 
        char *p;
        const char *ptr;
        int majors[10] = {3,22,33,34,56,57,88,89,90,91};
-       int maj,i,ret = 0;
+       int i,ret = 0;
        const char p_sd[] = "/dev/sd";
        const char p_hd[] = "/dev/hd";
        const char p_xvd[] = "/dev/xvd";
@@ -341,7 +341,6 @@ int xs_fire_next_watch(struct xs_handle 
        char *token;
        char *node = NULL;
        struct xenbus_watch *w;
-       int er;
        unsigned int num;
        
        res = xs_read_watch(h, &num);
diff -r a85817bc44e5 -r 33af0a492bf7 tools/blktap2/control/tap-ctl-check.c
--- a/tools/blktap2/control/tap-ctl-check.c
+++ b/tools/blktap2/control/tap-ctl-check.c
@@ -65,7 +65,6 @@ int
 tap_ctl_check(const char **msg)
 {
        int err;
-       uid_t uid;
 
        err = tap_ctl_check_blktap(msg);
        if (err)
diff -r a85817bc44e5 -r 33af0a492bf7 tools/blktap2/control/tap-ctl-list.c
--- a/tools/blktap2/control/tap-ctl-list.c
+++ b/tools/blktap2/control/tap-ctl-list.c
@@ -125,8 +125,6 @@ tap_ctl_alloc_list(int n)
        memset(list, 0, size);
 
        for (i = 0; i < n; ++i) {
-               tap_list_t *entry;
-
                entry = malloc(sizeof(tap_list_t));
                if (!entry)
                        goto fail;
@@ -271,7 +269,6 @@ _tap_ctl_find_tapdisks(struct tapdisk **
 
        for (i = 0; i < glbuf.gl_pathc; ++i) {
                struct tapdisk *tap;
-               int n;
 
                tap = &tapv[n_taps];
 
diff -r a85817bc44e5 -r 33af0a492bf7 tools/blktap2/control/tap-ctl-spawn.c
--- a/tools/blktap2/control/tap-ctl-spawn.c
+++ b/tools/blktap2/control/tap-ctl-spawn.c
@@ -39,7 +39,7 @@
 static pid_t
 __tap_ctl_spawn(int *readfd)
 {
-       int err, child, channel[2];
+       int child, channel[2];
        char *tapdisk;
 
        if (pipe(channel)) {
diff -r a85817bc44e5 -r 33af0a492bf7 tools/blktap2/drivers/block-aio.c
--- a/tools/blktap2/drivers/block-aio.c
+++ b/tools/blktap2/drivers/block-aio.c
@@ -64,9 +64,6 @@ struct tdaio_state {
 static int tdaio_get_image_info(int fd, td_disk_info_t *info)
 {
        int ret;
-       long size;
-       unsigned long total_size;
-       struct statvfs statBuf;
        struct stat stat;
 
        ret = fstat(fd, &stat);
diff -r a85817bc44e5 -r 33af0a492bf7 tools/blktap2/drivers/block-log.c
--- a/tools/blktap2/drivers/block-log.c
+++ b/tools/blktap2/drivers/block-log.c
@@ -217,7 +217,7 @@ static char* ctl_makepath(const char* na
 
 static int shmem_open(struct tdlog_state* s, const char* name)
 {
-  int i, l, fd;
+  int fd;
 
   /* device name -> path */
   if (asprintf(&s->shmpath, "/log_%s.wlog", name) < 0) {
@@ -486,7 +486,6 @@ static int ctl_kick(struct tdlog_state* 
   log_request_t req;
 
   /* XXX testing */
-  RING_IDX rspstart, rspend;
   log_response_t rsp;
   struct log_ctlmsg msg;
   int rc;
@@ -557,7 +556,7 @@ static void ctl_request(event_id_t id, c
 {
   struct tdlog_state* s = (struct tdlog_state*)private;
   struct log_ctlmsg msg;
-  int rc, i, fd = -1;
+  int rc, fd = -1;
 
   fd = ctl_find_connection(s, id);
   if (fd == -1)
@@ -635,7 +634,6 @@ static void tdlog_queue_read(td_driver_t
 static void tdlog_queue_write(td_driver_t* driver, td_request_t treq)
 {
   struct tdlog_state* s = (struct tdlog_state*)driver->data;
-  int rc;
 
   writelog_set(s, treq.sec, treq.secs);
   td_forward_request(treq);
diff -r a85817bc44e5 -r 33af0a492bf7 tools/blktap2/drivers/block-qcow.c
--- a/tools/blktap2/drivers/block-qcow.c
+++ b/tools/blktap2/drivers/block-qcow.c
@@ -84,7 +84,6 @@ static int decompress_cluster(struct tdq
 
 uint32_t gen_cksum(char *ptr, int len)
 {
-  int i;
   uint32_t md[4];
 
   /* Generate checksum */
@@ -101,8 +100,7 @@ static void free_aio_state(struct tdqcow
 
 static int init_aio_state(td_driver_t *driver)
 {
-       int i, ret;
-       td_disk_info_t *bs = &(driver->info);
+       int i;
        struct tdqcow_state   *s  = (struct tdqcow_state *)driver->data;
        
         // A segment (i.e. a page) can span multiple clusters
@@ -866,7 +864,7 @@ out:
 /* Open the disk file and initialize qcow state. */
 int tdqcow_open (td_driver_t *driver, const char *name, td_flag_t flags)
 {
-       int fd, len, i, ret, size, o_flags;
+       int fd, i, ret, size, o_flags;
        td_disk_info_t *bs = &(driver->info);
        struct tdqcow_state   *s  = (struct tdqcow_state *)driver->data;
        QCowHeader header;
@@ -983,9 +981,8 @@ fail:
 void tdqcow_queue_read(td_driver_t *driver, td_request_t treq)
 {
        struct tdqcow_state   *s  = (struct tdqcow_state *)driver->data;
-       int ret = 0, index_in_cluster, n, i;
+       int index_in_cluster, n, i;
        uint64_t cluster_offset, sector, nb_sectors;
-       struct qcow_prv* prv;
        td_request_t clone = treq;
        char* buf = treq.buf;
 
@@ -1007,7 +1004,6 @@ void tdqcow_queue_read(td_driver_t *driv
                }
                
                if(!cluster_offset) {
-            int i;
             /* Forward entire request if possible. */
             for(i=0; i<nb_sectors; i++)
                 if(get_cluster_offset(s, (sector+i) << 9, 0, 0, 0, 0))
@@ -1052,10 +1048,8 @@ done:
 void tdqcow_queue_write(td_driver_t *driver, td_request_t treq)
 {
        struct tdqcow_state   *s  = (struct tdqcow_state *)driver->data;
-       int ret = 0, index_in_cluster, n, i;
+       int index_in_cluster, n;
        uint64_t cluster_offset, sector, nb_sectors;
-       td_callback_t cb;
-       struct qcow_prv* prv;
        char* buf = treq.buf;
        td_request_t clone=treq;
 
@@ -1179,7 +1173,7 @@ int qcow_create(const char *filename, ui
                const char *backing_file, int sparse)
 {
        int fd, header_size, backing_filename_len, l1_size, i;
-       int shift, length, adjust, flags = 0, ret = 0;
+       int shift, length, flags = 0, ret = 0;
        QCowHeader header;
        QCowHeader_ext exthdr;
        char backing_filename[PATH_MAX], *ptr;
diff -r a85817bc44e5 -r 33af0a492bf7 tools/blktap2/drivers/block-ram.c
--- a/tools/blktap2/drivers/block-ram.c
+++ b/tools/blktap2/drivers/block-ram.c
@@ -55,9 +55,6 @@ struct tdram_state {
 static int get_image_info(int fd, td_disk_info_t *info)
 {
        int ret;
-       long size;
-       unsigned long total_size;
-       struct statvfs statBuf;
        struct stat stat;
 
        ret = fstat(fd, &stat);
@@ -200,7 +197,6 @@ done:
 
 void tdram_queue_read(td_driver_t *driver, td_request_t treq)
 {
-       struct tdram_state *prv = (struct tdram_state *)driver->data;
        int      size    = treq.secs * driver->info.sector_size;
        uint64_t offset  = treq.sec * (uint64_t)driver->info.sector_size;
 
@@ -211,7 +207,6 @@ void tdram_queue_read(td_driver_t *drive
 
 void tdram_queue_write(td_driver_t *driver, td_request_t treq)
 {
-       struct tdram_state *prv = (struct tdram_state *)driver->data;
        int      size    = treq.secs * driver->info.sector_size;
        uint64_t offset  = treq.sec * (uint64_t)driver->info.sector_size;
        
@@ -224,8 +219,6 @@ void tdram_queue_write(td_driver_t *driv
 
 int tdram_close(td_driver_t *driver)
 {
-       struct tdram_state *prv = (struct tdram_state *)driver->data;
-       
        connections--;
        
        return 0;
diff -r a85817bc44e5 -r 33af0a492bf7 tools/blktap2/drivers/block-remus.c
--- a/tools/blktap2/drivers/block-remus.c
+++ b/tools/blktap2/drivers/block-remus.c
@@ -575,10 +575,8 @@ static int ramdisk_flush(td_driver_t *dr
 static int ramdisk_start_flush(td_driver_t *driver)
 {
        struct tdremus_state *s = (struct tdremus_state *)driver->data;
-       uint64_t* key;
        char* buf;
-       int rc = 0;
-       int i, j, count, batchlen;
+       int i, count;
        uint64_t* sectors;
 
        if (!hashtable_count(s->ramdisk.h)) {
@@ -746,7 +744,6 @@ static int primary_do_connect(struct tdr
 {
        event_id_t id;
        int fd;
-       int rc;
        int flags;
 
        RPRINTF("client connecting to %s:%d...\n", 
inet_ntoa(state->sa.sin_addr), ntohs(state->sa.sin_port));
@@ -1028,7 +1025,6 @@ static void remus_client_event(event_id_
 {
        struct tdremus_state *s = (struct tdremus_state *)private;
        char req[5];
-       int rc;
 
        if (mread(s->stream_fd.fd, req, sizeof(req) - 1) < 0) {
                /* replication stream closed or otherwise broken (timeout, 
reset, &c) */
@@ -1151,7 +1147,6 @@ static inline int server_writes_inflight
 void backup_queue_read(td_driver_t *driver, td_request_t treq)
 {
        struct tdremus_state *s = (struct tdremus_state *)driver->data;
-       int i;
        if(!remus_image)
                remus_image = treq.image;
        
@@ -1168,8 +1163,6 @@ void backup_queue_read(td_driver_t *driv
 /* see above */
 void backup_queue_write(td_driver_t *driver, td_request_t treq)
 {
-       struct tdremus_state *s = (struct tdremus_state *)driver->data;
-
        /* on a server write, we know the domain has failed over. we must 
change our
         * state to unprotected and then have the unprotected queue_write 
function
         * handle the write
@@ -1183,7 +1176,6 @@ void backup_queue_write(td_driver_t *dri
 static int backup_start(td_driver_t *driver)
 {
        struct tdremus_state *s = (struct tdremus_state *)driver->data;
-       int fd;
 
        if (ramdisk_start(driver) < 0)
                return -1;
@@ -1198,9 +1190,8 @@ static int backup_start(td_driver_t *dri
 static int server_do_wreq(td_driver_t *driver)
 {
        struct tdremus_state *s = (struct tdremus_state *)driver->data;
-       static tdremus_wire_t twreq;
        char buf[4096];
-       int len, rc;
+       int len;
 
        char header[sizeof(uint32_t) + sizeof(uint64_t)];
        uint32_t *sectors = (uint32_t *) header;
@@ -1429,9 +1420,6 @@ static int get_args(td_driver_t *driver,
        /* TODO: do something smarter here */
        valid_addr = 0;
        for(servinfo_itr = servinfo; servinfo_itr != NULL; servinfo_itr = 
servinfo_itr->ai_next) {
-               void *addr;
-               char *ipver;
-
                if (servinfo_itr->ai_family == AF_INET) {
                        valid_addr = 1;
                        memset(&state->sa, 0, sizeof(state->sa));
diff -r a85817bc44e5 -r 33af0a492bf7 tools/blktap2/drivers/block-vhd.c
--- a/tools/blktap2/drivers/block-vhd.c
+++ b/tools/blktap2/drivers/block-vhd.c
@@ -726,7 +726,6 @@ _vhd_close(td_driver_t *driver)
 {
        int err;
        struct vhd_state *s;
-       struct vhd_bitmap *bm;
        
        DBG(TLOG_WARN, "vhd_close\n");
        s = (struct vhd_state *)driver->data;
@@ -772,8 +771,6 @@ int
 vhd_validate_parent(td_driver_t *child_driver,
                    td_driver_t *parent_driver, td_flag_t flags)
 {
-       uint32_t status;
-       struct stat stats;
        struct vhd_state *child  = (struct vhd_state *)child_driver->data;
        struct vhd_state *parent;
 
@@ -789,24 +786,6 @@ vhd_validate_parent(td_driver_t *child_d
 
        parent = (struct vhd_state *)parent_driver->data;
 
-       /* 
-        * This check removed because of cases like:
-        *   - parent VHD marked as 'hidden'
-        *   - parent VHD modified during coalesce
-        */
-       /*
-       if (stat(parent->vhd.file, &stats)) {
-               DPRINTF("ERROR stating parent file %s\n", parent->vhd.file);
-               return -errno;
-       }
-
-       if (child->hdr.prt_ts != vhd_time(stats.st_mtime)) {
-               DPRINTF("ERROR: parent file has been modified since "
-                       "snapshot.  Child image no longer valid.\n");
-               return -EINVAL;
-       }
-       */
-
        if (vhd_uuid_compare(&child->vhd.header.prt_uuid, 
&parent->vhd.footer.uuid)) {
                DPRINTF("ERROR: %s: %s, %s: parent uuid has changed since "
                        "snapshot.  Child image no longer valid.\n",
@@ -1380,7 +1359,6 @@ update_bat(struct vhd_state *s, uint32_t
 static int
 allocate_block(struct vhd_state *s, uint32_t blk)
 {
-       char *zeros;
        int err, gap;
        uint64_t offset, size;
        struct vhd_bitmap *bm;
@@ -1860,7 +1838,7 @@ signal_completion(struct vhd_request *li
 static void
 start_new_bitmap_transaction(struct vhd_state *s, struct vhd_bitmap *bm)
 {
-       int i, error = 0;
+       int i;
        struct vhd_transaction *tx;
        struct vhd_request *r, *next;
 
diff -r a85817bc44e5 -r 33af0a492bf7 tools/blktap2/drivers/img2qcow.c
--- a/tools/blktap2/drivers/img2qcow.c
+++ b/tools/blktap2/drivers/img2qcow.c
@@ -70,10 +70,9 @@
 
 static int running = 1, complete = 0;
 static int returned_events = 0, submit_events = 0;
-static uint32_t read_idx = 0;
 td_driver_t *ddqcow;
 td_vbd_t* qcow_vbd;
-static uint64_t prev = 0, written = 0;
+static uint64_t prev = 0;
 static char output[(100/PROGRESS_QUANT) + 5];
 
 extern tapdisk_server_t server;
@@ -81,7 +80,7 @@ extern tapdisk_server_t server;
 
 static void print_bytes(void *ptr, int length)
 {
-  int i,k;
+  int k;
   unsigned char *p = ptr;
 
     DFPRINTF("Buf dump, length %d:\n",length);
@@ -112,9 +111,6 @@ static void debug_output(uint64_t progre
 static int get_image_info(td_disk_info_t *driver, int fd)
 {
        int ret;
-       long size;
-       unsigned long total_size;
-       struct statvfs statBuf;
        struct stat stat;
        uint64_t sector_size=DEFAULT_SECTOR_SIZE;
 
@@ -164,7 +160,6 @@ void send_responses(td_request_t treq, i
 int main(int argc, const char *argv[])
 {
         int ret = -1, fd, len, err;
-       struct timeval timeout;
        uint64_t i;
        char *buf;
        td_request_t treq;
diff -r a85817bc44e5 -r 33af0a492bf7 tools/blktap2/drivers/io-optimize.c
--- a/tools/blktap2/drivers/io-optimize.c
+++ b/tools/blktap2/drivers/io-optimize.c
@@ -219,7 +219,6 @@ io_merge(struct opioctx *ctx, struct ioc
 {
        int i, on_queue;
        struct iocb *io, **q;
-       struct opio *ophead;
        
        if (!num)
                return 0;
diff -r a85817bc44e5 -r 33af0a492bf7 tools/blktap2/drivers/lock.c
--- a/tools/blktap2/drivers/lock.c
+++ b/tools/blktap2/drivers/lock.c
@@ -959,7 +959,6 @@ static void usage(char *prg)
 int main(int argc, char *argv[])
 {
         int status = 0;
-        int dlock;
         char *ptr;
         int force;
         int readonly;
diff -r a85817bc44e5 -r 33af0a492bf7 tools/blktap2/drivers/qcow2raw.c
--- a/tools/blktap2/drivers/qcow2raw.c
+++ b/tools/blktap2/drivers/qcow2raw.c
@@ -71,7 +71,6 @@
 static int running = 1, complete = 0; 
 static int returned_read_events = 0, returned_write_events = 0;
 static int submit_events = 0;
-static uint32_t read_idx = 0;
 td_driver_t *ddqcow, *ddaio;
 td_vbd_t* qcow_vbd, *aio_vbd;
 static uint64_t prev = 0, written = 0;
@@ -87,7 +86,7 @@ struct request_info {
 
 static void print_bytes(void *ptr, int length)
 {
-  int i,k;
+  int k;
   unsigned char *p = ptr;
 
     DFPRINTF("Buf dump, length %d:\n",length);
@@ -144,7 +143,6 @@ static void send_write_responses(td_requ
 
 static void send_read_responses(td_request_t treq, int err)
 {
-       int ret;
         struct request_info* req;
         td_vbd_request_t* vreq;
 
@@ -198,7 +196,7 @@ static void send_read_responses(td_reque
 
 int main(int argc, const char *argv[])
 {
-       int ret = -1, fd, len,input;
+       int ret = -1, fd;
        uint64_t size;
        struct timeval timeout;
        uint64_t i;
diff -r a85817bc44e5 -r 33af0a492bf7 tools/blktap2/drivers/tapdisk-client.c
--- a/tools/blktap2/drivers/tapdisk-client.c
+++ b/tools/blktap2/drivers/tapdisk-client.c
@@ -241,7 +241,6 @@ static int ctl_clear_writes(int fd)
 static int writelog_map(struct writelog* wl)
 {
   int fd;
-  void* shm;
 
   if ((fd = shm_open(wl->shmpath, O_RDWR, 0750)) < 0) {
     BWPRINTF("could not open shared memory at %s: %s", wl->shmpath,
diff -r a85817bc44e5 -r 33af0a492bf7 tools/blktap2/drivers/tapdisk-control.c
--- a/tools/blktap2/drivers/tapdisk-control.c
+++ b/tools/blktap2/drivers/tapdisk-control.c
@@ -89,7 +89,6 @@ static struct tapdisk_control_connection
 tapdisk_control_allocate_connection(int fd)
 {
        struct tapdisk_control_connection *connection;
-       size_t sz;
 
        connection = calloc(1, sizeof(*connection));
        if (!connection) {
@@ -252,7 +251,7 @@ tapdisk_control_list(struct tapdisk_cont
        td_vbd_t *vbd;
        struct list_head *head;
        tapdisk_message_t response;
-       int count, i;
+       int count;
 
        memset(&response, 0, sizeof(response));
        response.type = TAPDISK_MESSAGE_LIST_RSP;
@@ -313,8 +312,6 @@ tapdisk_control_attach_vbd(struct tapdis
        tapdisk_message_t response;
        char *devname;
        td_vbd_t *vbd;
-       struct blktap2_params params;
-       image_t image;
        int minor, err;
 
        /*
@@ -758,7 +755,7 @@ tapdisk_control_mkdir(const char *dir)
 static int
 tapdisk_control_create_socket(char **socket_path)
 {
-       int err, flags;
+       int err;
        struct sockaddr_un saddr;
 
        err = tapdisk_control_mkdir(BLKTAP2_CONTROL_DIR);
@@ -829,8 +826,6 @@ fail:
 int
 tapdisk_control_open(char **path)
 {
-       int err;
-
        tapdisk_control_initialize();
 
        return tapdisk_control_create_socket(path);
diff -r a85817bc44e5 -r 33af0a492bf7 tools/blktap2/drivers/tapdisk-diff.c
--- a/tools/blktap2/drivers/tapdisk-diff.c
+++ b/tools/blktap2/drivers/tapdisk-diff.c
@@ -466,7 +466,6 @@ static void
 tapdisk_stream_enqueue2(void)
 {
        td_vbd_t *vbd;
-       int i, blk;
        struct tapdisk_stream_request *itr;
        struct tapdisk_stream *s = &stream2;
 
@@ -717,7 +716,6 @@ main(int argc, char *argv[])
 {
        int c, err, type1;
        const char *arg1 = NULL, *arg2 = NULL;
-       const disk_info_t *info;
        const char *path1;
 
        err    = 0;
diff -r a85817bc44e5 -r 33af0a492bf7 tools/blktap2/drivers/tapdisk-filter.c
--- a/tools/blktap2/drivers/tapdisk-filter.c
+++ b/tools/blktap2/drivers/tapdisk-filter.c
@@ -156,7 +156,7 @@ static void
 check_data(struct tfilter *filter, int type, struct iocb *io)
 {
        int rw;
-       uint64_t i, sec;
+       uint64_t i;
 
        rw = (io->aio_lio_opcode == IO_CMD_PWRITE);
 
diff -r a85817bc44e5 -r 33af0a492bf7 tools/blktap2/drivers/tapdisk-interface.c
--- a/tools/blktap2/drivers/tapdisk-interface.c
+++ b/tools/blktap2/drivers/tapdisk-interface.c
@@ -37,7 +37,6 @@
 int
 td_load(td_image_t *image)
 {
-       int err;
        td_image_t *shared;
        td_driver_t *driver;
 
diff -r a85817bc44e5 -r 33af0a492bf7 tools/blktap2/drivers/tapdisk-queue.c
--- a/tools/blktap2/drivers/tapdisk-queue.c
+++ b/tools/blktap2/drivers/tapdisk-queue.c
@@ -194,7 +194,6 @@ static int
 tapdisk_rwio_setup(struct tqueue *queue, int size)
 {
        struct rwio *rwio = queue->tio_data;
-       int err;
 
        rwio->aio_events = calloc(size, sizeof(struct io_event));
        if (!rwio->aio_events)
@@ -474,7 +473,6 @@ static int
 tapdisk_lio_setup(struct tqueue *queue, int qlen)
 {
        struct lio *lio = queue->tio_data;
-       size_t sz;
        int err;
 
        lio->event_id = -1;
@@ -608,7 +606,7 @@ int
 tapdisk_init_queue(struct tqueue *queue, int size,
                   int drv, struct tfilter *filter)
 {
-       int i, err;
+       int err;
 
        memset(queue, 0, sizeof(struct tqueue));
 
diff -r a85817bc44e5 -r 33af0a492bf7 tools/blktap2/drivers/tapdisk-server.c
--- a/tools/blktap2/drivers/tapdisk-server.c
+++ b/tools/blktap2/drivers/tapdisk-server.c
@@ -180,7 +180,6 @@ tapdisk_server_submit_tiocbs(void)
 static void
 tapdisk_server_kick_responses(void)
 {
-       int n;
        td_vbd_t *vbd, *tmp;
 
        tapdisk_server_for_each_vbd(vbd, tmp)
diff -r a85817bc44e5 -r 33af0a492bf7 tools/blktap2/drivers/tapdisk-stream.c
--- a/tools/blktap2/drivers/tapdisk-stream.c
+++ b/tools/blktap2/drivers/tapdisk-stream.c
@@ -547,7 +547,6 @@ main(int argc, char *argv[])
 {
        int c, err, type;
        const char *params;
-       const disk_info_t *info;
        const char *path;
        uint64_t count, skip;
        struct tapdisk_stream stream;
diff -r a85817bc44e5 -r 33af0a492bf7 tools/blktap2/drivers/tapdisk-utils.c
--- a/tools/blktap2/drivers/tapdisk-utils.c
+++ b/tools/blktap2/drivers/tapdisk-utils.c
@@ -111,7 +111,6 @@ tapdisk_namedup(char **dup, const char *
 int
 tapdisk_get_image_size(int fd, uint64_t *_sectors, uint32_t *_sector_size)
 {
-       int ret;
        struct stat stat;
        uint64_t sectors;
        uint64_t sector_size;
diff -r a85817bc44e5 -r 33af0a492bf7 tools/blktap2/drivers/tapdisk-vbd.c
--- a/tools/blktap2/drivers/tapdisk-vbd.c
+++ b/tools/blktap2/drivers/tapdisk-vbd.c
@@ -199,7 +199,6 @@ static int
 tapdisk_vbd_add_block_cache(td_vbd_t *vbd)
 {
        int err;
-       td_driver_t *driver;
        td_image_t *cache, *image, *target, *tmp;
 
        target = NULL;
@@ -313,7 +312,6 @@ tapdisk_vbd_open_level(td_vbd_t *vbd, st
        int type, err;
        td_image_t *image;
        td_disk_id_t id;
-       td_driver_t *driver;
 
        name    = params;
        id.name = NULL;
@@ -386,7 +384,6 @@ __tapdisk_vbd_open_vdi(td_vbd_t *vbd, td
        td_flag_t flags;
        td_image_t *tmp;
        td_vbd_driver_info_t *driver_info;
-       struct list_head *images;
        td_disk_info_t *parent_info = NULL;
 
        if (list_empty(&vbd->driver_stack))
@@ -1196,7 +1193,6 @@ __tapdisk_vbd_complete_td_request(td_vbd
                                  td_request_t treq, int res)
 {
        int err;
-    td_image_t *image = treq.image;
 
        err = (res <= 0 ? res : -res);
        vbd->secs_pending  -= treq.secs;
@@ -1216,6 +1212,7 @@ __tapdisk_vbd_complete_td_request(td_vbd
                }
        } else {
 #ifdef MEMSHR
+               td_image_t *image = treq.image;
                if (treq.op == TD_OP_READ
                   && td_flag_test(image->flags, TD_OPEN_RDONLY)) {
                        share_tuple_t hnd = treq.memshr_hnd;
diff -r a85817bc44e5 -r 33af0a492bf7 tools/blktap2/drivers/td.c
--- a/tools/blktap2/drivers/td.c
+++ b/tools/blktap2/drivers/td.c
@@ -357,7 +357,7 @@ int
 td_coalesce(int type, int argc, char *argv[])
 {
        int c, ret, cargc;
-       char *name, *pname, *cargv[3];
+       char *name, *cargv[3];
 
        if (type != TD_TYPE_VHD) {
                fprintf(stderr, "Cannot create snapshot of %s image type\n",
@@ -545,7 +545,7 @@ td_query(int type, int argc, char *argv[
 int
 td_set_field(int type, int argc, char *argv[])
 {
-       int ret, i, c, cargc;
+       int c, cargc;
        struct vdi_field *field;
        char *name, *value, *cargv[7];
 
diff -r a85817bc44e5 -r 33af0a492bf7 tools/blktap2/lvm/lvm-util.c
--- a/tools/blktap2/lvm/lvm-util.c
+++ b/tools/blktap2/lvm/lvm-util.c
@@ -218,7 +218,7 @@ lvm_scan_lvs(struct vg *vg)
                struct lv *lv;
                struct lv_segment seg;
                uint64_t size, seg_start;
-               char type[32], name[256], dev[256], devices[1024];
+               char type[32], name[256], devices[1024];
 
                if (i >= vg->lv_cnt)
                        break;
diff -r a85817bc44e5 -r 33af0a492bf7 tools/blktap2/vhd/lib/libvhd-journal.c
--- a/tools/blktap2/vhd/lib/libvhd-journal.c
+++ b/tools/blktap2/vhd/lib/libvhd-journal.c
@@ -357,7 +357,6 @@ vhd_journal_update(vhd_journal_t *j, off
                   char *buf, size_t size, uint32_t type)
 {
        int err;
-       off_t eof;
        uint64_t *off, off_bak;
        uint32_t *entries;
        vhd_journal_entry_t entry;
@@ -611,7 +610,6 @@ static int
 vhd_journal_add_metadata(vhd_journal_t *j)
 {
        int err;
-       off_t eof;
        vhd_context_t *vhd;
 
        vhd = &j->vhd;
@@ -1256,11 +1254,7 @@ fail:
 int
 vhd_journal_create(vhd_journal_t *j, const char *file, const char *jfile)
 {
-       char *buf;
-       int i, err;
-       size_t size;
-       off_t off;
-       struct stat stats;
+       int err;
 
        memset(j, 0, sizeof(vhd_journal_t));
        j->jfd = -1;
diff -r a85817bc44e5 -r 33af0a492bf7 tools/blktap2/vhd/lib/libvhd.c
--- a/tools/blktap2/vhd/lib/libvhd.c
+++ b/tools/blktap2/vhd/lib/libvhd.c
@@ -1028,7 +1028,6 @@ out:
 int
 vhd_read_header(vhd_context_t *ctx, vhd_header_t *header)
 {
-       int err;
        off_t off;
 
        if (!vhd_type_dynamic(ctx)) {
@@ -2008,7 +2007,6 @@ out:
 int
 vhd_write_header(vhd_context_t *ctx, vhd_header_t *header)
 {
-       int err;
        off_t off;
 
        if (!vhd_type_dynamic(ctx))
@@ -2143,7 +2141,7 @@ vhd_write_bitmap(vhd_context_t *ctx, uin
        int err;
        off_t off;
        uint64_t blk;
-       size_t secs, size;
+       size_t size;
 
        if (!vhd_type_dynamic(ctx))
                return -EINVAL;
@@ -3203,7 +3201,7 @@ __vhd_io_allocate_block(vhd_context_t *c
        char *buf;
        size_t size;
        off_t off, max;
-       int i, err, gap, spp;
+       int err, gap, spp;
 
        spp = getpagesize() >> VHD_SECTOR_SHIFT;
 
diff -r a85817bc44e5 -r 33af0a492bf7 tools/blktap2/vhd/lib/vhd-util-check.c
--- a/tools/blktap2/vhd/lib/vhd-util-check.c
+++ b/tools/blktap2/vhd/lib/vhd-util-check.c
@@ -309,7 +309,6 @@ vhd_util_check_validate_parent(vhd_conte
 {
        const char *msg;
        vhd_context_t parent;
-       uint32_t status;
 
        msg = NULL;
 
@@ -925,7 +924,6 @@ int
 vhd_util_check(int argc, char **argv)
 {
        char *name;
-       vhd_context_t vhd;
        int c, err, ignore, parents;
 
        if (!argc || !argv) {
diff -r a85817bc44e5 -r 33af0a492bf7 tools/blktap2/vhd/lib/vhd-util-read.c
--- a/tools/blktap2/vhd/lib/vhd-util-read.c
+++ b/tools/blktap2/vhd/lib/vhd-util-read.c
@@ -70,7 +70,7 @@ vhd_print_header(vhd_context_t *vhd, vhd
 {
        int err;
        uint32_t  cksm;
-       char      uuid[39], time_str[26], cookie[9], out[512], *name;
+       char      uuid[39], time_str[26], cookie[9], *name;
 
        printf("VHD Header Summary:\n-------------------\n");
 
@@ -105,7 +105,7 @@ static void
 vhd_print_footer(vhd_footer_t *f, int hex)
 {
        uint64_t  c, h, s;
-       uint32_t  ff_maj, ff_min, cr_maj, cr_min, cksm, cksm_save;
+       uint32_t  ff_maj, ff_min, cr_maj, cr_min, cksm;
        char      time_str[26], creator[5], uuid[39], cookie[9];
 
        printf("VHD Footer Summary:\n-------------------\n");
diff -r a85817bc44e5 -r 33af0a492bf7 tools/blktap2/vhd/lib/vhd-util-resize.c
--- a/tools/blktap2/vhd/lib/vhd-util-resize.c
+++ b/tools/blktap2/vhd/lib/vhd-util-resize.c
@@ -877,7 +877,7 @@ vhd_add_bat_entries(vhd_journal_t *journ
 static int
 vhd_dynamic_grow(vhd_journal_t *journal, uint64_t secs)
 {
-       int i, err;
+       int err;
        off_t eob, eom;
        vhd_context_t *vhd;
        vhd_block_t first_block;
diff -r a85817bc44e5 -r 33af0a492bf7 tools/blktap2/vhd/lib/vhd-util-scan.c
--- a/tools/blktap2/vhd/lib/vhd-util-scan.c
+++ b/tools/blktap2/vhd/lib/vhd-util-scan.c
@@ -115,7 +115,6 @@ static int
 vhd_util_scan_pretty_allocate_list(int cnt)
 {
        int i;
-       struct vhd_image *list;
 
        memset(&scan, 0, sizeof(scan));
 
@@ -443,7 +442,6 @@ copy_name(char *dst, const char *src)
 static int
 vhd_util_scan_extract_volume_name(char *dst, const char *src)
 {
-       int err;
        char copy[VHD_MAX_NAME_LEN], *name, *s, *c;
 
        name = strrchr(src, '/');
@@ -510,7 +508,7 @@ found:
 static int
 vhd_util_scan_get_parent(vhd_context_t *vhd, struct vhd_image *image)
 {
-       int i, err;
+       int err;
        vhd_parent_locator_t *loc;
 
        if (!target_vhd(image->target->type)) {
@@ -678,7 +676,6 @@ out:
 static int
 vhd_util_scan_open_volume(vhd_context_t *vhd, struct vhd_image *image)
 {
-       int err;
        struct target *target;
 
        target = image->target;
diff -r a85817bc44e5 -r 33af0a492bf7 tools/blktap2/vhd/lib/vhd-util-set-field.c
--- a/tools/blktap2/vhd/lib/vhd-util-set-field.c
+++ b/tools/blktap2/vhd/lib/vhd-util-set-field.c
@@ -37,7 +37,6 @@ vhd_util_set_field(int argc, char **argv
 {
        long value;
        int err, c;
-       off_t eof;
        vhd_context_t vhd;
        char *name, *field;
 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.