Page MenuHomeFreeBSD

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

Authored by jhb on Tue, Jan 20, 3:39 PM.
Tags
None
Referenced Files
F142568778: D54797.id.diff
Wed, Jan 21, 2:57 AM
F142563474: D54797.id170131.diff
Wed, Jan 21, 1:22 AM
F142557837: D54797.diff
Tue, Jan 20, 11:47 PM
F142549902: D54797.diff
Tue, Jan 20, 9:29 PM
F142528768: D54797.id170131.diff
Tue, Jan 20, 4:04 PM
Subscribers

Details

Reviewers
glebius
jrtc27
brooks
Group Reviewers
cheri
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