Base gcc fails to compile sys/dev/ocs_fc/ocs_ioctl.c and
sys/dev/ocs_fc/ocs_sport.c for i386, with the following -Werror
warnings:
cc1: warnings being treated as errors /usr/src/sys/dev/ocs_fc/ocs_ioctl.c: In function 'ocs_process_sli_config': /usr/src/sys/dev/ocs_fc/ocs_ioctl.c:143: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] /usr/src/sys/dev/ocs_fc/ocs_ioctl.c:172: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] /usr/src/sys/dev/ocs_fc/ocs_ioctl.c:173: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] /usr/src/sys/dev/ocs_fc/ocs_ioctl.c:187: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] /usr/src/sys/dev/ocs_fc/ocs_ioctl.c: In function 'ocs_process_mbx_ioctl': /usr/src/sys/dev/ocs_fc/ocs_ioctl.c:253: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] cc1: warnings being treated as errors /usr/src/sys/dev/ocs_fc/ocs_sport.c: In function '__ocs_sport_attached': /usr/src/sys/dev/ocs_fc/ocs_sport.c:784: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] /usr/src/sys/dev/ocs_fc/ocs_sport.c:808: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
This is because on i386, the casts from in_addr and out_addr (aka
uint64_t) to a pointer reduce the value from 64 bit to 32 bit.
For gcc, this can be fixed by an intermediate cast to uintptr_t. Note
that I am assuming the incoming values will always fit into 32 bit!
For ocs_sport.c, the problem is different, because it tries to print
the display_name field as a string, but first tries to cast it to
unsigned long long. These casts can be removed.