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
Unknown Object (File)
Tue, Mar 4, 5:32 PM
Unknown Object (File)
Sat, Mar 1, 10:54 AM
Unknown Object (File)
Thu, Feb 27, 2:37 AM
Unknown Object (File)
Jan 21 2025, 2:38 PM
Unknown Object (File)
Nov 25 2024, 2:55 AM
Unknown Object (File)
Nov 16 2024, 1:27 PM
Unknown Object (File)
Nov 16 2024, 12:26 PM
Unknown Object (File)
Nov 16 2024, 10:48 AM
Subscribers

Details

Summary

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

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.