Skip to content

Conversation

@jonatack
Copy link
Member

Closes #22459.

@DrahtBot DrahtBot added the Tests label Jul 15, 2021
Copy link
Member

@hebasto hebasto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK e49d50c, tested on Debian 10.10 (i386):

$ CONFIG_SITE=$PWD/depends/i686-pc-linux-gnu/share/config.site ./configure --enable-suppress-external-warnings
$ make -j 9 > /dev/null
ar: `u' modifier ignored since `D' is the default (see `U')
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};
                                    ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
ar: `u' modifier ignored since `D' is the default (see `U')
ar: `u' modifier ignored since `D' is the default (see `U')
  • with this PR
$ CONFIG_SITE=$PWD/depends/i686-pc-linux-gnu/share/config.site ./configure --enable-suppress-external-warnings
$ make -j 9 > /dev/null
ar: `u' modifier ignored since `D' is the default (see `U')
ar: `u' modifier ignored since `D' is the default (see `U')
ar: `u' modifier ignored since `D' is the default (see `U')

@maflcko maflcko merged commit f8b20fd into bitcoin:master Jul 16, 2021
@jonatack jonatack deleted the fix-32bit-narrowing-warning branch July 16, 2021 06:54
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Jul 23, 2021
…r_eviction.cpp

e49d50c bench: fix 32-bit narrowing warning in bench/peer_eviction.cpp (Jon Atack)

Pull request description:

  Closes bitcoin#22459.

ACKs for top commit:
  hebasto:
    ACK e49d50c, tested on Debian 10.10 (i386):

Tree-SHA512: 8ca366fc296c633dbc8b8e0e7d80f4f6a64d02fb3da86d199881364f027d34b816a3c964b3fea2c1cc0b3ad51dd02d93c8bb14b5ebbd99fb4073cd1031766332
gwillen pushed a commit to ElementsProject/elements that referenced this pull request Jun 1, 2022
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Aug 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

-Wnarrowing warning on 32-bit system

4 participants