2008-11-19 16:16:25

by Fred .Flintstone

[permalink] [raw]
Subject: Compiler warnings

I compiled the Linux 2.6.27.6 kernel on Ubuntu 8.10 with gcc (Ubuntu
4.3.2-1ubuntu11) 4.3.2.

The kernel doesn't compile cleanly, the compiler throws warnings.

CC [M] drivers/cdrom/cdrom.o
drivers/cdrom/cdrom.c: In function 'cdrom_print_info':
drivers/cdrom/cdrom.c:3273: warning: format not a string literal and
no format arguments

CC [M] drivers/char/riscom8.o
drivers/char/riscom8.c: In function 'riscom8_init':
drivers/char/riscom8.c:1598: warning: format not a string literal and
no format arguments
drivers/char/riscom8.c:1608: warning: format not a string literal and
no format arguments

CC [M] drivers/char/n_hdlc.o
drivers/char/n_hdlc.c: In function 'n_hdlc_init':
drivers/char/n_hdlc.c:945: warning: format not a string literal and no
format arguments
drivers/char/n_hdlc.c: In function 'n_hdlc_exit':
drivers/char/n_hdlc.c:968: warning: format not a string literal and no
format arguments

CC [M] drivers/char/hw_random/intel-rng.o
drivers/char/hw_random/intel-rng.c: In function 'intel_init_hw_struct':
drivers/char/hw_random/intel-rng.c:315: warning: format not a string
literal and no format arguments

CC [M] drivers/input/tablet/aiptek.o
drivers/input/tablet/aiptek.c: In function 'show_tabletDiagnosticMessage':
drivers/input/tablet/aiptek.c:1353: warning: format not a string
literal and no format arguments

(I don't know what this means, I am no programmer. I do not subscribe to LKML)


2008-11-19 16:23:30

by Alan

[permalink] [raw]
Subject: Re: Compiler warnings

On Wed, 19 Nov 2008 17:16:14 +0100
"Fred ." <[email protected]> wrote:

> I compiled the Linux 2.6.27.6 kernel on Ubuntu 8.10 with gcc (Ubuntu
> 4.3.2-1ubuntu11) 4.3.2.

Your compiler appears to be faulty. You should report this to Ubuntu

2008-11-20 00:42:15

by Robert Hancock

[permalink] [raw]
Subject: Re: Compiler warnings

Alan Cox wrote:
> On Wed, 19 Nov 2008 17:16:14 +0100
> "Fred ." <[email protected]> wrote:
>
>> I compiled the Linux 2.6.27.6 kernel on Ubuntu 8.10 with gcc (Ubuntu
>> 4.3.2-1ubuntu11) 4.3.2.
>
> Your compiler appears to be faulty. You should report this to Ubuntu
>
The warnings are valid (they're coming from -Wformat-security) but I
don't believe those warnings are normally enabled in kernel compilation.
Presumably some Ubuntu gcc patch enables them by default.