Integer to Pointer Cast Warnings when Building 2.4.17
Hi,
I Get an integer to pointer typecast warning from some of the sources when building the 2.4.17 kernel, I am using the base 2.4.17 kernel and the ia64 patch with no other patches, the kernel builds fine and comes up fine. Wanted to be sure that this is not a cause for concern. Enclosed below is the excerpt of the build o/p.
make[1]: Entering directory /kernel/linux/arch/ia64/ia32' sys_ia32.c: In function sys32_brk':
sys_ia32.c:3824: warning: passing arg 1 of `__do_clear_user' makes pointer from integer without a cast
make[4]: Entering directory /kernel/linux/drivers/acpi/dispatcher' dswexec.c: In function acpi_ds_exec_end_op':
dswexec.c:580: warning: cast from pointer to integer of different size
make[4]: Entering directory /kernel/linux/drivers/acpi/events' evevent.c: In function acpi_ev_asynch_execute_gpe_method':
evevent.c:686: warning: cast from pointer to integer of different size evevent.c: In function `acpi_ev_gpe_dispatch':
evevent.c:802: warning: cast to pointer from integer of different size
make[3]: Entering directory /kernel/linux/drivers/acpi' os.c: In function acpi_os_get_root_pointer':
os.c:206: warning: assignment makes integer from pointer without a cast
make[3]: Entering directory /kernel/linux/drivers/scsi' megaraid.c: In function megaraid_queue':
megaraid.c:3805: warning: cast to pointer from integer of different size
Regards
Arun
RE: [Linux-ia64] Integer to Pointer Cast Warnings when Building 2
Quoted 4 lines
make[3]: Entering directory
/kernel/linux/drivers/scsi' megaraid.c: In functionmegaraid_queue':
megaraid.c:3805: warning: cast to pointer from integer of different size
This one is OK, albeit not obvious. That's inside an ioctl that can only be called by a 32-bit user space application (no equivalent 64-bit app exists). The code is:
char *user_area = NULL; user_area = (char *)*((u32*)&pScb->SCpnt->cmnd[4]); copy_to_user(user_area,...)
a 32-bit value which is a pointer inside a 32-bit application gets promoted to a 64-bit pointer inside the ioctl so that copy_to_user can be used.
Thanks,
Matt
--
Matt Domsch
Sr. Software Engineer
Dell Linux Solutions www.dell.com/linux
Linux on Dell mailing lists @ http://lists.us.dell.com
#1 US Linux Server provider for 2001!
Arun-
Looks like the prototype for `__do_clear_user' changed, I can fix this when I get home this evening.
Quoted 13 lines · On Mon, Jun 03, 2002 at 05:57:47PM +0530, LAKSHMIPATHY,ARUN (HP-India,ex2)…
Hi,
I Get an integer to pointer typecast warning from some of the sources when building the 2.4.17 kernel, I am using the base 2.4.17 kernel and the ia64 patch with no other patches, the kernel builds fine and comes up fine. Wanted to be sure that this is not a cause for concern. Enclosed below is the excerpt of the build o/p.
make[1]: Entering directory
/kernel/linux/arch/ia64/ia32' sys_ia32.c: In functionsys32_brk':
sys_ia32.c:3824: warning: passing arg 1 of `__do_clear_user' makes pointer from integer without a cast
Signature · 4 lines
Don Dugger "Censeo Toto nos in Kansa esse decisse." - D. Gale [email protected] Ph: 303/652-0870x117
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · On Mon, 3 Jun 2002 17:57:47 +0530, "LAKSHMIPATHY,ARUN (HP-India,ex2)"…
Arun> make[4]: Entering directory
Arun> /kernel/linux/drivers/acpi/dispatcher' dswexec.c: In function Arun> acpi_ds_exec_end_op': dswexec.c:580: warning: cast from Arun> pointer to integer of different size
Arun> make[4]: Entering directory
Arun> /kernel/linux/drivers/acpi/events' evevent.c: In function Arun> acpi_ev_asynch_execute_gpe_method': evevent.c:686: warning:
Arun> cast from pointer to integer of different size evevent.c: In Arun> function `acpi_ev_gpe_dispatch': evevent.c:802: warning: cast Arun> to pointer from integer of different size
Arun> make[3]: Entering directory `/kernel/linux/drivers/acpi' os.c:
Arun> In function `acpi_os_get_root_pointer': os.c:206: warning:
Arun> assignment makes integer from pointer without a cast
These come from the ACPI subsystem. They annoy me, too, but it's up to the ACPI folks to fix them. It's possible they're already fixed in the latest ACPI drops.
--david
Quoted 3 lines · David Mosberger
These come from the ACPI subsystem. They annoy me, too, but it's up to the ACPI folks to fix them. It's possible they're already fixed in the latest ACPI drops.
When compiling my current tree which includes ACPI CA 20020517, the only warning I get is:
pci_irq.c: In function `acpi_pci_irq_enable':
pci_irq.c:304: warning: unused variable `irq_mask'
which is a fairly benign type of warning.
Signature · 1 line
Revolutions do not require corporate support.