From: Jamie Lokier <jamie@shareable.org>
To: qemu-devel@nongnu.org
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 [thread overview]
Message-ID: <20080603194041.GE6899@shareable.org> (raw)
In-Reply-To: <48459641.5040000@codemonkey.ws>
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
next prev parent reply other threads:[~2008-06-03 19:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-30 9:03 [Qemu-devel] [PATCH] New qemu-img convert -B option to preserve the COW aspect of images and/or re-base them Marc Bevand
2008-06-03 19:06 ` Anthony Liguori
2008-06-03 19:40 ` Jamie Lokier [this message]
2008-06-03 20:12 ` Anthony Liguori
2008-06-03 20:43 ` Jamie Lokier
2008-06-03 21:07 ` Andreas Färber
2008-06-03 21:28 ` Anthony Liguori
-- strict thread matches above, loose matches on Subject: below --
2008-05-28 5:02 [Qemu-devel] [RFC] Allow 'qemu-img convert' to preserve the backing file Marc Bevand
2008-05-28 9:53 ` Ian Jackson
2008-05-28 9:55 ` Ian Jackson
2008-05-30 8:43 ` [Qemu-devel] " Marc Bevand
2008-05-30 9:21 ` [Qemu-devel] [PATCH] New qemu-img convert -B option to preserve the COW aspect of images and/or re-base them Marc Bevand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080603194041.GE6899@shareable.org \
--to=jamie@shareable.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).