[PATCH] asm-ppc/elf.h warning

From: Meelis Roos
Date: Fri Mar 26 2004 - 12:35:02 EST

Just got this from current 2.6 BK:

CC arch/ppc/boot/simple/misc.o
In file included from include/linux/elf.h:5,
from arch/ppc/boot/simple/misc.c:20:
include/asm/elf.h:102: warning: `struct task_struct' declared inside parameter list
include/asm/elf.h:102: warning: its scope is only this definition or declaration, which is probably not what you want

This can be cured by either including linux/sched.h or defining
struct task_struct;
(like this - maybe it should be more close to the headers)

===== include/asm-ppc/elf.h 1.10 vs edited =====
--- 1.10/include/asm-ppc/elf.h Wed Mar 24 04:49:17 2004
+++ edited/include/asm-ppc/elf.h Fri Mar 26 18:40:42 2004
@@ -99,6 +99,7 @@
((t)->thread.regs? \
({ ELF_CORE_COPY_REGS((elfregs), (t)->thread.regs); 1; }): 0)

+struct task_struct;
extern int dump_task_fpu(struct task_struct *t, elf_fpregset_t *fpu);
#define ELF_CORE_COPY_FPREGS(t, fpu) dump_task_fpu((t), (fpu))

Meelis Roos (mroos@xxxxxxxx)

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/