On Thu, 28 Jan 1999, John Birrell wrote: > Nate Williams wrote: > > > Anyway, if we're going to -Wall'ify the kernel (as we should) > > > then we need to update sytle(9) to reflect that. > > > > > > In fact, style(9) should say: > > > > > > If at all possible, your code should compile without warnings > > > when the gcc -Wall flag is given. > > > > I disagree. As has been shown many times in the past (and I suspect the > > down-under constituent will show that at least a couple of the > > I think you must mean the "Sydney-down-under constituent". There *is* > a difference. 8-) > > > 'warnings' fixes will be wrong and hide bogus code), making -Wall a goal > > causes people to cover up bad code with bad casts and such. > > > > '-Wall' is *NOT* a good design goal. > > Fixing warnings with bad casts is a problem, sure, but asking people > to write code without casts (if possible) that will compile cleanly with > -Wall is a reasonable thing to ask IMO. In my experience, the resulting > code tends to be more portable across architectures with different > pointer/long sizes and endian-ness. > > Just my 0.02, and I hate style(9) anyway. >
In cases, -Wall is bogus anyway. Here's one: foo.c:89: warning: char format, void arg (arg 2) void *region; printf("mem open failed: %s\n", region); According to standards, a void pointer may be freely used instead of any other type of pointer, both as an lvalue and to assign to the other pointer. Printf(), hence, wouldn't see a difference (of course). Gcc should not complain about various void pointer things like this. > -- > John Birrell - j...@cimlogic.com.au; j...@freebsd.org > http://www.cimlogic.com.au/ > CIMlogic Pty Ltd, GPO Box 117A, Melbourne Vic 3001, Australia +61 418 353 137 > > To Unsubscribe: send mail to majord...@freebsd.org > with "unsubscribe freebsd-current" in the body of the message > Brian Feldman _ __ ___ ___ ___ gr...@unixhelp.org _ __ ___ | _ ) __| \ http://www.freebsd.org/ _ __ ___ ____ | _ \__ \ |) | FreeBSD: The Power to Serve! _ __ ___ ____ _____ |___/___/___/ To Unsubscribe: send mail to majord...@freebsd.org with "unsubscribe freebsd-current" in the body of the message