From 0980617c0df7095ad3dfcbd0ef0b3a250c87139f Mon Sep 17 00:00:00 2001 From: Gabriel Ford Date: Sat, 21 Jun 2025 18:54:51 -0400 Subject: [PATCH] build(msvc): suppress msvc build warning for different enum types (#34591) Problem: Currently our CI is failing due to msvc warning 5287. This warning tells us that we are performing a binary expression with enums of two different types. In this case however, this is clearly intended and valid. Solution: Suppress warning 5287 on the line this occurs. --- src/nvim/tui/input.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/nvim/tui/input.c b/src/nvim/tui/input.c index fa5da14f50..822fdd9202 100644 --- a/src/nvim/tui/input.c +++ b/src/nvim/tui/input.c @@ -251,8 +251,15 @@ static size_t handle_termkey_modifiers(TermKeyKey *key, char *buf, size_t buflen enum { KEYMOD_SUPER = 1 << 3, KEYMOD_META = 1 << 5, +#ifdef _MSC_VER +# pragma warning(push) +# pragma warning(disable : 5287) +#endif KEYMOD_RECOGNIZED = (TERMKEY_KEYMOD_SHIFT | TERMKEY_KEYMOD_ALT | TERMKEY_KEYMOD_CTRL | KEYMOD_SUPER | KEYMOD_META), +#ifdef _MSC_VER +# pragma warning(pop) +#endif }; /// Handle modifiers not handled by libtermkey.