]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
spa: avoid type narrowing warning
authorRyan Libby <rlibby@gmail.com>
Tue, 15 Dec 2020 17:20:06 +0000 (09:20 -0800)
committerGitHub <noreply@github.com>
Tue, 15 Dec 2020 17:20:06 +0000 (09:20 -0800)
commit956f94010f3163d7104d0674c9b0d7f68038702e
tree18aeb9a4060aafc20758744de882b2bf48d09118
parentc7500ded3e2616ee797dad8db56da93619bbf75c
spa: avoid type narrowing warning

Building the spa module for i386 caused gcc to emit
-Wint-to-pointer-cast "cast to pointer from integer of different size"
because spa.spa_did was uint64_t but pthread_join (via thread_join in
spa_deactivate) takes a pointer (32-bit on i386).  Define spa_did to be
pointer-size instead.  For now spa_did is in fact never non-zero and the
thread_join could instead be ifdef'd out, but changing the size of
spa_did may be more useful for the future.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ryan Libby <rlibby@FreeBSD.org>
Closes #11336
include/sys/spa_impl.h