All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Emilio G. Cota" <cota@braap.org>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>
Cc: "Richard Henderson" <richard.henderson@linaro.org>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	qemu-devel@nongnu.org, "Alexander Bulekov" <alxndr@bu.edu>
Subject: Re: [PATCH v3] tests/qht-bench: Fix Clang 'implicit-int-float-conversion' warning
Date: Thu, 7 May 2020 00:54:13 -0400	[thread overview]
Message-ID: <20200507045413.GA59851@sff> (raw)
In-Reply-To: <20200504144352.23021-1-philmd@redhat.com>

On Mon, May 04, 2020 at 16:43:52 +0200, Philippe Mathieu-Daudé wrote:
> When building with Clang 10 on Fedora 32, we get:
> 
>   tests/qht-bench.c:287:29: error: implicit conversion from 'unsigned long' to 'double' changes value from 18446744073709551615 to 18446744073709551616 [-Werror,-Wimplicit-int-float-conversion]
(snip)
> @@ -284,7 +285,7 @@ static void do_threshold(double rate, uint64_t *threshold)
>      if (rate == 1.0) {
>          *threshold = UINT64_MAX;
>      } else {
> -        *threshold = rate * UINT64_MAX;
> +        *threshold = rate * nextafter(0x1p64, 0.0);

Reviewed-by: Emilio G. Cota <cota@braap.org>

Please consider mentioning 25f74087c69 in the commit log -- it clearly
describes the problem.

Thanks,

		Emilio


      parent reply	other threads:[~2020-05-07  4:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-04 14:43 [PATCH v3] tests/qht-bench: Fix Clang 'implicit-int-float-conversion' warning Philippe Mathieu-Daudé
2020-05-05  8:28 ` no-reply
2020-05-07  4:54 ` Emilio G. Cota [this message]

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=20200507045413.GA59851@sff \
    --to=cota@braap.org \
    --cc=alex.bennee@linaro.org \
    --cc=alxndr@bu.edu \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.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.