Page MenuHomeFreeBSD

Fix various places which cast a pointer to a uint64_t or vice versa.
ClosedPublic

Authored by jhb on Sep 27 2022, 5:36 PM.
Tags
None
Referenced Files
F102727724: D36752.diff
Sat, Nov 16, 10:48 AM
Unknown Object (File)
Thu, Nov 14, 1:28 PM
Unknown Object (File)
Sat, Nov 2, 4:57 AM
Unknown Object (File)
Wed, Oct 23, 2:24 AM
Unknown Object (File)
Sep 30 2024, 11:39 PM
Unknown Object (File)
Sep 19 2024, 9:18 PM
Unknown Object (File)
Sep 19 2024, 4:59 PM
Unknown Object (File)
Sep 18 2024, 12:47 AM
Subscribers

Details

Summary

GCC warns about the mismatched sizes on 32-bit platforms.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 47567
Build 44454: arc lint + arc unit

Event Timeline

jhb requested review of this revision.Sep 27 2022, 5:36 PM
imp added inline comments.
sys/dev/iser/iser_initiator.c
293

Dropping the extra cast may lead to warnings when sizeof(uintptr_t) != sizeof(size_t)

This revision is now accepted and ready to land.Sep 27 2022, 6:19 PM
sys/dev/iser/iser_initiator.c
293

I tried to delete this comment, since it turned out to be wrong.

sys/dev/iser/iser_initiator.c
293

Only CHERI has those and it's actually more well-defined to add offsets (size_t or ptrdiff_t) to pointers than to add two pointers together.