On Fri, 9 Feb 2007 16:07:38 +0100, Franck Bui-Huu <vagabon.xyz@gmail.com>
wrote:
> CC arch/mips/kernel/signal.o
> arch/mips/kernel/signal.c: In function `sys_sigaction':
> arch/mips/kernel/signal.c:266: warning: cast to pointer from integer of
> different size
>
> This warning is due to the following line:
>
> __get_user(new_ka.sa.sa_handler, &act->sa_handler);
This usage of __get_user() should be absolutely legal.
> new_ka.sa.sa_handler = (__sighandler_t) __gu_tmp;
>
> Here we try to cast an 'unsigned long long' into a 32 bits pointer and
> that's the reason of the warning.
This line is never executed on 32bit kernel and gcc optimize out. On
64-bit kernel, this line is executed without any problem without
warning.
I think this is a problem of __get_user() implementation or gcc
itself. Though I can not find better solution yet, hacking the caller
to avoid the warning would not be right things to to.
---
Atsushi Nemoto
|