fuzz: banman identical branches compiler warning #21247

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

    0In file included from test/fuzz/banman.cpp:10:
    1./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()>}]’:
    2test/fuzz/banman.cpp:77:18:   required from here
    3./test/fuzz/util.h:48:32: warning: this condition has identical branches [-Wduplicated-branches]
    4     return ((i++ == call_index ? callables() : void()), ...);
    5             ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
    6./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

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: 2024-12-18 21:12 UTC

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