compat: remove always true assertion in compat-poll.c
authorSimon Marchi <simon.marchi@efficios.com>
Mon, 25 Nov 2019 20:14:47 +0000 (15:14 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 9 Dec 2019 21:24:01 +0000 (16:24 -0500)
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 <simon.marchi@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/common/compat/compat-poll.c

index 79756f5731fa48dd41ac2c646333c4f1080278b3..1193b785f9874e8bcd15cd16b72673b3f0d7f645 100644 (file)
@@ -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. */
This page took 0.026509 seconds and 4 git commands to generate.