Author: dim
Date: Sun Jun 17 19:14:05 2018
New Revision: 335296
URL: https://svnweb.freebsd.org/changeset/base/335296

Log:
  Fix build of aibs with base gcc on i386
  
  Add a few intermediate casts to intptr_t to suppress "cast to pointer
  from integer of different size" warnings from gcc.  In this case, the
  'arg2' part of SYSCTL_HANDLER_ARGS is used to pass in a pointer, via an
  intermediate intmax_t, so no information is lost.
  
  Reviewed by:  avg
  MFC after:    3 days
  Differential Revision: https://reviews.freebsd.org/D15725

Modified:
  head/sys/dev/acpi_support/atk0110.c

Modified: head/sys/dev/acpi_support/atk0110.c
==============================================================================
--- head/sys/dev/acpi_support/atk0110.c Sun Jun 17 18:05:27 2018        
(r335295)
+++ head/sys/dev/acpi_support/atk0110.c Sun Jun 17 19:14:05 2018        
(r335296)
@@ -453,7 +453,7 @@ static int
 aibs_sysctl(SYSCTL_HANDLER_ARGS)
 {
        struct aibs_softc       *sc = arg1;
-       struct aibs_sensor      *sensor = (void *)arg2;
+       struct aibs_sensor      *sensor = (void *)(intptr_t)arg2;
        int                     i = oidp->oid_number;
        ACPI_STATUS             rs;
        ACPI_OBJECT             p, *bp;
@@ -519,7 +519,7 @@ static int
 aibs_sysctl_ggrp(SYSCTL_HANDLER_ARGS)
 {
        struct aibs_softc       *sc = arg1;
-       struct aibs_sensor      *sensor = (void *)arg2;
+       struct aibs_sensor      *sensor = (void *)(intptr_t)arg2;
        ACPI_STATUS             rs;
        ACPI_OBJECT             p, *bp;
        ACPI_OBJECT_LIST        arg;
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to