netlink: use proper format for integers (-Wformat)
Properly print signed and unsigned integers. This fixes warnings like:
src/netlink.c: In function ‘nfc_netlink_event_tm_deactivated’:
./include/near/log.h:45:14: error: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘uint32_t’ {aka ‘unsigned int’} [-Werror=format=]
45 | near_debug("%s:%s() " fmt, \
| ^~~~~~~~~~
src/netlink.c:759:2: note: in expansion of macro ‘DBG’
759 | DBG("%d", idx);
| ^~~
src/netlink.c: In function ‘nfc_netlink_event’:
src/netlink.c:772:54: error: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘__u32’ {aka ‘unsigned int’} [-Werror=format=]
772 | near_error("WARNING: Wrong netlink message sender %d",
| ~^
| |
| int
| %d
773 | src->nl_pid);
| ~~~~~~~~~~~
| |
| __u32 {aka unsigned int}
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
1 file changed