Page MenuHomeFreeBSD

rpctls_impl.c: Use a direct cast to uintptr_t instead of __DECONST
ClosedPublic

Authored by jhb on Tue, Jan 20, 3:39 PM.
Tags
None
Referenced Files
F142763824: D54797.id170199.diff
Fri, Jan 23, 7:46 AM
F142763709: D54797.diff
Fri, Jan 23, 7:45 AM
F142750214: D54797.diff
Fri, Jan 23, 2:39 AM
Unknown Object (File)
Wed, Jan 21, 2:57 AM
Unknown Object (File)
Wed, Jan 21, 1:22 AM
Unknown Object (File)
Tue, Jan 20, 11:47 PM
Unknown Object (File)
Tue, Jan 20, 9:29 PM
Unknown Object (File)
Tue, Jan 20, 4:04 PM
Subscribers

Details

Summary

This fixes the build on CHERI architectures where the compiler warns
about a direct cast between uint64_t and const void * inside of
DECONST. However, GCC would also complain about this on 32-bit
kernels due to uint64_t not being the same size as a pointer. Also,
a direct cast to uintptr_t to right-size the cookie value is more
direct than using
DECONST given that there is no "const" pointer
involved in the expression.

Obtained from: CheriBSD
Sponsored by: AFRL, DARPA

Diff Detail

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