commit 0980617c0df7095ad3dfcbd0ef0b3a250c87139f
parent d0aedd36dfe0ac4ed45ea93f471379c77f0c7905
Author: Gabriel Ford <gabe@fordltc.net>
Date: Sat, 21 Jun 2025 18:54:51 -0400
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.
Diffstat:
1 file changed, 7 insertions(+), 0 deletions(-)
diff --git 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.