On Tue, Aug 21, 2012 at 09:43:25PM +0200, Alexandre Ratchov wrote:
> On Mon, Aug 20, 2012 at 10:10:39AM +0200, Marc Espie wrote:
> > since you have -Werror in your CFLAGS, sndio fails a build with 
> > WARNINGS=Yes...
> > 
> > The following patch fixes things.
> > - hex constants are unsigned.
> 
> OK, sure
> 
> > - prototypes for everything.
> 
> Why, aren't forward declaration good enough ?

Not with -Wstrict-prototypes.

> But does this mean we start avoiding local variables that shadow
> functions? This means that div, pause, time, and many other common
> names are to be avoided as well, doesn't it?

Well, if you write portable code, you should.

Some of this may be implemented as macros under some OSes ;(

I don't have the C standard with me, but I believe that it doesn't restrict
very much about this. The only thing I remember for sure is that, unless
specifically documented differently, functions in the standard must exist
as functions. They may also exist as macros, and you may have to do
something like:
#undef function
in order to get a pointer to said function...

Granted, the trend seems to be that everything excepts BSDs and Linux is
dead anyways, so if it builds there, you should be fine. ;(

Reply via email to