'buf' is not used actually, so remove it and related snprintf() statement.
Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
if (backing_file) {
BlockDriverState *bs;
uint64_t size;
- char buf[32];
int back_flags;
/* backing files always opened read-only */
bdrv_get_geometry(bs, &size);
size *= 512;
- snprintf(buf, sizeof(buf), "%" PRId64, size);
qemu_opt_set_number(opts, BLOCK_OPT_SIZE, size);
bdrv_unref(bs);