Re: Patch for gnome-common/support/vsnprintf.c (fwd)



Martin> * vsnprintf.c (vsnprintf): Added prototype for systems
Martin> defining __STDC__.

FYI it's almost always incorrect to add a prototype for a library
function just to avoid a warning on some system.  You should only add
a prototype if it fixes an actual bug, or if you add it in such a way
that the prototype will not be seen on systems that have a prototype
in some system header file.

The reason is that despite things like POSIX and ISO C, system headers
still differ.  Any prototype you add is likely to be wrong on one
system or another.  Yes, this sucks.

I haven't actually looked at this particular patch.  I'm just stating
what I think is a general rule (if you have a contrary opinion, with a
reason, I'd love to hear it).

Tom



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]