From cd8a8c2bf698cce2f1a12d9d11188b1d6ff3f26c Mon Sep 17 00:00:00 2001 From: John Lindgren Date: Fri, 4 Jul 2025 00:18:53 -0400 Subject: [PATCH] keybind: pointer to string literal should be const Assigning to (char*) creates a mutable string literal, which was likely not intended here and wasn't necessary. --- src/config/keybind.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config/keybind.c b/src/config/keybind.c index 5e5002f7..d59b64eb 100644 --- a/src/config/keybind.c +++ b/src/config/keybind.c @@ -123,7 +123,7 @@ keybind_create(const char *keybind) xkb_keysym_t keysyms[MAX_KEYSYMS]; gchar **symnames = g_strsplit(keybind, "-", -1); for (size_t i = 0; symnames[i]; i++) { - char *symname = symnames[i]; + const char *symname = symnames[i]; /* * Since "-" is used as a separator, a keybind string like "W--" * becomes "W", "", "". This means that it is impossible to bind -- 2.52.0