Received: from eggs.gnu.org ([2001:4830:134:3::10]:39655) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1abqu8-0001CV-DK for qemu-devel@nongnu.org; Fri, 04 Mar 2016 09:40:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1abqu3-0003gw-Bf for qemu-devel@nongnu.org; Fri, 04 Mar 2016 09:40:32 -0500 Received: from mx1.redhat.com ([209.132.183.28]:59845) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1abqu3-0003go-6V for qemu-devel@nongnu.org; Fri, 04 Mar 2016 09:40:27 -0500 From: Markus Armbruster References: <1457021813-10704-1-git-send-email-eblake@redhat.com> <1457021813-10704-10-git-send-email-eblake@redhat.com> Date: Fri, 04 Mar 2016 15:40:24 +0100 In-Reply-To: <1457021813-10704-10-git-send-email-eblake@redhat.com> (Eric Blake's message of "Thu, 3 Mar 2016 09:16:51 -0700") Message-ID: <8737s6xq5j.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v3 09/10] chardev: Drop useless ChardevDummy type List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: Samuel Thibault , qemu-devel@nongnu.org, Paolo Bonzini Eric Blake writes: > Commit d0d7708b made ChardevDummy be an empty wrapper type around > ChardevCommon. But there is no technical reason for this indirection, > so simplify the code by directly using the base type. > > Also change the fallback assignment to assign u.null rather than > u.data, since a future patch will remove the data member of the C > struct generated for QAPI unions. > > Signed-off-by: Eric Blake > Reviewed-by: Daniel P. Berrange Doesn't compile with MinGW: qemu/qemu-char.c: In function 'qemu_chr_open_win_con': qemu/qemu-char.c:2186:29: warning: implicit declaration of function 'qapi_ChardevDummy_base' [-Wimplicit-function-declaration] ChardevCommon *common = qapi_ChardevDummy_base(backend->u.console); ^ qemu/qemu-char.c:2186:5: warning: nested extern declaration of 'qapi_ChardevDummy_base' [-Wnested-externs] ChardevCommon *common = qapi_ChardevDummy_base(backend->u.console); ^ qemu/qemu-char.c:2186:29: warning: initialization makes pointer from integer without a cast [-Wint-conversion] ChardevCommon *common = qapi_ChardevDummy_base(backend->u.console); ^