Skip to contentSkip to conversation

Compiler warnings

DISCUSSION Fred . 3 participants 3 messages Nov 19, 2008 – Nov 20, 2008

lore
Share & tools
lore

Fred .

author
#0 lore raw

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)

#1 lore raw
Quoted 2 lines · 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

#2 lore raw
Quoted 8 lines · Alan Cox
Quoted 2 lines · 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.