Re: [PATCH] irda: fix type of struct irda_ias_set.attribute.irda_attrib_string.len

Paul Jackson
2003-12-30T12:42:36Z

A couple of months ago, Linus wrote:
> That's why I hate the "sign compare" warning of gcc so much - it warns
> about things that you CANNOT sanely write in any other way. That makes
> that particular warning _evil_, since it encourages people to write crap
> code.

Then get rid of that warning, using -Wno-sign-compare:

The following change to the top level Makefile tells gcc not to complain
about this:

===== Makefile 1.439 vs edited =====
164c164
< HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
---
> HOSTCFLAGS = -Wall -Wno-sign-compare -Wstrict-prototypes -O2 -fomit-frame-pointer
278c278
< CFLAGS := -Wall -Wstrict-prototypes -Wno-trigraphs -O2 \
---
> CFLAGS := -Wall -Wno-sign-compare -Wstrict-prototypes -Wno-trigraphs -O2 \

Would you like me to send Andrew a real patch for this?

I have been running all my personal builds with this change for a month
now, ever since I picked up some version of gcc that is fond of that
warning.

--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@sgi.com> 1.650.933.1373