Base gcc fails to compile sys/dev/acpi_support/atk0110.c for i386,
with the following -Werror warnings:
cc1: warnings being treated as errors /usr/src/sys/dev/acpi_support/atk0110.c: In function 'aibs_sysctl': /usr/src/sys/dev/acpi_support/atk0110.c:456: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] /usr/src/sys/dev/acpi_support/atk0110.c: In function 'aibs_sysctl_ggrp': /usr/src/sys/dev/acpi_support/atk0110.c:522: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] *** [atk0110.o] Error code 1
This is because on i386, the casts from SYSCTL_HANDLER_ARGS's arg2
(which is an intmax_t) to a pointer reduces the value from 64 bit to
32 bit.
For gcc, this can be fixed by an intermediate cast to intptr_t. Note
that I am assuming the incoming arg2 will always fit into 32 bit!