Fix intmax_t to uintptr_t casting on 32-bit platforms. Found by GCC.

Submitted by:	bde
This commit is contained in:
Jung-uk Kim 2016-05-05 18:43:31 +00:00
parent b7f227d86d
commit c19e9bb3b0

View File

@ -785,7 +785,7 @@ acpi_tz_temp_sysctl(SYSCTL_HANDLER_ARGS)
int error;
sc = oidp->oid_arg1;
temp_ptr = (int *)((uintptr_t)sc + oidp->oid_arg2);
temp_ptr = (int *)(void *)(uintptr_t)((uintptr_t)sc + oidp->oid_arg2);
temp = *temp_ptr;
error = sysctl_handle_int(oidp, &temp, 0, req);
@ -814,7 +814,7 @@ acpi_tz_passive_sysctl(SYSCTL_HANDLER_ARGS)
int error;
sc = oidp->oid_arg1;
val_ptr = (int *)((uintptr_t)sc + oidp->oid_arg2);
val_ptr = (int *)(void *)(uintptr_t)((uintptr_t)sc + oidp->oid_arg2);
val = *val_ptr;
error = sysctl_handle_int(oidp, &val, 0, req);