]> git.proxmox.com Git - mirror_zfs.git/commit
spa: avoid type narrowing warning
authorRyan Libby <rlibby@gmail.com>
Tue, 15 Dec 2020 17:20:06 +0000 (09:20 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 23 Dec 2020 22:34:59 +0000 (14:34 -0800)
commit1fbda9caee1c6418a8d0eeaed7809a4a420cb37e
tree457857c9e2d84950f3564360e01858366d7cd6bd
parent42bdfd3b3620df29d8cb508c1276899580d1545d
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