Fix -Wsign-compare warning on ARM 32-bit #18686

pull hebasto wants to merge 1 commits into bitcoin:master from hebasto:200417-arm-sign changing 2 files +11 −3
  1. hebasto commented at 5:14 pm on April 17, 2020: member

    This PR fixes -Wsign-compare warning on ARM 32-bit platform which is emitted on master (54f812d9d29893c690ae06b84aaeab128186aa36) by different compilers:

    • GCC:
    0  CXX      util/libbitcoin_util_a-asmap.o
    1util/asmap.cpp: In function uint32_t Interpret(const std::vector<bool>&, const std::vector<bool>&):
    2util/asmap.cpp:82:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    3                 if (jump >= endpos - pos) break;
    4                     ~~~~~^~~~~~~~~~~~~~~
    5  CXX      util/libbitcoin_util_a-bytevectorhash.o
    
    • Clang:
    0  CXX      util/libbitcoin_util_a-asmap.o
    1util/asmap.cpp:82:26: warning: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'std::ptrdiff_t' (aka 'int') [-Wsign-compare]
    2                if (jump >= endpos - pos) break;
    3                    ~~~~ ^  ~~~~~~~~~~~~
    4  CXX      util/libbitcoin_util_a-bytevectorhash.o
    51 warning generated.
    
  2. Fix -Wsign-compare warning on ARM 32-bit d0b10ed97a
  3. MarcoFalke commented at 5:19 pm on April 17, 2020: member
    Please suggest the change in the open asmap pr
  4. hebasto commented at 5:21 pm on April 17, 2020: member

    Please suggest the change in the open asmap pr

    Done: #18512 (comment)

  5. hebasto closed this on Apr 17, 2020

  6. DrahtBot added the label Utils/log/libs on Apr 17, 2020
  7. hebasto commented at 4:32 am on May 11, 2020: member
    The issue is fixed by eac6a3080d38cfd4eb7204ecd327df213958e51a.
  8. hebasto deleted the branch on May 11, 2020
  9. DrahtBot locked this on Feb 15, 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-19 00:12 UTC

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