2.4.15-pre4 compile error
setup.c: In funtion 'c_start':
setup.c:2791: subscripted value is neither array nor pointer setup.c:2792: warning: control reaches end of non-void function make[1]: *** [setup.o] Error 1
Quoted 6 lines · Louis Garcia
setup.c: In funtion 'c_start':
setup.c:2791: subscripted value is neither array nor pointer setup.c:2792: warning: control reaches end of non-void function make[1]: *** [setup.o] Error 1
This patch, (from RML) will fix it.
It's already been posted...
diff -u linux-2.4.15-pre4/include/asm-i386/processor.h linux/include/asm-i386/processor.h
--- linux-2.4.15-pre4/include/asm-i386/processor.h Mon Nov 12 15:17:47 2001+++ linux/include/asm-i386/processor.h Mon Nov 12 15:40:32 2001
@@ -76,7 +76,7 @@
extern struct cpuinfo_x86 cpu_data[];
#define current_cpu_data cpu_data[smp_processor_id()]
#else
-#define cpu_data &boot_cpu_data
+#define cpu_data (&boot_cpu_data)
#define current_cpu_data boot_cpu_data
#endif
Robert Love
Quoted 3 lines
This patch, (from RML) will fix it.
It's already been posted...
[snip]
FWIW, this is Linus' fix, turned into a patch...
-Barry K. Nathan <[email protected]>
arch/i386/kernel/setup.c +1 -1
@@ -2788,7 +2788,7 @@static void *c_start (struct seq_file *m,loff_t *pos) { -return *pos <NR_CPUS ? &cpu_data[*pos] :NULL ; +return *pos <NR_CPUS ? cpu_data+*pos :NULL ; }static void *c_next (struct seq_file *m,void *v,loff_t *pos) {
include/asm-i386/processor.h +1 -1
@@ -76,7 +76,7 @@extern struct cpuinfo_x86 cpu_data[];#define current_cpu_data cpu_data[smp_processor_id()]#else -#define cpu_data &boot_cpu_data +#define cpu_data (&boot_cpu_data)#define current_cpu_data boot_cpu_data#endif