macro: Use more correct type in IN_SET
authorJan Janssen <medhefgo@web.de>
Tue, 25 Oct 2022 17:33:40 +0000 (19:33 +0200)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 25 Oct 2022 18:27:09 +0000 (03:27 +0900)
commit0bc4ac526d41483e6e9625d156d753bb3e287a19
tree36c1e12597cb35c1fadb10e95a4954a7c4bbbbeb
parentbcf04e9b279b39fb7b44e42257dee078f5e76207
macro: Use more correct type in IN_SET

This will now catch mistakes like this:
    struct s {
            int i:2;
    } s = { 1 };
    assert_se(IN_SET(s.i, ULLONG_MAX));

> warning: implicit conversion from 'unsigned long long' to
> 'typeof (+s.i)' (aka 'int') changes value from 18446744073709551615
> to -1 [-Wconstant-conversion]
src/fundamental/macro-fundamental.h