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:
      CXX      util/libbitcoin_util_a-asmap.o
    util/asmap.cpp: In function ‘uint32_t Interpret(const std::vector<bool>&, const std::vector<bool>&)’:
    util/asmap.cpp:82:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                     if (jump >= endpos - pos) break;
                         ~~~~~^~~~~~~~~~~~~~~
      CXX      util/libbitcoin_util_a-bytevectorhash.o
    
    • Clang:
      CXX      util/libbitcoin_util_a-asmap.o
    util/asmap.cpp:82:26: warning: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'std::ptrdiff_t' (aka 'int') [-Wsign-compare]
                    if (jump >= endpos - pos) break;
                        ~~~~ ^  ~~~~~~~~~~~~
      CXX      util/libbitcoin_util_a-bytevectorhash.o
    1 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
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-24 21:14 UTC

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