Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 Jun 2018 19:14:06 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r335296 - head/sys/dev/acpi_support
Message-ID:  <201806171914.w5HJE68q080258@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201806171914.w5HJE68q080258>