aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2011-01-06 18:25:37 +0000
committerBlue Swirl <blauwirbel@gmail.com>2011-01-06 18:25:37 +0000
commit71df0eeb98a1ecff7770aa486faf08a8c1049745 (patch)
tree05b57fa4e0d22abded5f2a5fa2aaac3f6839af42
parent3fbb33d08d63908849a037ad6432cb12c763dd12 (diff)
block: delete a write-only variable
Avoid a warning with GCC 4.6.0: /src/qemu/block.c: In function 'bdrv_img_create': /src/qemu/block.c:2862:25: error: variable 'fmt' set but not used [-Werror=unused-but-set-variable] CC: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
-rw-r--r--block.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/block.c b/block.c
index 9b5e9e11fe..ff2795b1e9 100644
--- a/block.c
+++ b/block.c
@@ -2859,13 +2859,8 @@ int bdrv_img_create(const char *filename, const char *fmt,
if (get_option_parameter(param, BLOCK_OPT_SIZE)->value.n == -1) {
if (backing_file && backing_file->value.s) {
uint64_t size;
- const char *fmt = NULL;
char buf[32];
- if (backing_fmt && backing_fmt->value.s) {
- fmt = backing_fmt->value.s;
- }
-
bs = bdrv_new("");
ret = bdrv_open(bs, backing_file->value.s, flags, drv);