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: Jamie Lokier <jamie_at_shareable.org>
Date: Tue, 27 Mar 2007 11:53:02 +0100

Yang Tse wrote:
> 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 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.

Why not this, to optimise away the function call in most cases?

  #define infof if (1) {} else Curl_infof

-- Jamie
Received on 2007-03-27