-Wnarrowing warning on 32-bit system #22459

issue hebasto openend 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:

    0...
    1bench/peer_eviction.cpp: In function ‘void EvictionProtectionCommon(ankerl::nanobench::Bench&, int, std::function<void(NodeEvictionCandidate&)>)’:
    2bench/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]
    3     std::vector<Candidates> copies{bench.epochs() * bench.epochIterations(), candidates};
    4                                    ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
    5...
    

    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: member
    Thanks! On it.
  4. MarcoFalke closed this on Jul 16, 2021

  5. sidhujag referenced this in commit 5d1d1115cc on Jul 23, 2021
  6. DrahtBot 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: 2025-01-22 00:12 UTC

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