From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52094) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XoTc3-0002wC-OY for qemu-devel@nongnu.org; Wed, 12 Nov 2014 03:49:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XoTbu-00005D-0a for qemu-devel@nongnu.org; Wed, 12 Nov 2014 03:49:15 -0500 Received: from mx1.redhat.com ([209.132.183.28]:60757) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XoTbt-00004x-Nz for qemu-devel@nongnu.org; Wed, 12 Nov 2014 03:49:05 -0500 Message-ID: <54631EF9.3000103@redhat.com> Date: Wed, 12 Nov 2014 09:48:57 +0100 From: Max Reitz MIME-Version: 1.0 References: <1415627159-15941-1-git-send-email-mreitz@redhat.com> <1415627159-15941-16-git-send-email-mreitz@redhat.com> <5462518C.3040203@redhat.com> In-Reply-To: <5462518C.3040203@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 15/21] qcow2: Use abort() instead of assert(false) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake , qemu-devel@nongnu.org Cc: Kevin Wolf , Peter Lieven , Stefan Hajnoczi On 2014-11-11 at 19:12, Eric Blake wrote: > On 11/10/2014 06:45 AM, Max Reitz wrote: >> Signed-off-by: Max Reitz >> --- >> block/qcow2.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) > Reviewed-by: Eric Blake > > Is it worth hoisting this one into 2.2 via the -trivial tree? No, as explained this point can only be reached if there is some creation option for qcow2 images which is not handled by any of the branches in this function. Since there is no such thing currently in master and there most certainly won't be in 2.2 (thanks to hard freeze), it's fine to keep it out of 2.2. Max >> diff --git a/block/qcow2.c b/block/qcow2.c >> index beb7187..ebf843f 100644 >> --- a/block/qcow2.c >> +++ b/block/qcow2.c >> @@ -2718,9 +2718,9 @@ static int qcow2_amend_options(BlockDriverState *bs, QemuOpts *opts, >> error_report("Cannot change refcount entry width"); >> return -ENOTSUP; >> } else { >> - /* if this assertion fails, this probably means a new option was >> + /* if this point is reached, this probably means a new option was >> * added without having it covered here */ >> - assert(false); >> + abort(); >> } >> >> desc++; >>