HomeFreeBSD

qeueue.h: Add {SLIST,STAILQ,LIST,TAILQ}_END()

Description

qeueue.h: Add {SLIST,STAILQ,LIST,TAILQ}_END()

We provide these for compat with other queue.h headers since some software
assumes it exists (e.g. the libevent contrib code), but we are not
encouraging their use (NULL should be used instead).

This fixes the following warning (which should arguable be an error since
it results in a function call to an undefined function):

.../contrib/libevent/buffer.c:495:16: warning: implicit declaration of function 'LIST_END' is invalid in C99 [-Wimplicit-function-declaration]

cbent != LIST_END(&buffer->callbacks);
         ^

.../contrib/libevent/buffer.c:495:13: warning: comparison between pointer and integer ('struct evbuffer_cb_entry *' and 'int') [-Wpointer-integer-compare]

cbent != LIST_END(&buffer->callbacks);
~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Reviewed By: jhb
Differential Revision: https://reviews.freebsd.org/D27151

Details

Provenance
arichardsonAuthored on Jan 25 2021, 2:11 PM
Reviewer
jhb
Differential Revision
D27151: qeueue.h: Add {SLIST,STAILQ,LIST,TAILQ}_END()
Parents
rG3454fa118c41: Don't include libarchive fuzz tests by default
Branches
Unknown
Tags
Unknown