[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libvir] [PATCH] Check calls to printf-like functions (and some fixes)



On Mon, 2007-03-12 at 17:43 +0000, Daniel P. Berrange wrote:

>    if (foo)
>       qemudDebug("blah");
> 
> Which would then turn into
> 
>    if (foo)
>       ;
> 
> Which causes GCC to complain with
> 
>   cc1: warnings being treated as errors
>   driver.c: In function ‘qemudMonitorCommand’:
>   driver.c:101: warning: empty body in an if-statement
> 
> If you have empty  do{}while(0)   then gcc won't complain.

	Yeah, that's why I added the do{}while(0) ... I shouldn't have included
the semi-colon, though.

Cheers,
Mark.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]