mirror of
https://github.com/opnsense/src.git
synced 2026-06-10 17:22:46 -04:00
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
This commit is contained in:
parent
fb0a379774
commit
1bf308c1ea
1 changed files with 1 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue