Fix -Wsign-compare on arm32#2432
Conversation
|
Error message on gentoo/arm7l see https://github.com/kinkie/dockerfiles/actions/runs/26706938522/job/78709886696 |
rousskov
left a comment
There was a problem hiding this comment.
Thank you for fixing this regression!
src/peer_digest.cc:562:35: error: comparison of integer expressions of different signedness: 'uint32_t' {aka 'unsigned int'} and 'ssize_t' {aka 'int'} [-Werror=sign-compare]
Refactor ... for 32-bit safety ... Due to ssize_t differences on 32/64 bit platforms ...
The jump from "expressions of different signedness" in the error message to "32-bit safety" feels unnecessary here because signedness is different on both 32- and 64-bit platforms AFAICT.
I suggest using something like this for the PR title: Fix -Wsign-compare on arm32.
Please mention the problematic commit SHA in the PR description (or title).
See 4efdc65 for an example.
|
@yadij would you mind fast tracking this PR? It's the only blocker I have for releasing 7.6 |
Due to ssize_t differences on 32/64 bit platforms, changes to peerDigestSwapInMask in commit 556b91a cause signedness comparison errors. Refactor to be safe both on 32- and 64-bit platforms
|
queued for backport to v7 |
Due to ssize_t differences on 32/64 bit platforms, changes to peerDigestSwapInMask in commit 556b91a cause signedness comparison errors. Refactor to be safe both on 32- and 64-bit platforms
Due to ssize_t differences on 32/64 bit platforms, changes
to peerDigestSwapInMask in commit 556b91a cause
signedness comparison errors.
Refactor to be safe both on 32- and 64-bit platforms