Re: signed/unsigned comparison warnings in kernel header files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Greg KH wrote:
On Wed, Nov 10, 2004 at 11:14:09AM -0600, Timur Tabi wrote:

I have a driver that needs to be compilable with as many different kernel versions as possible.

Heh, good luck.

Actually, I've made some really good progress on this front. Maybe I'll write an article for Linux Journal.


Don't use -Wall.  See the linux-kernel archives for previous attempts at
doing this.  As you've found out, many kernel header files don't like
that warning level.

Well, I haven't found anything in the archives, but I did look at the 2.6 kbuild Makefile, and I found this:


CFLAGS          := -Wall -Wstrict-prototypes -Wno-trigraphs \
                   -fno-strict-aliasing -fno-common

So it looks like -Wall is okay for 2.6 kernels, but not 2.4 kernels?

--
Timur Tabi
Staff Software Engineer
timur.tabi@xxxxxxxxxxx

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux