[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] New qemu-img convert -B option to preserve the
From: |
Jamie Lokier |
Subject: |
Re: [Qemu-devel] [PATCH] New qemu-img convert -B option to preserve the COW aspect of images and/or re-base them |
Date: |
Tue, 3 Jun 2008 20:40:41 +0100 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Anthony Liguori wrote:
> >+ if (!bs->drv->bdrv_is_allocated) {
> >+ if (sector_num >= bs->total_sectors) {
> >+ *pnum = 0;
> >+ return 0;
> >+ }
> >+ int64_t n = bs->total_sectors - sector_num;
>
> Don't mix declarations with code.
Suggest: compile with "gcc -Wdeclaration-after-statement".
Though, since declarations after statements are supported by GCC 3.0+
(according to "man gcc"), and GCC is required to compile
QEMU... perhaps it's not such a bad thing to allow it/
-- Jamie