diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2020-06-17 13:13:09 -0700 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2020-06-19 18:29:11 +0100 |
commit | 06c4cc3660b366278bdc7bc8b6677032d7b1118c (patch) | |
tree | 499f20a96fdb397076f0754ebd318aea56608889 /hw/audio/gusemu_hal.c | |
parent | 4d285821c5055ed68a6f6b7693fd11a06a1aa426 (diff) |
qht: Fix threshold rate calculation
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]
*threshold = rate * UINT64_MAX;
~ ^~~~~~~~~~
Fix this by splitting the 64-bit constant into two halves,
each of which is individually perfectly representable, the
sum of which produces the correct arithmetic result.
This is very likely just a sticking plaster over some underlying
incorrect code, but it will suppress the warning for the moment.
Cc: Emilio G. Cota <cota@braap.org>
Reported-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/audio/gusemu_hal.c')
0 files changed, 0 insertions, 0 deletions