Re: compile time warnings

From: Jesper Juhl
Date: Thu Jan 01 2009 - 17:52:19 EST


On Thu, 1 Jan 2009, Ingo Brueckl wrote:

> Maybe somebody noticed already, with kernel 2.6.28 and gcc 4.3.2 there are a
> few compile time warnings:
>
I've looked at these with the kernel from git as of today. I've only read
the code, not build it.

> arch/x86/kernel/setup.c:742: warning: 'dmi_low_memory_corruption' defined but not used
>
I see dmi_low_memory_corruption() as well as usage of it both inside
#ifdef CONFIG_X86_RESERVE_LOW_64K - looks fine to me:

#ifdef CONFIG_X86_RESERVE_LOW_64K
static int __init dmi_low_memory_corruption(const struct dmi_system_id *d)
{
...
static struct dmi_system_id __initdata bad_bios_dmi_table[] = {
#ifdef CONFIG_X86_RESERVE_LOW_64K
{
.callback = dmi_low_memory_corruption,
...


> arch/x86/mm/init_32.c: In function 'pagetable_init':
> arch/x86/mm/init_32.c:515: warning: unused variable 'pgd_base'
>

I see this :

static void __init pagetable_init(void)
{
pgd_t *pgd_base = swapper_pg_dir;

permanent_kmaps_init(pgd_base);
}

pgd_base is very much used...

> drivers/acpi/tables/tbfadt.c: In function 'acpi_tb_create_local_fadt':
> /usr/src/linux/arch/x86/include/asm/string_32.h:75: warning: array subscript is above array bounds
>
> drivers/usb/core/hcd.c: In function 'usb_hcd_poll_rh_status':
> /usr/src/linux/arch/x86/include/asm/string_32.h:75: warning: array subscript is above array bounds
>
Not sure about these.

--
Jesper Juhl <jj@xxxxxxxxxxxxx>
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please http://www.expita.com/nomime.html

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/