-Wnarrowing warning on 32-bit system #22459

issue hebasto opened this issue on July 15, 2021
  1. hebasto commented at 3:53 PM on July 15, 2021: member

    On Debian 10.10 32-bit with GCC 8.3.0:

    ...
    bench/peer_eviction.cpp: In function ‘void EvictionProtectionCommon(ankerl::nanobench::Bench&, int, std::function<void(NodeEvictionCandidate&)>)’:
    bench/peer_eviction.cpp:30:51: warning: narrowing conversion of ‘(((uint64_t)(& bench)->ankerl::nanobench::Bench::epochs()) * (& bench)->ankerl::nanobench::Bench::epochIterations())’ from ‘uint64_t’ {aka ‘long long unsigned int’} to ‘std::vector<std::vector<NodeEvictionCandidate> >::size_type’ {aka ‘unsigned int’} inside { } [-Wnarrowing]
         std::vector<Candidates> copies{bench.epochs() * bench.epochIterations(), candidates};
                                        ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
    ...
    

    bench/peer_eviction.cpp was added recently in #22284.

  2. hebasto commented at 3:53 PM on July 15, 2021: member
  3. jonatack commented at 5:16 PM on July 15, 2021: contributor

    Thanks! On it.

  4. jonatack cross-referenced this on Jul 15, 2021 from issue bench: fix 32-bit narrowing warning in bench/peer_eviction.cpp by jonatack
  5. MarcoFalke closed this on Jul 16, 2021

  6. sidhujag referenced this in commit 5d1d1115cc on Jul 23, 2021
  7. hebasto cross-referenced this on Sep 8, 2021 from issue Compiling fails on 32-bit systems by hebasto
  8. bitcoin locked this on Aug 18, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-19 05:53 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me