All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Henderson <rth@twiddle.net>
To: Peter Maydell <peter.maydell@linaro.org>, qemu-devel@nongnu.org
Cc: patches@linaro.org, Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] atomic.h: Work around gcc spurious "unused value" warning
Date: Thu, 10 May 2018 07:37:44 -0700	[thread overview]
Message-ID: <d4525d99-e8cd-e56b-e23e-d486cb9f57ef@twiddle.net> (raw)
In-Reply-To: <20180510143618.23673-1-peter.maydell@linaro.org>

On 05/10/2018 07:36 AM, Peter Maydell wrote:
> Some versions of gcc produce a spurious warning if the result of
> __atomic_compare_echange_n() is not used and the type involved
> is a signed 8 bit value:
>   error: value computed is not used [-Werror=unused-value]
> This has been seen on at least
>  gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
> 
> Work around this by using an explicit cast to void to indicate
> that we don't care about the return value.
> 
> We don't currently use our atomic_cmpxchg() macro on any signed
> 8 bit types, but the upcoming support for the Arm v8.1-Atomics
> will require it.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> Sending out my workaround as an actual patch. If this is OK I'll
> put in via target-arm.next as it's a dependency for the v8.1-atomics
> series.
> 
>  include/qemu/atomic.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~

  reply	other threads:[~2018-05-10 14:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-10 14:36 [Qemu-devel] [PATCH] atomic.h: Work around gcc spurious "unused value" warning Peter Maydell
2018-05-10 14:37 ` Richard Henderson [this message]
2018-05-10 14:38   ` Peter Maydell
2018-05-10 14:43     ` Richard Henderson
2018-05-10 14:58 ` Philippe Mathieu-Daudé
2018-05-10 17:09 ` Paolo Bonzini

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=d4525d99-e8cd-e56b-e23e-d486cb9f57ef@twiddle.net \
    --to=rth@twiddle.net \
    --cc=patches@linaro.org \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /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 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.