cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: yangtse: curl/lib sendf.c,1.125,1.126 sendf.h,1.33,1.34

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Mon, 26 Mar 2007 19:34:46 -0700

On Tue, Mar 27, 2007 at 04:03:30AM +0200, Yang Tse wrote:
> Well, its the plain old matter with platforms that lack autotools support.

Those platforms can add the right constant to their specific config.h file.
If they don't, the fallback (void) method is used and all is still well.

> This arises another point. In case --disable-verbose is used and the
> compiler does not support variadic macros the definition that will be
> used is "#define infof (void)" which can give plenty of warnings as
> "left-hand operand of comma expression has no effect".

I wouldn't worry about that very much at all. All the compilers currently
used in the automatic builds don't seem to have a problem, and other
compilers are likely to show other warnings as well (since we're not aware
of them and therefore can't fix them).

> I think it is better to just use "#define infof Curl_infof" in case no
> variadic macro support is available, while making a Curl_infof() empty
> body in case --disable-verbose is used.

That spoils the point of --disable-verbose altogether, which is to reduce
the size of the object file by eliminating all the unused strings. That's
more important (to me anyway) than having a build without any warnings.

> In this case lots of strings might get finally into the code, but at
> least with no warnings. It could happen that even when using "#define
> infof (void)" the strings would make their way into the code with old
> compilers which lack variadic macro support.

Then there's not much we can do about those compilers. But there's no
sense in penalizing many other compilers for the sake of such a theoretical
one.

> So if no one says anything in a couple of days against this last
> change I'll commit it then.

That's a NAK from me.

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
Received on 2007-03-27