On Saturday 06 April 2013, Mark Kettenis wrote:
> > From: Stefan Fritsch <[email protected]>
> > Date: Sat, 6 Apr 2013 13:04:04 +0200
> > 
> > Also, there does not seem to be a header in the kernel yet, that
> > defines the standard PRI*. Should there be a new inttypes.h or,
> > since we probably want to define these always, do we put them
> > into {,_}types.h?
> 
> There is no such header since we don't want that anybody uses them
> in the kernel.  We don't want anybody using them in base either,
> although sometimes people make different decisions for their own
> sub-project (e.g. smtpd).

That wasn't clear from Miod's response. So the policy is to assume 
that char/short/int/long long are 8/16/32/64 bits and that intptr_t is 
long? Should that be added to style(9), then?

> 
> > > > Maybe a useful first step would be to remove -Wno-format and
> > > > use -Wno- error=format instead?
> > > 
> > > No, this syntax is not understood by gcc < 4.
> > 
> > Since the warning options are defined in
> > sys/arch/XX/XX/Makefile.XX, this can be done per architecture.
> > We could do it on i386/amd64 only at first, that would already
> > be a big win. "-Wno-errror=format" does not seem to prevent the
> > warning 'zero-length kprintf format string' from triggering an
> > error, but that seems to occur only once and could be fixed
> > easily.
> 
> Adding warnings without making them errors is almost a guarantee
> that people will ignore them.

The warnings are sufficiently rare to stand out (on average one 
warning in 10 source files on i386). Especially if one develops in a 
few files and frequently recompiles those. So, "-Wno-errror=format" 
may help that no new problems appear and a few people will likely care 
enough to even fix old problems.

Reply via email to