From: Simon Marchi Date: Mon, 25 Nov 2019 20:14:47 +0000 (-0500) Subject: compat: remove always true assertion in compat-poll.c X-Git-Tag: v2.12.0-rc1~185 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=4375b3d11abd6299e4eac8fafa4c7e0437ad9cfe compat: remove always true assertion in compat-poll.c Fix: CC compat-poll.lo In file included from /home/smarchi/src/lttng-tools/src/common/compat/poll.h:21:0, from /home/smarchi/src/lttng-tools/src/common/compat/compat-poll.c:31: /home/smarchi/src/lttng-tools/src/common/compat/compat-poll.c: In function ‘compat_poll_wait’: /home/smarchi/src/lttng-tools/src/common/compat/compat-poll.c:317:31: error: comparison of unsigned expression >= 0 is always true [-Werror=type-limits] assert(events->current.nb_fd >= 0); ^ Change-Id: Ie2b43e64d293d4eadb82db9755dfb64751a1d935 Signed-off-by: Simon Marchi Signed-off-by: Jérémie Galarneau --- diff --git a/src/common/compat/compat-poll.c b/src/common/compat/compat-poll.c index 79756f573..1193b785f 100644 --- a/src/common/compat/compat-poll.c +++ b/src/common/compat/compat-poll.c @@ -314,7 +314,6 @@ int compat_poll_wait(struct lttng_poll_event *events, int timeout, ERR("poll wait arguments error"); goto error; } - assert(events->current.nb_fd >= 0); if (events->current.nb_fd == 0) { /* Return an invalid error to be consistent with epoll. */