Skip to content

Conversation

hebasto
Copy link
Member

@hebasto hebasto commented Apr 17, 2020

This PR fixes -Wsign-compare warning on ARM 32-bit platform which is emitted on master (54f812d) 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.

@maflcko
Copy link
Member

maflcko commented Apr 17, 2020

Please suggest the change in the open asmap pr

@hebasto
Copy link
Member Author

hebasto commented Apr 17, 2020

Please suggest the change in the open asmap pr

Done: #18512 (comment)

@hebasto
Copy link
Member Author

hebasto commented May 11, 2020

The issue is fixed by eac6a30.

@hebasto hebasto deleted the 200417-arm-sign branch May 11, 2020 04:33
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Feb 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants