--- libaitio/inc/Attic/atree.h 2011/06/07 11:49:39 1.2 +++ libaitio/inc/Attic/atree.h 2011/08/29 12:00:57 1.3 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: atree.h,v 1.2 2011/06/07 11:49:39 misho Exp $ +* $Id: atree.h,v 1.3 2011/08/29 12:00:57 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -135,7 +135,7 @@ struct { \ SPLAY_RIGHT(tmp, field) = (head)->sph_root; \ (head)->sph_root = tmp; \ } while (0) - + #define SPLAY_ROTATE_LEFT(head, tmp, field) do { \ SPLAY_RIGHT((head)->sph_root, field) = SPLAY_LEFT(tmp, field); \ SPLAY_LEFT(tmp, field) = (head)->sph_root; \ @@ -381,7 +381,7 @@ struct { \ } while (0) #ifndef RB_AUGMENT -#define RB_AUGMENT(x) do {} while (0) +#define RB_AUGMENT(x) (void)(x) #endif #define RB_ROTATE_LEFT(head, elm, tmp, field) do { \ @@ -425,7 +425,7 @@ struct { \ } while (0) /* Generates prototypes and inline functions */ -#define RB_PROTOTYPE(name, type, field, cmp) \ +#define RB_PROTOTYPE(name, type, field, cmp) \ RB_PROTOTYPE_INTERNAL(name, type, field, cmp,) #define RB_PROTOTYPE_STATIC(name, type, field, cmp) \ RB_PROTOTYPE_INTERNAL(name, type, field, cmp, __attribute__((__unused__)) static) @@ -517,7 +517,7 @@ name##_RB_REMOVE_COLOR(struct name *head, struct type if (RB_RIGHT(tmp, field) == NULL || \ RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK) {\ struct type *oleft; \ - if ((oleft = RB_LEFT(tmp, field)))\ + if ((oleft = RB_LEFT(tmp, field))) \ RB_COLOR(oleft, field) = RB_BLACK;\ RB_COLOR(tmp, field) = RB_RED; \ RB_ROTATE_RIGHT(head, tmp, oleft, field);\ @@ -549,7 +549,7 @@ name##_RB_REMOVE_COLOR(struct name *head, struct type if (RB_LEFT(tmp, field) == NULL || \ RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) {\ struct type *oright; \ - if ((oright = RB_RIGHT(tmp, field)))\ + if ((oright = RB_RIGHT(tmp, field))) \ RB_COLOR(oright, field) = RB_BLACK;\ RB_COLOR(tmp, field) = RB_RED; \ RB_ROTATE_LEFT(head, tmp, oright, field);\