Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH] zle_keymap: fix 56 compile-time warnings
- X-seq: zsh-workers 36106
- From: Kamil Dudka <kdudka@xxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [PATCH] zle_keymap: fix 56 compile-time warnings
- Date: Tue, 11 Aug 2015 17:48:57 +0200
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
... 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author