Messages in this thread | | | Date | Wed, 7 Jul 1999 13:20:58 +0200 | From | Matthias Andree <> | Subject | Re: [PATCH] /proc/ide/hd?/geometry (un)signedness 2.2.10, 2.3.8 |
| |
* Matthew Wilcox (Matthew.Wilcox@genedata.com) [1999-07-05 10:27]: > On Sat, Jul 03, 1999 at 11:40:08AM +0200, Matthias Andree wrote: > > Should not in ide-proc.c around line 715 the sprintf parameters %hi be > > replaced by %hu so that the kernel returns the proper "39560" cylinder > > count? Looking at ide.h, the cyl is unsigned short anyways so %hi is > > actually really wrong (Just wondering why gcc doesn't warn although > > -Wall is set). > > -Wall doesn't warn about this sort of thing. -W turns on this set of > warnings, which I find rather useful. Would a patch which cleaned up > the header files to make turning on -W less painful be accepted?
Hm. -Wall comprises -Wformat so I'd expect that gcc pukes on my feet. I don't see how that behaviour should change with -W. After some experimenting, it seems to me that -Wformat only checks the sizes of the arguments, not their signedness.
In my opinion, the compiler should warn about every little bit that looks strange to it. Be it formats, be it signedness in assignments and comparisons.
It will be a painful work in some places however, I assume :-)
-- Matthias Andree
Give a man a fish and you feed him for a day; teach him to use the Net and he won't bother you for weeks.
- 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/
| |