tree.h RB_AUGMENT empty body warning

Matthew Dillon dillon at apollo.backplane.com
Wed Feb 18 11:46:04 PST 2009


:
:On Wed, Feb 18, 2009 at 10:49:29PM +1100, Dmitri Nikulin wrote:
:> #define RB_AUGMENT(x) ((void)x)
:
:Replace that with 
:#define RB_AUGMENT(x) do { (void)x; } while (0)
:
:Joerg

    I really don't like this idea.  Adding braces and dummy do/while,
    but I don't like casting the passed expression to void simply as
    a means of avoiding a compiler warning.

    What is this RB_AUGMENT stuff used for anyway?  It looks to me like
    it should just be removed.

					-Matt
					Matthew Dillon 
					<dillon at backplane.com>





More information about the Users mailing list