From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35370) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WwAzQ-0006XI-Rw for qemu-devel@nongnu.org; Sun, 15 Jun 2014 10:01:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WwAzH-0006CN-Pv for qemu-devel@nongnu.org; Sun, 15 Jun 2014 10:00:56 -0400 Received: from mail-we0-x235.google.com ([2a00:1450:400c:c03::235]:60983) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WwAzH-0006CB-BY for qemu-devel@nongnu.org; Sun, 15 Jun 2014 10:00:47 -0400 Received: by mail-we0-f181.google.com with SMTP id q59so4642997wes.12 for ; Sun, 15 Jun 2014 07:00:46 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <539DA70A.1050801@redhat.com> Date: Sun, 15 Jun 2014 16:00:42 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1401970944-18735-1-git-send-email-wenchaoqemu@gmail.com> <1401970944-18735-17-git-send-email-wenchaoqemu@gmail.com> <539B6CD3.90905@redhat.com> In-Reply-To: <539B6CD3.90905@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH V6 16/29] qapi event: convert RTC_CHANGE List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake , Wenchao Xia , qemu-devel@nongnu.org Cc: lcapitulino@redhat.com, mdroth@linux.vnet.ibm.com, armbru@redhat.com Il 13/06/2014 23:27, Eric Blake ha scritto: >>> >> visit_start_struct(v, NULL, "", "RTC_CHANGE", 0, &local_err); >>> >> if (local_err) { >>> >> goto clean; >>> >> } > Hmm, qmp_output_start_struct() never sets errp. > >>> >> >>> >> visit_type_int(v, &offset, "offset", &local_err); >>> >> if (local_err) { >>> >> goto clean; >>> >> } > Likewise, qmp_output_type_int never sets errp. > I think it is better to produce correct error propagation even if it is unused. We could add range-checking of enums, for example. I guess all the NULLs for errp could become &error_abort, but it can be done after the merge. Paolo