Skip to content

Commit

Permalink
gcc: rename CONFIG_PRAGMA_DISABLE_UNUSED_BUT_SET to CONFIG_PRAGMA_DIA…
Browse files Browse the repository at this point in the history
…GNOSTIC_AVAILABLE

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
  • Loading branch information
kraxel authored and blueswirl committed Jan 12, 2013
1 parent 3dd46c7 commit cc6e3ca
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -3078,7 +3078,7 @@ int main(void) {
}
EOF
if compile_prog "-Werror" "" ; then
pragma_disable_unused_but_set=yes
pragma_diagnostic_available=yes
fi

########################################
Expand Down Expand Up @@ -3648,8 +3648,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
Expand Down
4 changes: 2 additions & 2 deletions coroutine-ucontext.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,15 +200,15 @@ 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
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
Expand Down

0 comments on commit cc6e3ca

Please sign in to comment.