mirror-linux/drivers/net/wireguard
Jiri Slaby (SUSE) 24d158856c wireguard: timers: cast enum limits members to int in prints
commit 2d4ee16d96 upstream.

Since gcc13, each member of an enum has the same type as the enum. And
that is inherited from its members. Provided "REKEY_AFTER_MESSAGES =
1ULL << 60", the named type is unsigned long.

This generates warnings with gcc-13:
  error: format '%d' expects argument of type 'int', but argument 6 has type 'long unsigned int'

Cast those particular enum members to int when printing them.

Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36113
Cc: Martin Liska <mliska@suse.cz>
Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Link: https://lore.kernel.org/all/20221213225208.3343692-2-Jason@zx2c4.com/
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Cc: Chris Clayton <chris2553@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-05-11 23:02:58 +09:00
..
selftest treewide: use get_random_bytes() when possible 2022-10-11 17:42:58 -06:00
Makefile
allowedips.c
allowedips.h
cookie.c
cookie.h
device.c
device.h
main.c
messages.h
netlink.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-09-22 13:02:10 -07:00
netlink.h
noise.c
noise.h
peer.c net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
peer.h
peerlookup.c
peerlookup.h
queueing.c
queueing.h
ratelimiter.c
ratelimiter.h
receive.c
send.c
socket.c
socket.h
timers.c wireguard: timers: cast enum limits members to int in prints 2023-05-11 23:02:58 +09:00
timers.h
version.h