zsh-workers
 help / color / mirror / code / Atom feed
From: Kamil Dudka <kdudka@redhat.com>
To: zsh-workers@zsh.org
Subject: [PATCH] zle_keymap: fix 56 compile-time warnings
Date: Tue, 11 Aug 2015 17:48:57 +0200	[thread overview]
Message-ID: <1439308137-22536-1-git-send-email-kdudka@redhat.com> (raw)

... 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


                 reply	other threads:[~2015-08-11 15:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1439308137-22536-1-git-send-email-kdudka@redhat.com \
    --to=kdudka@redhat.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).