From 1bf308c1ea4170aa71bd0ed66240e975d86c2fb4 Mon Sep 17 00:00:00 2001 From: Maxime Henrion Date: Fri, 3 Mar 2006 18:54:33 +0000 Subject: [PATCH] Cast the pointer to void * before casting it back to struct type * in STAILQ_LAST. This quiets a warning from GCC about increased required alignment for the cast. Idea from: cognet --- sys/sys/queue.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/queue.h b/sys/sys/queue.h index efaf30c6bdd..18958785a95 100644 --- a/sys/sys/queue.h +++ b/sys/sys/queue.h @@ -274,7 +274,7 @@ struct { \ #define STAILQ_LAST(head, type, field) \ (STAILQ_EMPTY((head)) ? \ NULL : \ - ((struct type *) \ + ((struct type *)(void *) \ ((char *)((head)->stqh_last) - __offsetof(struct type, field)))) #define STAILQ_NEXT(elm, field) ((elm)->field.stqe_next)