tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: xdrproc_t prototype

In article <>,
Iain Hibbert  <> wrote:
>I found a problem building NetBSD with pcc, in that the xdrproc_t typedef
>in /usr/include/rpc/xdr.h does not provide a complete prototype, which
>causes warnings with -Wmissing-prototypes (gcc accepts a partial, for some
>FreeBSD some years ago changed this to a varargs prototype (about the best
>option I think), like so
>-typedef       bool_t (*xdrproc_t)(/* XDR *, void *, u_int */);
>+typedef       bool_t (*xdrproc_t)(XDR *, ...);
>and I would like to do that also. It causes no functional change but
>requires a bunch of additional casts throughout the codebase (there are
>some already, in similar positions), since the functions that are
>generally used as xdrproc_t are not actual vararg functions (but they do
>have a varying number of arguments), and browsing the FreeBSD cvsweb, they
>seem to have made the a similar choice regarding the casts.  As to third
>party code, I think that since FreeBSD did this nearly 10 years ago most
>problem code has likely been flagged and fixed.
>patch attached, any objections?

go for it.


Home | Main Index | Thread Index | Old Index