diff --git a/cmd/zstream/zstream_decompress.c b/cmd/zstream/zstream_decompress.c index e5527777bca3..6e0da0852b72 100644 --- a/cmd/zstream/zstream_decompress.c +++ b/cmd/zstream/zstream_decompress.c @@ -146,7 +146,7 @@ zstream_do_decompress(int argc, char *argv[]) p = hsearch(e, ENTER); if (p == NULL) errx(1, "hsearch"); - p->data = (void*)type; + p->data = (void*)(intptr_t)type; } if (isatty(STDIN_FILENO)) { diff --git a/include/os/freebsd/spl/acl/acl_common.h b/include/os/freebsd/spl/acl/acl_common.h index 2b77bdb6ea3d..53b69154d671 100644 --- a/include/os/freebsd/spl/acl/acl_common.h +++ b/include/os/freebsd/spl/acl/acl_common.h @@ -47,7 +47,7 @@ extern int acltrivial(const char *); extern void adjust_ace_pair(ace_t *pair, mode_t mode); extern void adjust_ace_pair_common(void *, size_t, size_t, mode_t); extern int ace_trivial_common(void *, int, - uint64_t (*walk)(void *, uint64_t, int aclcnt, uint16_t *, uint16_t *, + uintptr_t (*walk)(void *, uintptr_t, int aclcnt, uint16_t *, uint16_t *, uint32_t *mask)); #if !defined(_KERNEL) extern acl_t *acl_alloc(acl_type_t); diff --git a/include/sys/zfs_onexit.h b/include/sys/zfs_onexit.h index 18930fe01c7a..91f49d4cc5a3 100644 --- a/include/sys/zfs_onexit.h +++ b/include/sys/zfs_onexit.h @@ -54,7 +54,7 @@ extern void zfs_onexit_destroy(zfs_onexit_t *zo); extern zfs_file_t *zfs_onexit_fd_hold(int fd, minor_t *minorp); extern void zfs_onexit_fd_rele(zfs_file_t *); extern int zfs_onexit_add_cb(minor_t minor, void (*func)(void *), void *data, - uint64_t *action_handle); + uintptr_t *action_handle); #ifdef __cplusplus } diff --git a/lib/libzfs/libzfs_dataset.c b/lib/libzfs/libzfs_dataset.c index f8a61c64261f..87bc4ea66c5b 100644 --- a/lib/libzfs/libzfs_dataset.c +++ b/lib/libzfs/libzfs_dataset.c @@ -2087,16 +2087,16 @@ zfs_is_recvd_props_mode(zfs_handle_t *zhp) } static void -zfs_set_recvd_props_mode(zfs_handle_t *zhp, uint64_t *cookie) +zfs_set_recvd_props_mode(zfs_handle_t *zhp, uintptr_t *cookie) { - *cookie = (uint64_t)(uintptr_t)zhp->zfs_props; + *cookie = (uintptr_t)zhp->zfs_props; zhp->zfs_props = zhp->zfs_recvd_props; } static void -zfs_unset_recvd_props_mode(zfs_handle_t *zhp, uint64_t *cookie) +zfs_unset_recvd_props_mode(zfs_handle_t *zhp, uintptr_t *cookie) { - zhp->zfs_props = (nvlist_t *)(uintptr_t)*cookie; + zhp->zfs_props = (nvlist_t *)*cookie; *cookie = 0; } @@ -2373,7 +2373,7 @@ zfs_prop_get_recvd(zfs_handle_t *zhp, const char *propname, char *propbuf, prop = zfs_name_to_prop(propname); if (prop != ZPROP_USERPROP) { - uint64_t cookie; + uintptr_t cookie; if (!nvlist_exists(zhp->zfs_recvd_props, propname)) return (-1); zfs_set_recvd_props_mode(zhp, &cookie); diff --git a/lib/libzpool/kernel.c b/lib/libzpool/kernel.c index 1d46470947d3..77264470baef 100644 --- a/lib/libzpool/kernel.c +++ b/lib/libzpool/kernel.c @@ -1001,7 +1001,7 @@ zfs_onexit_fd_rele(zfs_file_t *fp) int zfs_onexit_add_cb(minor_t minor, void (*func)(void *), void *data, - uint64_t *action_handle) + uintptr_t *action_handle) { (void) minor, (void) func, (void) data, (void) action_handle; return (0); diff --git a/module/lua/lapi.c b/module/lua/lapi.c index ed3a0f4cf9ec..703cf4cc2a36 100644 --- a/module/lua/lapi.c +++ b/module/lua/lapi.c @@ -444,7 +444,7 @@ LUA_API const void *lua_topointer (lua_State *L, int idx) { case LUA_TTABLE: return hvalue(o); case LUA_TLCL: return clLvalue(o); case LUA_TCCL: return clCvalue(o); - case LUA_TLCF: return cast(void *, cast(size_t, fvalue(o))); + case LUA_TLCF: return cast(void *, cast(uintptr_t, fvalue(o))); case LUA_TTHREAD: return thvalue(o); case LUA_TUSERDATA: case LUA_TLIGHTUSERDATA: diff --git a/module/os/freebsd/spl/acl_common.c b/module/os/freebsd/spl/acl_common.c index b692ccdf232a..04a5d2869d1b 100644 --- a/module/os/freebsd/spl/acl_common.c +++ b/module/os/freebsd/spl/acl_common.c @@ -1654,13 +1654,13 @@ acl_trivial_create(mode_t mode, boolean_t isdir, ace_t **acl, int *count) */ int ace_trivial_common(void *acep, int aclcnt, - uint64_t (*walk)(void *, uint64_t, int aclcnt, + uintptr_t (*walk)(void *, uintptr_t, int aclcnt, uint16_t *, uint16_t *, uint32_t *)) { uint16_t flags; uint32_t mask; uint16_t type; - uint64_t cookie = 0; + uintptr_t cookie = 0; while ((cookie = walk(acep, cookie, aclcnt, &flags, &type, &mask))) { switch (flags & ACE_TYPE_FLAGS) { diff --git a/module/os/freebsd/zfs/zfs_acl.c b/module/os/freebsd/zfs/zfs_acl.c index c075e180a860..16bcd338de21 100644 --- a/module/os/freebsd/zfs/zfs_acl.c +++ b/module/os/freebsd/zfs/zfs_acl.c @@ -631,8 +631,8 @@ zfs_acl_next_ace(zfs_acl_t *aclp, void *start, uint64_t *who, return (NULL); } -static uint64_t -zfs_ace_walk(void *datap, uint64_t cookie, int aclcnt, +static uintptr_t +zfs_ace_walk(void *datap, uintptr_t cookie, int aclcnt, uint16_t *flags, uint16_t *type, uint32_t *mask) { (void) aclcnt; @@ -642,7 +642,7 @@ zfs_ace_walk(void *datap, uint64_t cookie, int aclcnt, acep = zfs_acl_next_ace(aclp, acep, &who, mask, flags, type); - return ((uint64_t)(uintptr_t)acep); + return ((uintptr_t)acep); } /* diff --git a/module/os/linux/zfs/zfs_acl.c b/module/os/linux/zfs/zfs_acl.c index d04034490758..437169990f02 100644 --- a/module/os/linux/zfs/zfs_acl.c +++ b/module/os/linux/zfs/zfs_acl.c @@ -629,18 +629,18 @@ zfs_acl_next_ace(zfs_acl_t *aclp, void *start, uint64_t *who, return (NULL); } -static uint64_t -zfs_ace_walk(void *datap, uint64_t cookie, int aclcnt, +static uintptr_t +zfs_ace_walk(void *datap, uintptr_t cookie, int aclcnt, uint16_t *flags, uint16_t *type, uint32_t *mask) { (void) aclcnt; zfs_acl_t *aclp = datap; - zfs_ace_hdr_t *acep = (zfs_ace_hdr_t *)(uintptr_t)cookie; + zfs_ace_hdr_t *acep = (zfs_ace_hdr_t *)cookie; uint64_t who; acep = zfs_acl_next_ace(aclp, acep, &who, mask, flags, type); - return ((uint64_t)(uintptr_t)acep); + return ((uintptr_t)acep); } /* @@ -1285,7 +1285,7 @@ acl_trivial_access_masks(mode_t mode, boolean_t isdir, trivial_acl_t *masks) */ static int ace_trivial_common(void *acep, int aclcnt, - uint64_t (*walk)(void *, uint64_t, int aclcnt, + uintptr_t (*walk)(void *, uintptr_t, int, uint16_t *, uint16_t *, uint32_t *)) { uint16_t flags; diff --git a/module/zfs/zfs_onexit.c b/module/zfs/zfs_onexit.c index dfcdeeb5b46f..63acf7ab2e4d 100644 --- a/module/zfs/zfs_onexit.c +++ b/module/zfs/zfs_onexit.c @@ -151,7 +151,7 @@ zfs_onexit_minor_to_state(minor_t minor, zfs_onexit_t **zo) */ int zfs_onexit_add_cb(minor_t minor, void (*func)(void *), void *data, - uint64_t *action_handle) + uintptr_t *action_handle) { zfs_onexit_t *zo; zfs_onexit_action_node_t *ap; @@ -170,7 +170,7 @@ zfs_onexit_add_cb(minor_t minor, void (*func)(void *), void *data, list_insert_tail(&zo->zo_actions, ap); mutex_exit(&zo->zo_lock); if (action_handle) - *action_handle = (uint64_t)(uintptr_t)ap; + *action_handle = (uintptr_t)ap; return (0); } diff --git a/module/zfs/zfs_vnops.c b/module/zfs/zfs_vnops.c index c63076f90c18..593249e12cb4 100644 --- a/module/zfs/zfs_vnops.c +++ b/module/zfs/zfs_vnops.c @@ -64,7 +64,7 @@ zfs_fsync(znode_t *zp, int syncflag, cred_t *cr) int error = 0; zfsvfs_t *zfsvfs = ZTOZSB(zp); - (void) tsd_set(zfs_fsyncer_key, (void *)zfs_fsync_sync_cnt); + (void) tsd_set(zfs_fsyncer_key, (void *)(uintptr_t)zfs_fsync_sync_cnt); if (zfsvfs->z_os->os_sync != ZFS_SYNC_DISABLED) { if ((error = zfs_enter_verify_zp(zfsvfs, zp, FTAG)) != 0)