summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJörg Sommer <joerg@jo-so.de>2024-01-01 19:10:18 +0100
committerOliver Kiddle <opk@zsh.org>2024-01-28 00:23:43 +0100
commit98affe1115dfdab932432c09160f46ca3d269fb7 (patch)
tree1ebf10edc1afb7a4818eb24df7f4da5751ee3ca8
parentce033e2b9cadf51b4d043b0737fd3acee9f5eef2 (diff)
downloadzsh-98affe1115dfdab932432c09160f46ca3d269fb7.tar.gz
zsh-98affe1115dfdab932432c09160f46ca3d269fb7.zip
52441: zle_vi: Mark variables with const init as const
Because these variables are initialized with as constant string, they should be marked as *const* to make the compiler running with `-Wwrite-strings` more happy.
-rw-r--r--ChangeLog2
-rw-r--r--Src/Zle/zle_vi.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 22875c7e9..16e012d5b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
2024-01-28 Oliver Kiddle <opk@zsh.org>
+ * Jörg Sommer: 52441: Src/Zle/zle_vi.c: Mark variables as const
+
* Jörg Sommer: 52440: Src/Zle/textobjects.c: Mark variables as const
2024-01-26 Oliver Kiddle <opk@zsh.org>
diff --git a/Src/Zle/zle_vi.c b/Src/Zle/zle_vi.c
index 24d9de6ea..6692df830 100644
--- a/Src/Zle/zle_vi.c
+++ b/Src/Zle/zle_vi.c
@@ -1014,7 +1014,7 @@ int
visetbuffer(char **args)
{
ZLE_INT_T ch;
- ZLE_CHAR_T *match = ZWS("_*+");
+ const ZLE_CHAR_T *match = ZWS("_*+");
int registermod[] = { MOD_NULL, MOD_PRI, MOD_CLIP };
ZLE_CHAR_T *found;