[Olsr-dev] (format)

Sven-Ola Tuecke (spam-protected)
Wed May 23 18:57:35 CEST 2007


Hi Bernd,

investigated a bit. That thing is really old (claims 2.9x from 2001). Look 
for example in src/build_msg.c:818.

OLSR_PRINTF(1, "TC: Sending empty package\n");

which expands to

do { if((olsr_cnf->debug_level >= ( 1 )) && debug_handle) 
fprintf(debug_handle, (  "TC: Sending empty package\n"  ); } while (0) ;

Looks like the empty ellipse (...args) is handled differently. As long as 
other compilers (windoof, osx, bsd) do not complain -> simply ignore my 
post.

// Sven-Ola

"Bernd Petrovitsch" <(spam-protected)> schrieb im Newsbeitrag 
news:(spam-protected)
> On Wed, 2007-05-23 at 13:06 +0200, Sven-Ola Tuecke wrote:
>> Hi (bernd),
>>
>> in defs.h, the OLSR_PRINTF macro is changed to surround the format 
>> parameter
>> with braces. I have at least one older preprocessor who stumbles over 
>> this.
>> Any good reason for the braces?
>
> Yes: No one knows what comes in as a value of that parameter and the
> braces guarantee that is is parsed as one expression.
>
> Are you really sure that the preprocessor (which one? which version?)
> complain about these braces (and not - what I would expect in the first
> place since it is a gcc extension AFAIK - the variadic macro parameter)?
>
> Bernd
> -- 
> Firmix Software GmbH                   http://www.firmix.at/
> mobil: +43 664 4416156                 fax: +43 1 7890849-55
>          Embedded Linux Development and Services
>
>


--------------------------------------------------------------------------------


> -- 
> Olsr-dev mailing list
> (spam-protected)
> https://lists.olsr.org/mailman/listinfo/olsr-dev
> 




More information about the Olsr-dev mailing list