52440: zle.textobjects: Mark variables 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.
master
Jörg Sommer 5 months ago committed by Oliver Kiddle
parent 698af7bc13
commit ce033e2b9c

@ -1,3 +1,7 @@
2024-01-28 Oliver Kiddle <opk@zsh.org>
* Jörg Sommer: 52440: Src/Zle/textobjects.c: Mark variables as const
2024-01-26 Oliver Kiddle <opk@zsh.org>
* 52405, 52502: Src/Modules/pcre.c, Test/V07pcre.ztst:

@ -283,9 +283,9 @@ selectargument(UNUSED(char **args))
free(linein);
if (IS_THINGY(bindk, selectinshellword)) {
ZLE_CHAR_T *match = ZWS("`\'\"");
ZLE_CHAR_T *lmatch = ZWS("\'({"), *rmatch = ZWS("\')}");
ZLE_CHAR_T *ematch = match, *found;
const ZLE_CHAR_T *match = ZWS("`\'\"");
const ZLE_CHAR_T *lmatch = ZWS("\'({"), *rmatch = ZWS("\')}");
const ZLE_CHAR_T *ematch = match, *found;
int start, end = zlecs;
/* for 'in' widget, don't include initial blanks ... */
while (mark < zlecs && ZC_iblank(zleline[mark]))

Loading…
Cancel
Save