]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Cast through uintptr_t to narrow the buf domain pointer on 32-bit archs
authorjhibbits <jhibbits@FreeBSD.org>
Tue, 20 Mar 2018 02:01:30 +0000 (02:01 +0000)
committerjhibbits <jhibbits@FreeBSD.org>
Tue, 20 Mar 2018 02:01:30 +0000 (02:01 +0000)
commit68f6ae368c616d341b60e5cf02eccc8aeea41cd8
tree1b59ae38bdc1e2f9799ac7aed6c4437b134b873a
parentbfec8330e84956fe77b29b9164582a3ab1937805
Cast through uintptr_t to narrow the buf domain pointer on 32-bit archs

arg2 is an intmax_t, which on 32-bit architectures is 64 bits, wider than a
pointer.  When &bdomain[i] is added to arg2 it widens from uintptr_t to
intmax_t, then gcc whines when it gets cast to a pointer.  Casting through
uintptr_t silences this warning.
sys/kern/vfs_bio.c