fuzz: banman identical branches compiler warning #21247

issue jarolrod opened this issue on February 20, 2021
  1. jarolrod commented at 5:39 PM on February 20, 2021: member

    compiling master, I get the following warning:

    In file included from test/fuzz/banman.cpp:10:
    ./test/fuzz/util.h: In instantiation of ‘void CallOneOf(FuzzedDataProvider&, Callables ...) [with Callables = {banman_fuzz_target(FuzzBufferType)::<lambda()>, banman_fuzz_target(FuzzBufferType)::<lambda()>, banman_fuzz_target(FuzzBufferType)::<lambda()>, banman_fuzz_target(FuzzBufferType)::<lambda()>, banman_fuzz_target(FuzzBufferType)::<lambda()>, banman_fuzz_target(FuzzBufferType)::<lambda()>, banman_fuzz_target(FuzzBufferType)::<lambda()>, banman_fuzz_target(FuzzBufferType)::<lambda()>, banman_fuzz_target(FuzzBufferType)::<lambda()>, banman_fuzz_target(FuzzBufferType)::<lambda()>, banman_fuzz_target(FuzzBufferType)::<lambda()>, banman_fuzz_target(FuzzBufferType)::<lambda()>}]’:
    test/fuzz/banman.cpp:77:18:   required from here
    ./test/fuzz/util.h:48:32: warning: this condition has identical branches [-Wduplicated-branches]
         return ((i++ == call_index ? callables() : void()), ...);
                 ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
    ./test/fuzz/util.h:48:32: warning: this condition has identical branches [-Wduplicated-branches]
    
  2. jarolrod added the label Bug on Feb 20, 2021
  3. MarcoFalke commented at 6:01 PM on February 20, 2021: member

    Which compiler or OS are you using? What are the steps to reproduce?

  4. jarolrod commented at 6:06 PM on February 20, 2021: member

    Sorry, Forgot to add that information

    System: OS: Debian Buster Compiler: GCC 8.3.0

    To Reproduce:

    • Grab master
    • go through compilation process: ./autogen.sh, ./configure, make -jx
    • Get identical branches warning while compiling
  5. MarcoFalke commented at 6:34 PM on February 20, 2021: member

    Looks like a compiler bug. I can reproduce in buster, but not in bullseye

  6. MarcoFalke added the label Upstream on Feb 20, 2021
  7. jarolrod commented at 6:37 PM on February 20, 2021: member

    going to upgrade to gcc 10 and report back

  8. jarolrod commented at 7:19 PM on February 20, 2021: member

    Confirming I cannot replicate with GCC 10.2.1

  9. MarcoFalke closed this on Feb 21, 2021

  10. DrahtBot locked this on Aug 18, 2022
Contributors

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-04-15 00:14 UTC

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