Re: Compile failure in test3-pre6 (apm.c)

From: Christopher Cradock (cradockc@oup.co.uk)
Date: Sat Jul 08 2000 - 07:39:37 EST


Meelis Roos wrote:

>
> cc1: warnings being treated as errors
> apm.c:1523: warning: `apm_setup' defined but not used
> {standard input}: Assembler messages:
> {standard input}:259: Warning: indirect lcall without `*'
> {standard input}:337: Warning: indirect lcall without `*'
> make[1]: *** [apm.o] Error 1
> make[1]: Leaving directory `/oma/compile/linux/arch/i386/kernel'
> make: *** [_mod_arch/i386/kernel] Error 2
>

I don't see the assembler warnings, but apm_setup isn't needed if you compile
this as a module. Place a #ifndef MODULE around apm_setup and
__setup("apm="...viz:

--- ../linux-2.4.0-test3-2/arch/i386/kernel/apm.c Tue Jun 27 07:00:30
2000
+++ arch/i386/kernel/apm.c Sat Jul 8 11:49:24 2000
@@ -1517,6 +1519,7 @@
        return 0;
 }

+#ifndef MODULE
 static int __init apm_setup(char *str)
 {
        int invert;
@@ -1542,7 +1545,7 @@
 }

 __setup("apm=", apm_setup);
+#endif
 static struct file_operations apm_bios_fops = {
        owner: THIS_MODULE,
        read: do_read,

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



This archive was generated by hypermail 2b29 : Sat Jul 15 2000 - 21:00:09 EST