* [Qemu-devel] [PATCH] bswap: fix compiler warning
@ 2013-04-12 1:41 Alexey Kardashevskiy
2013-04-12 9:10 ` Stefan Hajnoczi
2013-04-12 10:51 ` Andreas Färber
0 siblings, 2 replies; 13+ messages in thread
From: Alexey Kardashevskiy @ 2013-04-12 1:41 UTC (permalink / raw)
To: qemu-devel
Cc: Anthony Liguori, Alexey Kardashevskiy, Blue Swirl, Paolo Bonzini,
Richard Henderson, David Gibson
The bswap functions use memcpy but the bswap.h header itself does not seem to
include it in some configuration such as cross compiling for powerpc64
on x86_64 machine (gcc 4.6.3 from ftp.kernel.org, headers/libs from FC18/ppc64),
the example warning is below.
The patch explicitly includes string.h.
CC ppc64-softmmu/hw/virtio/virtio.o
In file included from /home/alexey/qemu/include/libfdt_env.h:22:0,
from /home/alexey/qemu/../lib4qemu/usr/include/libfdt.h:54,
from /home/alexey/qemu/hw/nvram/spapr_nvram.c:25:
/home/alexey/qemu/include/qemu/bswap.h: In function 'lduw_p':
/home/alexey/qemu/include/qemu/bswap.h:244:5: warning: implicit declaration of function 'memcpy' [-Wimplicit-function-declaration]
/home/alexey/qemu/include/qemu/bswap.h:244:5: warning: incompatible implicit declaration of built-in function 'memcpy' [enabled by default]
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
---
include/qemu/bswap.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/qemu/bswap.h b/include/qemu/bswap.h
index d3af35d..d50de0d 100644
--- a/include/qemu/bswap.h
+++ b/include/qemu/bswap.h
@@ -1,6 +1,8 @@
#ifndef BSWAP_H
#define BSWAP_H
+#include <string.h>
+
#include "config-host.h"
#include <inttypes.h>
#include <limits.h>
--
1.7.10.4
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] [PATCH] bswap: fix compiler warning
2013-04-12 1:41 [Qemu-devel] [PATCH] bswap: fix compiler warning Alexey Kardashevskiy
@ 2013-04-12 9:10 ` Stefan Hajnoczi
2013-04-12 10:51 ` Andreas Färber
1 sibling, 0 replies; 13+ messages in thread
From: Stefan Hajnoczi @ 2013-04-12 9:10 UTC (permalink / raw)
To: Alexey Kardashevskiy
Cc: Anthony Liguori, qemu-devel, Blue Swirl, Paolo Bonzini,
Richard Henderson, David Gibson
On Fri, Apr 12, 2013 at 11:41:15AM +1000, Alexey Kardashevskiy wrote:
> The bswap functions use memcpy but the bswap.h header itself does not seem to
> include it in some configuration such as cross compiling for powerpc64
> on x86_64 machine (gcc 4.6.3 from ftp.kernel.org, headers/libs from FC18/ppc64),
> the example warning is below.
>
> The patch explicitly includes string.h.
>
> CC ppc64-softmmu/hw/virtio/virtio.o
> In file included from /home/alexey/qemu/include/libfdt_env.h:22:0,
> from /home/alexey/qemu/../lib4qemu/usr/include/libfdt.h:54,
> from /home/alexey/qemu/hw/nvram/spapr_nvram.c:25:
> /home/alexey/qemu/include/qemu/bswap.h: In function 'lduw_p':
> /home/alexey/qemu/include/qemu/bswap.h:244:5: warning: implicit declaration of function 'memcpy' [-Wimplicit-function-declaration]
> /home/alexey/qemu/include/qemu/bswap.h:244:5: warning: incompatible implicit declaration of built-in function 'memcpy' [enabled by default]
>
> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
> ---
> include/qemu/bswap.h | 2 ++
> 1 file changed, 2 insertions(+)
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] [PATCH] bswap: fix compiler warning
2013-04-12 1:41 [Qemu-devel] [PATCH] bswap: fix compiler warning Alexey Kardashevskiy
2013-04-12 9:10 ` Stefan Hajnoczi
@ 2013-04-12 10:51 ` Andreas Färber
2013-04-12 13:03 ` Alexey Kardashevskiy
2013-04-12 16:47 ` David Gibson
1 sibling, 2 replies; 13+ messages in thread
From: Andreas Färber @ 2013-04-12 10:51 UTC (permalink / raw)
To: Alexey Kardashevskiy
Cc: Anthony Liguori, Stefan Hajnoczi, qemu-devel, Blue Swirl,
Paolo Bonzini, Richard Henderson, David Gibson
Am 12.04.2013 03:41, schrieb Alexey Kardashevskiy:
> The bswap functions use memcpy but the bswap.h header itself does not seem to
> include it in some configuration such as cross compiling for powerpc64
> on x86_64 machine (gcc 4.6.3 from ftp.kernel.org, headers/libs from FC18/ppc64),
> the example warning is below.
>
> The patch explicitly includes string.h.
>
> CC ppc64-softmmu/hw/virtio/virtio.o
> In file included from /home/alexey/qemu/include/libfdt_env.h:22:0,
> from /home/alexey/qemu/../lib4qemu/usr/include/libfdt.h:54,
> from /home/alexey/qemu/hw/nvram/spapr_nvram.c:25:
> /home/alexey/qemu/include/qemu/bswap.h: In function 'lduw_p':
> /home/alexey/qemu/include/qemu/bswap.h:244:5: warning: implicit declaration of function 'memcpy' [-Wimplicit-function-declaration]
> /home/alexey/qemu/include/qemu/bswap.h:244:5: warning: incompatible implicit declaration of built-in function 'memcpy' [enabled by default]
>
> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
> ---
> include/qemu/bswap.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/include/qemu/bswap.h b/include/qemu/bswap.h
> index d3af35d..d50de0d 100644
> --- a/include/qemu/bswap.h
> +++ b/include/qemu/bswap.h
> @@ -1,6 +1,8 @@
> #ifndef BSWAP_H
> #define BSWAP_H
>
> +#include <string.h>
> +
> #include "config-host.h"
> #include <inttypes.h>
> #include <limits.h>
Including string.h is certainly the right thing to do, but why do you
single it out first?
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] [PATCH] bswap: fix compiler warning
2013-04-12 10:51 ` Andreas Färber
@ 2013-04-12 13:03 ` Alexey Kardashevskiy
2013-04-12 16:47 ` David Gibson
1 sibling, 0 replies; 13+ messages in thread
From: Alexey Kardashevskiy @ 2013-04-12 13:03 UTC (permalink / raw)
To: Andreas Färber
Cc: Anthony Liguori, Stefan Hajnoczi, qemu-devel, Blue Swirl,
Paolo Bonzini, Richard Henderson, David Gibson
On 04/12/2013 08:51 PM, Andreas Färber wrote:
> Am 12.04.2013 03:41, schrieb Alexey Kardashevskiy:
>> The bswap functions use memcpy but the bswap.h header itself does not seem to
>> include it in some configuration such as cross compiling for powerpc64
>> on x86_64 machine (gcc 4.6.3 from ftp.kernel.org, headers/libs from FC18/ppc64),
>> the example warning is below.
>>
>> The patch explicitly includes string.h.
>>
>> CC ppc64-softmmu/hw/virtio/virtio.o
>> In file included from /home/alexey/qemu/include/libfdt_env.h:22:0,
>> from /home/alexey/qemu/../lib4qemu/usr/include/libfdt.h:54,
>> from /home/alexey/qemu/hw/nvram/spapr_nvram.c:25:
>> /home/alexey/qemu/include/qemu/bswap.h: In function 'lduw_p':
>> /home/alexey/qemu/include/qemu/bswap.h:244:5: warning: implicit declaration of function 'memcpy' [-Wimplicit-function-declaration]
>> /home/alexey/qemu/include/qemu/bswap.h:244:5: warning: incompatible implicit declaration of built-in function 'memcpy' [enabled by default]
>>
>> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
>> ---
>> include/qemu/bswap.h | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/include/qemu/bswap.h b/include/qemu/bswap.h
>> index d3af35d..d50de0d 100644
>> --- a/include/qemu/bswap.h
>> +++ b/include/qemu/bswap.h
>> @@ -1,6 +1,8 @@
>> #ifndef BSWAP_H
>> #define BSWAP_H
>>
>> +#include <string.h>
>> +
>> #include "config-host.h"
>> #include <inttypes.h>
>> #include <limits.h>
>
> Including string.h is certainly the right thing to do, but why do you
> single it out first?
I have no idea :)
I just tried to do cross compilation and hit this one. And it is not the
only problem, I hit another one but this is against gcc or libc, have not
discovered it yet.
--
Alexey
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] [PATCH] bswap: fix compiler warning
2013-04-12 10:51 ` Andreas Färber
2013-04-12 13:03 ` Alexey Kardashevskiy
@ 2013-04-12 16:47 ` David Gibson
2013-04-12 17:36 ` Stefan Weil
1 sibling, 1 reply; 13+ messages in thread
From: David Gibson @ 2013-04-12 16:47 UTC (permalink / raw)
To: Andreas Färber
Cc: Anthony Liguori, Alexey Kardashevskiy, Stefan Hajnoczi,
qemu-devel, Blue Swirl, Paolo Bonzini, Richard Henderson
[-- Attachment #1: Type: text/plain, Size: 1970 bytes --]
On Fri, Apr 12, 2013 at 12:51:51PM +0200, Andreas Färber wrote:
> Am 12.04.2013 03:41, schrieb Alexey Kardashevskiy:
> > The bswap functions use memcpy but the bswap.h header itself does not seem to
> > include it in some configuration such as cross compiling for powerpc64
> > on x86_64 machine (gcc 4.6.3 from ftp.kernel.org, headers/libs from FC18/ppc64),
> > the example warning is below.
> >
> > The patch explicitly includes string.h.
> >
> > CC ppc64-softmmu/hw/virtio/virtio.o
> > In file included from /home/alexey/qemu/include/libfdt_env.h:22:0,
> > from /home/alexey/qemu/../lib4qemu/usr/include/libfdt.h:54,
> > from /home/alexey/qemu/hw/nvram/spapr_nvram.c:25:
> > /home/alexey/qemu/include/qemu/bswap.h: In function 'lduw_p':
> > /home/alexey/qemu/include/qemu/bswap.h:244:5: warning: implicit declaration of function 'memcpy' [-Wimplicit-function-declaration]
> > /home/alexey/qemu/include/qemu/bswap.h:244:5: warning: incompatible implicit declaration of built-in function 'memcpy' [enabled by default]
> >
> > Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
> > ---
> > include/qemu/bswap.h | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/include/qemu/bswap.h b/include/qemu/bswap.h
> > index d3af35d..d50de0d 100644
> > --- a/include/qemu/bswap.h
> > +++ b/include/qemu/bswap.h
> > @@ -1,6 +1,8 @@
> > #ifndef BSWAP_H
> > #define BSWAP_H
> >
> > +#include <string.h>
> > +
> > #include "config-host.h"
> > #include <inttypes.h>
> > #include <limits.h>
>
> Including string.h is certainly the right thing to do, but why do you
> single it out first?
Yeah, it probably shouldn't go above the config header. Otherwise
it's the right thing.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] [PATCH] bswap: fix compiler warning
2013-04-12 16:47 ` David Gibson
@ 2013-04-12 17:36 ` Stefan Weil
2013-04-12 20:23 ` Alexey Kardashevskiy
0 siblings, 1 reply; 13+ messages in thread
From: Stefan Weil @ 2013-04-12 17:36 UTC (permalink / raw)
To: Alexey Kardashevskiy
Cc: Anthony Liguori, Stefan Hajnoczi, qemu-devel, David Gibson,
Blue Swirl, Paolo Bonzini, Andreas Färber, Richard Henderson
Am 12.04.2013 18:47, schrieb David Gibson:
> On Fri, Apr 12, 2013 at 12:51:51PM +0200, Andreas Färber wrote:
>> Am 12.04.2013 03:41, schrieb Alexey Kardashevskiy:
>>> The bswap functions use memcpy but the bswap.h header itself does not seem to
>>> include it in some configuration such as cross compiling for powerpc64
>>> on x86_64 machine (gcc 4.6.3 from ftp.kernel.org, headers/libs from FC18/ppc64),
>>> the example warning is below.
>>>
>>> The patch explicitly includes string.h.
>>>
>>> CC ppc64-softmmu/hw/virtio/virtio.o
>>> In file included from /home/alexey/qemu/include/libfdt_env.h:22:0,
>>> from /home/alexey/qemu/../lib4qemu/usr/include/libfdt.h:54,
>>> from /home/alexey/qemu/hw/nvram/spapr_nvram.c:25:
>>> /home/alexey/qemu/include/qemu/bswap.h: In function 'lduw_p':
>>> /home/alexey/qemu/include/qemu/bswap.h:244:5: warning: implicit declaration of function 'memcpy' [-Wimplicit-function-declaration]
>>> /home/alexey/qemu/include/qemu/bswap.h:244:5: warning: incompatible implicit declaration of built-in function 'memcpy' [enabled by default]
>>>
>>> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
>>> ---
>>> include/qemu/bswap.h | 2 ++
>>> 1 file changed, 2 insertions(+)
>>>
>>> diff --git a/include/qemu/bswap.h b/include/qemu/bswap.h
>>> index d3af35d..d50de0d 100644
>>> --- a/include/qemu/bswap.h
>>> +++ b/include/qemu/bswap.h
>>> @@ -1,6 +1,8 @@
>>> #ifndef BSWAP_H
>>> #define BSWAP_H
>>>
>>> +#include <string.h>
>>> +
>>> #include "config-host.h"
>>> #include <inttypes.h>
>>> #include <limits.h>
>> Including string.h is certainly the right thing to do, but why do you
>> single it out first?
> Yeah, it probably shouldn't go above the config header. Otherwise
> it's the right thing.
If string.h went directly after limits.h, we'd even preserve the
alphabetic order of the system headers :-)
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] [PATCH] bswap: fix compiler warning
2013-04-12 17:36 ` Stefan Weil
@ 2013-04-12 20:23 ` Alexey Kardashevskiy
2013-04-12 20:31 ` Stefan Weil
0 siblings, 1 reply; 13+ messages in thread
From: Alexey Kardashevskiy @ 2013-04-12 20:23 UTC (permalink / raw)
To: Stefan Weil
Cc: Anthony Liguori, Stefan Hajnoczi, qemu-devel, David Gibson,
Blue Swirl, Paolo Bonzini, Andreas Färber, Richard Henderson
On 04/13/2013 03:36 AM, Stefan Weil wrote:
> Am 12.04.2013 18:47, schrieb David Gibson:
>> On Fri, Apr 12, 2013 at 12:51:51PM +0200, Andreas Färber wrote:
>>> Am 12.04.2013 03:41, schrieb Alexey Kardashevskiy:
>>>> The bswap functions use memcpy but the bswap.h header itself does not seem to
>>>> include it in some configuration such as cross compiling for powerpc64
>>>> on x86_64 machine (gcc 4.6.3 from ftp.kernel.org, headers/libs from FC18/ppc64),
>>>> the example warning is below.
>>>>
>>>> The patch explicitly includes string.h.
>>>>
>>>> CC ppc64-softmmu/hw/virtio/virtio.o
>>>> In file included from /home/alexey/qemu/include/libfdt_env.h:22:0,
>>>> from /home/alexey/qemu/../lib4qemu/usr/include/libfdt.h:54,
>>>> from /home/alexey/qemu/hw/nvram/spapr_nvram.c:25:
>>>> /home/alexey/qemu/include/qemu/bswap.h: In function 'lduw_p':
>>>> /home/alexey/qemu/include/qemu/bswap.h:244:5: warning: implicit declaration of function 'memcpy' [-Wimplicit-function-declaration]
>>>> /home/alexey/qemu/include/qemu/bswap.h:244:5: warning: incompatible implicit declaration of built-in function 'memcpy' [enabled by default]
>>>>
>>>> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
>>>> ---
>>>> include/qemu/bswap.h | 2 ++
>>>> 1 file changed, 2 insertions(+)
>>>>
>>>> diff --git a/include/qemu/bswap.h b/include/qemu/bswap.h
>>>> index d3af35d..d50de0d 100644
>>>> --- a/include/qemu/bswap.h
>>>> +++ b/include/qemu/bswap.h
>>>> @@ -1,6 +1,8 @@
>>>> #ifndef BSWAP_H
>>>> #define BSWAP_H
>>>>
>>>> +#include <string.h>
>>>> +
>>>> #include "config-host.h"
>>>> #include <inttypes.h>
>>>> #include <limits.h>
>>> Including string.h is certainly the right thing to do, but why do you
>>> single it out first?
>> Yeah, it probably shouldn't go above the config header. Otherwise
>> it's the right thing.
>
> If string.h went directly after limits.h, we'd even preserve the
> alphabetic order of the system headers :-)
Ah. Misunderstood the original question :) Do I need to repost it?
--
Alexey
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-trivial] [Qemu-devel] [PATCH] bswap: fix compiler warning
2013-04-12 20:23 ` Alexey Kardashevskiy
@ 2013-04-12 20:31 ` Stefan Weil
0 siblings, 0 replies; 13+ messages in thread
From: Stefan Weil @ 2013-04-12 20:31 UTC (permalink / raw)
To: Alexey Kardashevskiy; +Cc: qemu-trivial, qemu-devel
Am 12.04.2013 22:23, schrieb Alexey Kardashevskiy:
> On 04/13/2013 03:36 AM, Stefan Weil wrote:
>> Am 12.04.2013 18:47, schrieb David Gibson:
>>> On Fri, Apr 12, 2013 at 12:51:51PM +0200, Andreas Färber wrote:
>>>> Am 12.04.2013 03:41, schrieb Alexey Kardashevskiy:
>>>>> The bswap functions use memcpy but the bswap.h header itself does
>>>>> not seem to
>>>>> include it in some configuration such as cross compiling for
>>>>> powerpc64
>>>>> on x86_64 machine (gcc 4.6.3 from ftp.kernel.org, headers/libs
>>>>> from FC18/ppc64),
>>>>> the example warning is below.
>>>>>
>>>>> The patch explicitly includes string.h.
>>>>>
>>>>> CC ppc64-softmmu/hw/virtio/virtio.o
>>>>> In file included from /home/alexey/qemu/include/libfdt_env.h:22:0,
>>>>> from
>>>>> /home/alexey/qemu/../lib4qemu/usr/include/libfdt.h:54,
>>>>> from /home/alexey/qemu/hw/nvram/spapr_nvram.c:25:
>>>>> /home/alexey/qemu/include/qemu/bswap.h: In function 'lduw_p':
>>>>> /home/alexey/qemu/include/qemu/bswap.h:244:5: warning: implicit
>>>>> declaration of function 'memcpy' [-Wimplicit-function-declaration]
>>>>> /home/alexey/qemu/include/qemu/bswap.h:244:5: warning:
>>>>> incompatible implicit declaration of built-in function 'memcpy'
>>>>> [enabled by default]
>>>>>
>>>>> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
>>>>> ---
>>>>> include/qemu/bswap.h | 2 ++
>>>>> 1 file changed, 2 insertions(+)
>>>>>
>>>>> diff --git a/include/qemu/bswap.h b/include/qemu/bswap.h
>>>>> index d3af35d..d50de0d 100644
>>>>> --- a/include/qemu/bswap.h
>>>>> +++ b/include/qemu/bswap.h
>>>>> @@ -1,6 +1,8 @@
>>>>> #ifndef BSWAP_H
>>>>> #define BSWAP_H
>>>>>
>>>>> +#include <string.h>
>>>>> +
>>>>> #include "config-host.h"
>>>>> #include <inttypes.h>
>>>>> #include <limits.h>
>>>> Including string.h is certainly the right thing to do, but why do you
>>>> single it out first?
>>> Yeah, it probably shouldn't go above the config header. Otherwise
>>> it's the right thing.
>>
>> If string.h went directly after limits.h, we'd even preserve the
>> alphabetic order of the system headers :-)
>
> Ah. Misunderstood the original question :) Do I need to repost it?
Yes, please - I think that would be good. You can also cc your patch
to qemu-trivial@nongnu.org, so it will be committed as a trivial patch.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] [PATCH] bswap: fix compiler warning
@ 2013-04-12 20:31 ` Stefan Weil
0 siblings, 0 replies; 13+ messages in thread
From: Stefan Weil @ 2013-04-12 20:31 UTC (permalink / raw)
To: Alexey Kardashevskiy; +Cc: qemu-trivial, qemu-devel
Am 12.04.2013 22:23, schrieb Alexey Kardashevskiy:
> On 04/13/2013 03:36 AM, Stefan Weil wrote:
>> Am 12.04.2013 18:47, schrieb David Gibson:
>>> On Fri, Apr 12, 2013 at 12:51:51PM +0200, Andreas Färber wrote:
>>>> Am 12.04.2013 03:41, schrieb Alexey Kardashevskiy:
>>>>> The bswap functions use memcpy but the bswap.h header itself does
>>>>> not seem to
>>>>> include it in some configuration such as cross compiling for
>>>>> powerpc64
>>>>> on x86_64 machine (gcc 4.6.3 from ftp.kernel.org, headers/libs
>>>>> from FC18/ppc64),
>>>>> the example warning is below.
>>>>>
>>>>> The patch explicitly includes string.h.
>>>>>
>>>>> CC ppc64-softmmu/hw/virtio/virtio.o
>>>>> In file included from /home/alexey/qemu/include/libfdt_env.h:22:0,
>>>>> from
>>>>> /home/alexey/qemu/../lib4qemu/usr/include/libfdt.h:54,
>>>>> from /home/alexey/qemu/hw/nvram/spapr_nvram.c:25:
>>>>> /home/alexey/qemu/include/qemu/bswap.h: In function 'lduw_p':
>>>>> /home/alexey/qemu/include/qemu/bswap.h:244:5: warning: implicit
>>>>> declaration of function 'memcpy' [-Wimplicit-function-declaration]
>>>>> /home/alexey/qemu/include/qemu/bswap.h:244:5: warning:
>>>>> incompatible implicit declaration of built-in function 'memcpy'
>>>>> [enabled by default]
>>>>>
>>>>> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
>>>>> ---
>>>>> include/qemu/bswap.h | 2 ++
>>>>> 1 file changed, 2 insertions(+)
>>>>>
>>>>> diff --git a/include/qemu/bswap.h b/include/qemu/bswap.h
>>>>> index d3af35d..d50de0d 100644
>>>>> --- a/include/qemu/bswap.h
>>>>> +++ b/include/qemu/bswap.h
>>>>> @@ -1,6 +1,8 @@
>>>>> #ifndef BSWAP_H
>>>>> #define BSWAP_H
>>>>>
>>>>> +#include <string.h>
>>>>> +
>>>>> #include "config-host.h"
>>>>> #include <inttypes.h>
>>>>> #include <limits.h>
>>>> Including string.h is certainly the right thing to do, but why do you
>>>> single it out first?
>>> Yeah, it probably shouldn't go above the config header. Otherwise
>>> it's the right thing.
>>
>> If string.h went directly after limits.h, we'd even preserve the
>> alphabetic order of the system headers :-)
>
> Ah. Misunderstood the original question :) Do I need to repost it?
Yes, please - I think that would be good. You can also cc your patch
to qemu-trivial@nongnu.org, so it will be committed as a trivial patch.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Qemu-trivial] [PATCH v2] bswap: fix compiler warning
2013-04-12 20:31 ` Stefan Weil
(?)
@ 2013-04-15 1:47 ` Alexey Kardashevskiy
2013-04-15 1:52 ` [Qemu-trivial] [Qemu-ppc] " David Gibson
` (2 more replies)
-1 siblings, 3 replies; 13+ messages in thread
From: Alexey Kardashevskiy @ 2013-04-15 1:47 UTC (permalink / raw)
To: Stefan Hajnoczi
Cc: Anthony Liguori, Alexey Kardashevskiy, Stefan Weil, Blue Swirl,
qemu-trivial, qemu-ppc, Paolo Bonzini, Andreas Färber,
David Gibson
The bswap functions use memcpy but the bswap.h header itself does not seem to
include it in some configuration such as cross compiling for powerpc64
on x86_64 machine.
The patch explicitly includes string.h.
v2:
* #include statement moved to the right place
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
---
include/qemu/bswap.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/qemu/bswap.h b/include/qemu/bswap.h
index d3af35d..14a5f65 100644
--- a/include/qemu/bswap.h
+++ b/include/qemu/bswap.h
@@ -4,6 +4,7 @@
#include "config-host.h"
#include <inttypes.h>
#include <limits.h>
+#include <string.h>
#include "fpu/softfloat.h"
#ifdef CONFIG_MACHINE_BSWAP_H
--
1.7.10.4
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [Qemu-trivial] [Qemu-ppc] [PATCH v2] bswap: fix compiler warning
2013-04-15 1:47 ` [Qemu-trivial] [PATCH v2] " Alexey Kardashevskiy
@ 2013-04-15 1:52 ` David Gibson
2013-04-15 10:52 ` [Qemu-trivial] " Andreas Färber
2013-04-19 9:28 ` Stefan Hajnoczi
2 siblings, 0 replies; 13+ messages in thread
From: David Gibson @ 2013-04-15 1:52 UTC (permalink / raw)
To: Alexey Kardashevskiy
Cc: Anthony Liguori, qemu-trivial, Stefan Weil, qemu-ppc,
Stefan Hajnoczi, Paolo Bonzini, Andreas Färber
[-- Attachment #1: Type: text/plain, Size: 723 bytes --]
On Mon, Apr 15, 2013 at 11:47:56AM +1000, Alexey Kardashevskiy wrote:
> The bswap functions use memcpy but the bswap.h header itself does not seem to
> include it in some configuration such as cross compiling for powerpc64
> on x86_64 machine.
>
> The patch explicitly includes string.h.
>
> v2:
> * #include statement moved to the right place
>
> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-trivial] [PATCH v2] bswap: fix compiler warning
2013-04-15 1:47 ` [Qemu-trivial] [PATCH v2] " Alexey Kardashevskiy
2013-04-15 1:52 ` [Qemu-trivial] [Qemu-ppc] " David Gibson
@ 2013-04-15 10:52 ` Andreas Färber
2013-04-19 9:28 ` Stefan Hajnoczi
2 siblings, 0 replies; 13+ messages in thread
From: Andreas Färber @ 2013-04-15 10:52 UTC (permalink / raw)
To: Alexey Kardashevskiy
Cc: Anthony Liguori, qemu-trivial, Stefan Weil, Blue Swirl, qemu-ppc,
Stefan Hajnoczi, Paolo Bonzini, David Gibson
Am 15.04.2013 03:47, schrieb Alexey Kardashevskiy:
> The bswap functions use memcpy but the bswap.h header itself does not seem to
> include it in some configuration such as cross compiling for powerpc64
> on x86_64 machine.
>
> The patch explicitly includes string.h.
>
> v2:
> * #include statement moved to the right place
>
> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
> include/qemu/bswap.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/include/qemu/bswap.h b/include/qemu/bswap.h
> index d3af35d..14a5f65 100644
> --- a/include/qemu/bswap.h
> +++ b/include/qemu/bswap.h
> @@ -4,6 +4,7 @@
> #include "config-host.h"
> #include <inttypes.h>
> #include <limits.h>
> +#include <string.h>
> #include "fpu/softfloat.h"
>
> #ifdef CONFIG_MACHINE_BSWAP_H
Thanks,
Reviewed-by: Andreas Färber <afaerber@suse.de>
Normally the change log does not go into the commit message but I'm sure
Stefan can fix that. :)
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-trivial] [PATCH v2] bswap: fix compiler warning
2013-04-15 1:47 ` [Qemu-trivial] [PATCH v2] " Alexey Kardashevskiy
2013-04-15 1:52 ` [Qemu-trivial] [Qemu-ppc] " David Gibson
2013-04-15 10:52 ` [Qemu-trivial] " Andreas Färber
@ 2013-04-19 9:28 ` Stefan Hajnoczi
2 siblings, 0 replies; 13+ messages in thread
From: Stefan Hajnoczi @ 2013-04-19 9:28 UTC (permalink / raw)
To: Alexey Kardashevskiy
Cc: Anthony Liguori, qemu-trivial, Stefan Weil, Blue Swirl, qemu-ppc,
Stefan Hajnoczi, Paolo Bonzini, Andreas Färber, David Gibson
On Mon, Apr 15, 2013 at 11:47:56AM +1000, Alexey Kardashevskiy wrote:
> The bswap functions use memcpy but the bswap.h header itself does not seem to
> include it in some configuration such as cross compiling for powerpc64
> on x86_64 machine.
>
> The patch explicitly includes string.h.
>
> v2:
> * #include statement moved to the right place
>
> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
> include/qemu/bswap.h | 1 +
> 1 file changed, 1 insertion(+)
Thanks, applied to the trivial patches tree:
https://github.com/stefanha/qemu/commits/trivial-patches
Stefan
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2013-04-19 9:28 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-12 1:41 [Qemu-devel] [PATCH] bswap: fix compiler warning Alexey Kardashevskiy
2013-04-12 9:10 ` Stefan Hajnoczi
2013-04-12 10:51 ` Andreas Färber
2013-04-12 13:03 ` Alexey Kardashevskiy
2013-04-12 16:47 ` David Gibson
2013-04-12 17:36 ` Stefan Weil
2013-04-12 20:23 ` Alexey Kardashevskiy
2013-04-12 20:31 ` [Qemu-trivial] " Stefan Weil
2013-04-12 20:31 ` Stefan Weil
2013-04-15 1:47 ` [Qemu-trivial] [PATCH v2] " Alexey Kardashevskiy
2013-04-15 1:52 ` [Qemu-trivial] [Qemu-ppc] " David Gibson
2013-04-15 10:52 ` [Qemu-trivial] " Andreas Färber
2013-04-19 9:28 ` Stefan Hajnoczi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.