svn commit: r299126 - head/sys/dev/acpica

Jung-uk Kim jkim at FreeBSD.org
Thu May 5 18:43:32 UTC 2016


Author: jkim
Date: Thu May  5 18:43:31 2016
New Revision: 299126
URL: https://svnweb.freebsd.org/changeset/base/299126

Log:
  Fix intmax_t to uintptr_t casting on 32-bit platforms.  Found by GCC.
  
  Submitted by:	bde

Modified:
  head/sys/dev/acpica/acpi_thermal.c

Modified: head/sys/dev/acpica/acpi_thermal.c
==============================================================================
--- head/sys/dev/acpica/acpi_thermal.c	Thu May  5 17:55:10 2016	(r299125)
+++ head/sys/dev/acpica/acpi_thermal.c	Thu May  5 18:43:31 2016	(r299126)
@@ -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_AR
     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);
 


More information about the svn-src-head mailing list