Skip to content

-Wdivision-by-zero in include/linux/poll.h #1382

@nickdesaulniers

Description

@nickdesaulniers

working around #1380 , I do see the next warning to figure out:

In file included from net/ipv6/ila/ila_lwt.c:10:
In file included from ./include/net/dst_cache.h:8:
In file included from ./include/net/ip6_fib.h:18:
In file included from ./include/net/ip_fib.h:20:
In file included from ./include/net/inetpeer.h:16:
In file included from ./include/net/ipv6.h:12:
In file included from ./include/linux/ipv6.h:88:
In file included from ./include/linux/tcp.h:19:
In file included from ./include/net/sock.h:61:
./include/linux/poll.h:142:27: warning: division by zero is undefined [-Wdivision-by-zero]
                M(RDNORM) | M(RDBAND) | M(WRNORM) | M(WRBAND) |
                                        ^~~~~~~~~
./include/linux/poll.h:140:32: note: expanded from macro 'M'
#define M(X) (__force __poll_t)__MAP(val, POLL##X, (__force __u16)EPOLL##X)
                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/linux/poll.h:126:51: note: expanded from macro '__MAP'
        (from < to ? (v & from) * (to/from) : (v & from) / (from/to))
                                                         ^ ~~~~~~~~~
./include/linux/poll.h:142:39: warning: division by zero is undefined [-Wdivision-by-zero]
                M(RDNORM) | M(RDBAND) | M(WRNORM) | M(WRBAND) |
                                                    ^~~~~~~~~
./include/linux/poll.h:140:32: note: expanded from macro 'M'
#define M(X) (__force __poll_t)__MAP(val, POLL##X, (__force __u16)EPOLL##X)
                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/linux/poll.h:126:51: note: expanded from macro '__MAP'
        (from < to ? (v & from) * (to/from) : (v & from) / (from/to))
                                                         ^ ~~~~~~~~~

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions