* [PATCH] zle_keymap: fix 56 compile-time warnings
@ 2015-08-11 15:48 Kamil Dudka
0 siblings, 0 replies; only message in thread
From: Kamil Dudka @ 2015-08-11 15:48 UTC (permalink / raw)
To: zsh-workers
... produced by gcc-5.1.1 with -Wdiscarded-qualifiers
Src/Zle/complist.c:3501:23: warning: passing argument 2 of ‘bindkey’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
Src/Zle/zle.mdh:34: included_from: Included from here.
Src/Zle/complete.mdh:17: included_from: Included from here.
Src/Zle/complist.mdh:17: included_from: Included from here.
Src/Zle/complist.c:30: included_from: Included from here.
Src/Zle/zle_keymap.epro:21:12: note: expected ‘char *’ but argument is of type ‘const char *’
Src/Zle/complist.c:3502:23: warning: passing argument 2 of ‘bindkey’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
Src/Zle/zle.mdh:34: included_from: Included from here.
Src/Zle/complete.mdh:17: included_from: Included from here.
Src/Zle/complist.mdh:17: included_from: Included from here.
Src/Zle/complist.c:30: included_from: Included from here.
Src/Zle/zle_keymap.epro:21:12: note: expected ‘char *’ but argument is of type ‘const char *’
[...]
Src/Zle/zle_keymap.c:1355:16: warning: passing argument 2 of ‘bindkey’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
Src/Zle/zle_keymap.c:543:1: note: expected ‘char *’ but argument is of type ‘const char *’
Src/Zle/zle_keymap.c:1356:16: warning: passing argument 2 of ‘bindkey’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
Src/Zle/zle_keymap.c:543:1: note: expected ‘char *’ but argument is of type ‘const char *’
[...]
---
Src/Zle/zle_keymap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Src/Zle/zle_keymap.c b/Src/Zle/zle_keymap.c
index c16e32e..5b4189f 100644
--- a/Src/Zle/zle_keymap.c
+++ b/Src/Zle/zle_keymap.c
@@ -540,7 +540,7 @@ reselectkeymap(void)
/**/
mod_export int
-bindkey(Keymap km, char *seq, Thingy bind, char *str)
+bindkey(Keymap km, const char *seq, Thingy bind, char *str)
{
Key k;
int f = seq[0] == Meta ? STOUC(seq[1])^32 : STOUC(seq[0]);
--
2.4.6
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-08-11 15:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-11 15:48 [PATCH] zle_keymap: fix 56 compile-time warnings Kamil Dudka
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).