From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44563) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XvjW6-0003xp-76 for qemu-devel@nongnu.org; Tue, 02 Dec 2014 04:13:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XvjW1-000528-0O for qemu-devel@nongnu.org; Tue, 02 Dec 2014 04:13:06 -0500 Received: from mx1.redhat.com ([209.132.183.28]:37399) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XvjW0-00051u-QE for qemu-devel@nongnu.org; Tue, 02 Dec 2014 04:13:00 -0500 Message-ID: <547D8294.8050302@redhat.com> Date: Tue, 02 Dec 2014 10:12:52 +0100 From: Max Reitz MIME-Version: 1.0 References: <1417099720-16428-1-git-send-email-mreitz@redhat.com> <1417099720-16428-3-git-send-email-mreitz@redhat.com> <547C90CD.2010005@redhat.com> In-Reply-To: <547C90CD.2010005@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 02/13] block: Omit bdrv_find_format for essential drivers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake , qemu-devel@nongnu.org Cc: Kevin Wolf , Peter Lieven , Markus Armbruster , Stefan Hajnoczi On 2014-12-01 at 17:01, Eric Blake wrote: > On 11/27/2014 07:48 AM, Max Reitz wrote: >> We can always assume raw, file and qcow2 being available; so do not use >> bdrv_find_format() to locate their BlockDriver objects but statically >> reference the respective objects. >> >> Cc: qemu-stable@nongnu.org >> Signed-off-by: Max Reitz >> --- >> block.c | 11 ++--------- >> 1 file changed, 2 insertions(+), 9 deletions(-) > Reviewed-by: Eric Blake > >> @@ -1293,7 +1288,6 @@ int bdrv_append_temp_snapshot(BlockDriverState *bs, int flags, Error **errp) >> /* TODO: extra byte is a hack to ensure MAX_PATH space on Windows. */ >> char *tmp_filename = g_malloc0(PATH_MAX + 1); >> int64_t total_size; >> - BlockDriver *bdrv_qcow2; > Hmm - how hard would it be to get qemu to be clean under -Wshadow? This > is a case where you would have had to change this hunk during patch 1 if > -Wshadow were in effect. Well, I know I once found a bug which would have been spotted by -Wshadow; so in principle, I'm in favor of trying to enforce -Wshadow. On the other hand, I guess it may be really hard. We could try some time, but I don't want to have to run through all of qemu's code... Max