qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Eric Blake <eblake@redhat.com>, qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Thomas Huth <thuth@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	Yuri Benditovich <yuri.benditovich@daynix.com>,
	Wei Xu <wexu@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] virtio-net: Fix VirtIONet typedef redefinition
Date: Mon, 21 Jan 2019 20:46:52 +0100	[thread overview]
Message-ID: <5f27ba6f-f2e3-423f-54ee-0f6d6a0e1b48@redhat.com> (raw)
In-Reply-To: <76c2912b-8c50-d15f-f153-e80fa4b1be6e@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1363 bytes --]

On 1/21/19 8:22 PM, Eric Blake wrote:
> On 1/21/19 12:10 PM, Philippe Mathieu-Daudé wrote:
>> Commit 2974e916df8 introduced the VirtioNetRscChain structure which
>> refer to a VirtIONet, declared later, thus required VirtIONet typedef
>> to be declarated forward.
> 
> s/be declarated forward/use a forward declaration/

Thanks Eric.

Thomas, do you mind fixing this if you take this patch?

>> However, when compiling with Clang in -std=gnu99 mode, this triggers
>> the following warning/error:
>>
>>     CC      hw/net/virtio-net.o
>>   In file included from qemu/hw/net/virtio-net.c:22:
>>   include/hw/virtio/virtio-net.h:189:3: error: redefinition of typedef 'VirtIONet' is a C11 feature [-Werror,-Wtypedef-redefinition]
>>   } VirtIONet;
>>     ^
>>   include/hw/virtio/virtio-net.h:110:26: note: previous definition is here
>>   typedef struct VirtIONet VirtIONet;
>>                            ^
>>   1 error generated.
>>   make: *** [rules.mak:69: hw/net/virtio-net.o] Error 1
>>
>> Fix it by removing the duplicate typedef definition.
>>
>> Reported-by: Peter Maydell <peter.maydell@linaro.org>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>> ---
>>  include/hw/virtio/virtio-net.h | 5 ++---
>>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> Reviewed-by: Eric Blake <eblake@redhat.com>
> 


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2019-01-21 19:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-21 18:10 [Qemu-devel] [PATCH] virtio-net: Fix VirtIONet typedef redefinition Philippe Mathieu-Daudé
2019-01-21 19:22 ` Eric Blake
2019-01-21 19:46   ` Philippe Mathieu-Daudé [this message]
2019-01-22  4:28     ` Thomas Huth
2019-01-22  5:05       ` Michael S. Tsirkin
2019-01-22  5:23         ` Thomas Huth
2019-01-22 13:55           ` Michael S. Tsirkin
2019-01-21 21:53 ` Greg Kurz
2019-01-22  5:04 ` Michael S. Tsirkin

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=5f27ba6f-f2e3-423f-54ee-0f6d6a0e1b48@redhat.com \
    --to=philmd@redhat.com \
    --cc=eblake@redhat.com \
    --cc=mst@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    --cc=wexu@redhat.com \
    --cc=yuri.benditovich@daynix.com \
    /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).