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
F154323645: D36752.id.diff
Mon, Apr 27, 8:31 PM
F154317507: D36752.id111092.diff
Mon, Apr 27, 7:29 PM
Unknown Object (File)
Mon, Apr 20, 8:00 AM
Unknown Object (File)
Sat, Apr 18, 2:56 PM
Unknown Object (File)
Mar 18 2026, 2:29 AM
Unknown Object (File)
Mar 18 2026, 2:21 AM
Unknown Object (File)
Mar 17 2026, 9:05 AM
Unknown Object (File)
Feb 9 2026, 5:11 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.