qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 1/2] gcc: rename CONFIG_PRAGMA_DISABLE_UNUSED_BUT_SET to CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE
@ 2013-01-09  9:17 Gerd Hoffmann
  2013-01-09  9:17 ` [Qemu-devel] [PATCH 2/2] pixman: fix warning Gerd Hoffmann
  2013-01-12 16:10 ` [Qemu-devel] [PATCH 1/2] gcc: rename CONFIG_PRAGMA_DISABLE_UNUSED_BUT_SET to CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE Blue Swirl
  0 siblings, 2 replies; 7+ messages in thread
From: Gerd Hoffmann @ 2013-01-09  9:17 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 configure            |    6 +++---
 coroutine-ucontext.c |    4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/configure b/configure
index 4f050ea..9357035 100755
--- a/configure
+++ b/configure
@@ -3078,7 +3078,7 @@ int main(void) {
 }
 EOF
 if compile_prog "-Werror" "" ; then
-    pragma_disable_unused_but_set=yes
+    pragma_diagnostic_available=yes
 fi
 
 ########################################
@@ -3650,8 +3650,8 @@ if test "$linux_magic_h" = "yes" ; then
   echo "CONFIG_LINUX_MAGIC_H=y" >> $config_host_mak
 fi
 
-if test "$pragma_disable_unused_but_set" = "yes" ; then
-  echo "CONFIG_PRAGMA_DISABLE_UNUSED_BUT_SET=y" >> $config_host_mak
+if test "$pragma_diagnostic_available" = "yes" ; then
+  echo "CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE=y" >> $config_host_mak
 fi
 
 if test "$valgrind_h" = "yes" ; then
diff --git a/coroutine-ucontext.c b/coroutine-ucontext.c
index 2ed703a..a9c30e9 100644
--- a/coroutine-ucontext.c
+++ b/coroutine-ucontext.c
@@ -200,7 +200,7 @@ Coroutine *qemu_coroutine_new(void)
 }
 
 #ifdef CONFIG_VALGRIND_H
-#ifdef CONFIG_PRAGMA_DISABLE_UNUSED_BUT_SET
+#ifdef CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE
 /* Work around an unused variable in the valgrind.h macro... */
 #pragma GCC diagnostic ignored "-Wunused-but-set-variable"
 #endif
@@ -208,7 +208,7 @@ static inline void valgrind_stack_deregister(CoroutineUContext *co)
 {
     VALGRIND_STACK_DEREGISTER(co->valgrind_stack_id);
 }
-#ifdef CONFIG_PRAGMA_DISABLE_UNUSED_BUT_SET
+#ifdef CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE
 #pragma GCC diagnostic error "-Wunused-but-set-variable"
 #endif
 #endif
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [Qemu-devel] [PATCH 2/2] pixman: fix warning
  2013-01-09  9:17 [Qemu-devel] [PATCH 1/2] gcc: rename CONFIG_PRAGMA_DISABLE_UNUSED_BUT_SET to CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE Gerd Hoffmann
@ 2013-01-09  9:17 ` Gerd Hoffmann
  2013-01-12 16:10   ` Blue Swirl
  2013-01-15  4:53   ` Andreas Färber
  2013-01-12 16:10 ` [Qemu-devel] [PATCH 1/2] gcc: rename CONFIG_PRAGMA_DISABLE_UNUSED_BUT_SET to CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE Blue Swirl
  1 sibling, 2 replies; 7+ messages in thread
From: Gerd Hoffmann @ 2013-01-09  9:17 UTC (permalink / raw)
  To: qemu-devel; +Cc: agraf, Gerd Hoffmann, afaerber

Cc: afaerber@suse.de
Cc: agraf@suse.de
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 include/ui/qemu-pixman.h |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/include/ui/qemu-pixman.h b/include/ui/qemu-pixman.h
index 3c05c83..016fd87 100644
--- a/include/ui/qemu-pixman.h
+++ b/include/ui/qemu-pixman.h
@@ -6,7 +6,14 @@
 #ifndef QEMU_PIXMAN_H
 #define QEMU_PIXMAN_H
 
+/* pixman-0.16.0 headers have a redundant declaration */
+#ifdef CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE
+#pragma GCC diagnostic ignored "-Wredundant-decls"
+#endif
 #include <pixman.h>
+#ifdef CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE
+#pragma GCC diagnostic error "-Wredundant-decls"
+#endif
 
 #include "console.h"
 
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH 1/2] gcc: rename CONFIG_PRAGMA_DISABLE_UNUSED_BUT_SET to CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE
  2013-01-09  9:17 [Qemu-devel] [PATCH 1/2] gcc: rename CONFIG_PRAGMA_DISABLE_UNUSED_BUT_SET to CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE Gerd Hoffmann
  2013-01-09  9:17 ` [Qemu-devel] [PATCH 2/2] pixman: fix warning Gerd Hoffmann
@ 2013-01-12 16:10 ` Blue Swirl
  1 sibling, 0 replies; 7+ messages in thread
From: Blue Swirl @ 2013-01-12 16:10 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: qemu-devel

Thanks, applied.

On Wed, Jan 9, 2013 at 9:17 AM, Gerd Hoffmann <kraxel@redhat.com> wrote:
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
>  configure            |    6 +++---
>  coroutine-ucontext.c |    4 ++--
>  2 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/configure b/configure
> index 4f050ea..9357035 100755
> --- a/configure
> +++ b/configure
> @@ -3078,7 +3078,7 @@ int main(void) {
>  }
>  EOF
>  if compile_prog "-Werror" "" ; then
> -    pragma_disable_unused_but_set=yes
> +    pragma_diagnostic_available=yes
>  fi
>
>  ########################################
> @@ -3650,8 +3650,8 @@ if test "$linux_magic_h" = "yes" ; then
>    echo "CONFIG_LINUX_MAGIC_H=y" >> $config_host_mak
>  fi
>
> -if test "$pragma_disable_unused_but_set" = "yes" ; then
> -  echo "CONFIG_PRAGMA_DISABLE_UNUSED_BUT_SET=y" >> $config_host_mak
> +if test "$pragma_diagnostic_available" = "yes" ; then
> +  echo "CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE=y" >> $config_host_mak
>  fi
>
>  if test "$valgrind_h" = "yes" ; then
> diff --git a/coroutine-ucontext.c b/coroutine-ucontext.c
> index 2ed703a..a9c30e9 100644
> --- a/coroutine-ucontext.c
> +++ b/coroutine-ucontext.c
> @@ -200,7 +200,7 @@ Coroutine *qemu_coroutine_new(void)
>  }
>
>  #ifdef CONFIG_VALGRIND_H
> -#ifdef CONFIG_PRAGMA_DISABLE_UNUSED_BUT_SET
> +#ifdef CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE
>  /* Work around an unused variable in the valgrind.h macro... */
>  #pragma GCC diagnostic ignored "-Wunused-but-set-variable"
>  #endif
> @@ -208,7 +208,7 @@ static inline void valgrind_stack_deregister(CoroutineUContext *co)
>  {
>      VALGRIND_STACK_DEREGISTER(co->valgrind_stack_id);
>  }
> -#ifdef CONFIG_PRAGMA_DISABLE_UNUSED_BUT_SET
> +#ifdef CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE
>  #pragma GCC diagnostic error "-Wunused-but-set-variable"
>  #endif
>  #endif
> --
> 1.7.1
>
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH 2/2] pixman: fix warning
  2013-01-09  9:17 ` [Qemu-devel] [PATCH 2/2] pixman: fix warning Gerd Hoffmann
@ 2013-01-12 16:10   ` Blue Swirl
  2013-01-15  4:53   ` Andreas Färber
  1 sibling, 0 replies; 7+ messages in thread
From: Blue Swirl @ 2013-01-12 16:10 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: qemu-devel, afaerber, agraf

Thanks, applied.

On Wed, Jan 9, 2013 at 9:17 AM, Gerd Hoffmann <kraxel@redhat.com> wrote:
> Cc: afaerber@suse.de
> Cc: agraf@suse.de
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
>  include/ui/qemu-pixman.h |    7 +++++++
>  1 files changed, 7 insertions(+), 0 deletions(-)
>
> diff --git a/include/ui/qemu-pixman.h b/include/ui/qemu-pixman.h
> index 3c05c83..016fd87 100644
> --- a/include/ui/qemu-pixman.h
> +++ b/include/ui/qemu-pixman.h
> @@ -6,7 +6,14 @@
>  #ifndef QEMU_PIXMAN_H
>  #define QEMU_PIXMAN_H
>
> +/* pixman-0.16.0 headers have a redundant declaration */
> +#ifdef CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE
> +#pragma GCC diagnostic ignored "-Wredundant-decls"
> +#endif
>  #include <pixman.h>
> +#ifdef CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE
> +#pragma GCC diagnostic error "-Wredundant-decls"
> +#endif
>
>  #include "console.h"
>
> --
> 1.7.1
>
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH 2/2] pixman: fix warning
  2013-01-09  9:17 ` [Qemu-devel] [PATCH 2/2] pixman: fix warning Gerd Hoffmann
  2013-01-12 16:10   ` Blue Swirl
@ 2013-01-15  4:53   ` Andreas Färber
  2013-01-15 14:29     ` Gerd Hoffmann
  1 sibling, 1 reply; 7+ messages in thread
From: Andreas Färber @ 2013-01-15  4:53 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: Blue Swirl, qemu-devel, agraf

Am 09.01.2013 10:17, schrieb Gerd Hoffmann:
> Cc: afaerber@suse.de
> Cc: agraf@suse.de
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
>  include/ui/qemu-pixman.h |    7 +++++++
>  1 files changed, 7 insertions(+), 0 deletions(-)
> 
> diff --git a/include/ui/qemu-pixman.h b/include/ui/qemu-pixman.h
> index 3c05c83..016fd87 100644
> --- a/include/ui/qemu-pixman.h
> +++ b/include/ui/qemu-pixman.h
> @@ -6,7 +6,14 @@
>  #ifndef QEMU_PIXMAN_H
>  #define QEMU_PIXMAN_H
>  
> +/* pixman-0.16.0 headers have a redundant declaration */
> +#ifdef CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE
> +#pragma GCC diagnostic ignored "-Wredundant-decls"
> +#endif
>  #include <pixman.h>
> +#ifdef CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE
> +#pragma GCC diagnostic error "-Wredundant-decls"
> +#endif
>  
>  #include "console.h"
>  

Unfortunately this did not help on SLES11 SP2. I don't spot any typo in
your patches, it looked neat; CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE does
not get defined in config-host.h it seems.

Using the pragmas unconditionally results in change from:

  CC    qemu-timer.o
cc1: warnings being treated as errors
In file included from
/home/andreas/QEMU/qemu-s390/include/ui/qemu-pixman.h:13,
                 from /home/andreas/QEMU/qemu-s390/include/ui/console.h:4,
                 from /home/andreas/QEMU/qemu-s390/qemu-timer.c:27:
/usr/include/pixman-1/pixman.h:225: error: redundant redeclaration of
‘pixman_transform_from_pixman_f_transform’
/usr/include/pixman-1/pixman.h:221: error: previous declaration of
‘pixman_transform_from_pixman_f_transform’ was here
make: *** [qemu-timer.o] Fehler 1

to:

  CC    qemu-timer.o
cc1: warnings being treated as errors
In file included from
/home/andreas/QEMU/qemu-s390/include/ui/qemu-pixman.h:13,
                 from /home/andreas/QEMU/qemu-s390/include/ui/console.h:4,
                 from /home/andreas/QEMU/qemu-s390/qemu-timer.c:27:
/usr/include/pixman-1/pixman.h:221: error: previous declaration of
‘pixman_transform_from_pixman_f_transform’ was here
make: *** [qemu-timer.o] Fehler 1

gcc (SUSE Linux) 4.3.4 [gcc-4_3-branch revision 152973]

Regards,
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] 7+ messages in thread

* Re: [Qemu-devel] [PATCH 2/2] pixman: fix warning
  2013-01-15  4:53   ` Andreas Färber
@ 2013-01-15 14:29     ` Gerd Hoffmann
  2013-01-15 15:15       ` Paolo Bonzini
  0 siblings, 1 reply; 7+ messages in thread
From: Gerd Hoffmann @ 2013-01-15 14:29 UTC (permalink / raw)
  To: Andreas Färber; +Cc: Blue Swirl, qemu-devel, agraf

  Hi,

> Unfortunately this did not help on SLES11 SP2. I don't spot any typo in
> your patches, it looked neat; CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE does
> not get defined in config-host.h it seems.

Hmm, anything in config.log?  Maybe the sles11 gcc doesn't support the
-Wunused-but-set-variable used in the configure test?

> Using the pragmas unconditionally results in change from:
> 
>   CC    qemu-timer.o
> cc1: warnings being treated as errors
> In file included from
> /home/andreas/QEMU/qemu-s390/include/ui/qemu-pixman.h:13,
>                  from /home/andreas/QEMU/qemu-s390/include/ui/console.h:4,
>                  from /home/andreas/QEMU/qemu-s390/qemu-timer.c:27:
> /usr/include/pixman-1/pixman.h:225: error: redundant redeclaration of
> ‘pixman_transform_from_pixman_f_transform’
> /usr/include/pixman-1/pixman.h:221: error: previous declaration of
> ‘pixman_transform_from_pixman_f_transform’ was here
> make: *** [qemu-timer.o] Fehler 1
> 
> to:
> 
>   CC    qemu-timer.o
> cc1: warnings being treated as errors
> In file included from
> /home/andreas/QEMU/qemu-s390/include/ui/qemu-pixman.h:13,
>                  from /home/andreas/QEMU/qemu-s390/include/ui/console.h:4,
>                  from /home/andreas/QEMU/qemu-s390/qemu-timer.c:27:
> /usr/include/pixman-1/pixman.h:221: error: previous declaration of
> ‘pixman_transform_from_pixman_f_transform’ was here
> make: *** [qemu-timer.o] Fehler 1

That looks like a gcc bug to me.

cheers,
  Gerd

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH 2/2] pixman: fix warning
  2013-01-15 14:29     ` Gerd Hoffmann
@ 2013-01-15 15:15       ` Paolo Bonzini
  0 siblings, 0 replies; 7+ messages in thread
From: Paolo Bonzini @ 2013-01-15 15:15 UTC (permalink / raw)
  To: Gerd Hoffmann
  Cc: Blue Swirl, agraf, Richard Guenther, Andreas Färber,
	qemu-devel

Il 15/01/2013 15:29, Gerd Hoffmann ha scritto:
>> > Using the pragmas unconditionally results in change from:
>> > 
>> >   CC    qemu-timer.o
>> > cc1: warnings being treated as errors
>> > In file included from
>> > /home/andreas/QEMU/qemu-s390/include/ui/qemu-pixman.h:13,
>> >                  from /home/andreas/QEMU/qemu-s390/include/ui/console.h:4,
>> >                  from /home/andreas/QEMU/qemu-s390/qemu-timer.c:27:
>> > /usr/include/pixman-1/pixman.h:225: error: redundant redeclaration of
>> > ‘pixman_transform_from_pixman_f_transform’
>> > /usr/include/pixman-1/pixman.h:221: error: previous declaration of
>> > ‘pixman_transform_from_pixman_f_transform’ was here
>> > make: *** [qemu-timer.o] Fehler 1
>> > 
>> > to:
>> > 
>> >   CC    qemu-timer.o
>> > cc1: warnings being treated as errors
>> > In file included from
>> > /home/andreas/QEMU/qemu-s390/include/ui/qemu-pixman.h:13,
>> >                  from /home/andreas/QEMU/qemu-s390/include/ui/console.h:4,
>> >                  from /home/andreas/QEMU/qemu-s390/qemu-timer.c:27:
>> > /usr/include/pixman-1/pixman.h:221: error: previous declaration of
>> > ‘pixman_transform_from_pixman_f_transform’ was here
>> > make: *** [qemu-timer.o] Fehler 1
> That looks like a gcc bug to me.

Me too.  CCing Richard Guenther, or whatever his surname is now :), from
SuSE.

Paolo

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-01-15 15:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-09  9:17 [Qemu-devel] [PATCH 1/2] gcc: rename CONFIG_PRAGMA_DISABLE_UNUSED_BUT_SET to CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE Gerd Hoffmann
2013-01-09  9:17 ` [Qemu-devel] [PATCH 2/2] pixman: fix warning Gerd Hoffmann
2013-01-12 16:10   ` Blue Swirl
2013-01-15  4:53   ` Andreas Färber
2013-01-15 14:29     ` Gerd Hoffmann
2013-01-15 15:15       ` Paolo Bonzini
2013-01-12 16:10 ` [Qemu-devel] [PATCH 1/2] gcc: rename CONFIG_PRAGMA_DISABLE_UNUSED_BUT_SET to CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE Blue Swirl

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).