Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wireguard: timers: cast enum limits members to int in prints
commit 2d4ee16d969c97996e80e4c9cb6de0acaff22c9f 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 <[email protected]> Signed-off-by: Jiri Slaby (SUSE) <[email protected]> Signed-off-by: Jason A. Donenfeld <[email protected]> Link: https://lore.kernel.org/all/[email protected]/ Signed-off-by: Jakub Kicinski <[email protected]> Cc: Chris Clayton <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: engstk <[email protected]>
- Loading branch information