Skip to content

-Wnarrowing warning on 32-bit system #22459

Closed

Description

@hebasto

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.

Activity

  1. hebasto commented on Jul 15, 2021

    @hebasto
    MemberAuthor
  2. jonatack commented on Jul 15, 2021

    @jonatack
    Member

    Thanks! On it.

  3. locked as resolved and limited conversation to collaborators on Aug 18, 2022
  4. added a commit that references this issue on Jun 28, 2026
  5. added a commit that references this issue on Jun 30, 2026
  6. added a commit that references this issue on Aug 19, 2026
  7. added a commit that references this issue on Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions