Re: why( warning: left-hand operand of comma expression has no effect)

2012-11-19 Thread Colin McCabe
You might be able to silence this with __attribute__((unused)), at least for GCC and llvm. Or possibly by making assert a multi-argument macro... Colin On Fri, Nov 16, 2012 at 4:09 AM, Yoran Heling i...@yorhel.nl wrote: On 2012-11-16, SmallAnt wrote: i embed libev in my program,when

Re: why( warning: left-hand operand of comma expression has no effect)

2012-11-19 Thread Marc Lehmann
On Mon, Nov 19, 2012 at 10:20:44AM -0800, Colin McCabe cmcc...@alumni.cmu.edu wrote: You might be able to silence this with __attribute__((unused)), at is only defined for variables and functions. least for GCC and llvm. Or possibly by making assert a multi-argument macro... macros can't

Re: why( warning: left-hand operand of comma expression has no effect)

2012-11-19 Thread Sam Bobroff
On 16/11/12 23:09, Yoran Heling wrote: [snip] Just look at the source: assert ((libev: watcher has invalid priority, ABSPRI (w) = 0 ABSPRI (w) NUMPRI)); The string has absolutely no effect to the behaviour of the code, so the warning makes sense. However, that string *is* quite useful

Re: why( warning: left-hand operand of comma expression has no effect)

2012-11-19 Thread Marc Lehmann
On Tue, Nov 20, 2012 at 01:16:04AM +, Sam Bobroff sbobr...@shoretel.com wrote: Maybe those hack strings should removed from the assert calls and be moved into comments in the code? Calling this a hack just shows your immaturity in the C language - not everything that is new to you is badly

Re: why( warning: left-hand operand of comma expression has no effect)

2012-11-19 Thread Sam Bobroff
On 20/11/12 12:32, Marc Lehmann wrote: On Tue, Nov 20, 2012 at 01:16:04AM +, Sam Bobroff sbobr...@shoretel.com wrote: Maybe those hack strings should removed from the assert calls and be moved into comments in the code? Calling this a hack just shows your immaturity in the C language -