[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: build warnings for 2.0.12
> I just got down openldap-2.0.12.tgz from the AARNet mirror, and I'm having
> some issues building the packages. I'm getting a *lot* of messages of the
> form
>
> rq.c: In function Rq_dump':
> rq.c:244: warning: too many arguments for format
> rq.c:244: warning: too many arguments for format
> rq.c:250: warning: too many arguments for format
> rq.c:250: warning: too many arguments for format
> rq.c:255: warning: too many arguments for format
> rq.c:255: warning: too many arguments for format
> rq.c:260: warning: too many arguments for format
> rq.c:260: warning: too many arguments for format
>
> but there are thousands of them. They seem to be related to the Debug()
> macro. I haven't delved into it, partially since the build completes, and
> partially because I'm assuming that, if it isn't something I've fscked up,
> it's got to be known to somebody. So:
>
> Has anyone else had this problem compiling 2.0.12? If so, did the built
> binaries work? And, if not, what had to be changed to fix the problem?
>
> If it turns out the binaries I've just built don't work, I'll probably be
> replying to this message giving the answers... <g>
Don't worry; the point is the macro requires 5 args, the last three being
potential args to a printf-style function and the second being the format.
It has become customary to set to NULL or 0 the args that are not used in
the format; this causes some "smart" compilers to complain because there's
not enough '% something' for the args that intentionally are left unused.
A better practice could be to fill the format with '%s' and add "" for the
unused args!
Pierangelo.