From: Theo Buehler <theo@math.ethz.ch>
To: <zsh-workers@zsh.org>
Subject: [Patch] incorrect pointer type of elem in getlanginfo()
Date: Sat, 28 Mar 2015 13:51:39 +0100 [thread overview]
Message-ID: <20150328125139.GB16118@math.ethz.ch> (raw)
This silences a compiler warning for zsh 5.0.7 on OpenBSD:
In the function getlanginfo() in Src/Modules/langinfo.c,
`int *elem' should be `nl_item *elem':
This can be seen by the return type of liitem() when elem is initialized
on line 411 of and by the call nl_langinfo(*elem) on line 415.
diff --git a/Src/Modules/langinfo.c b/Src/Modules/langinfo.c
index f10fdfe..27f2c5e 100644
--- a/Src/Modules/langinfo.c
+++ b/Src/Modules/langinfo.c
@@ -395,7 +395,8 @@ liitem(const char *name)
static HashNode
getlanginfo(UNUSED(HashTable ht), const char *name)
{
- int len, *elem;
+ nl_item *elem;
+ int len;
char *listr, *nameu;
Param pm = NULL;
next reply other threads:[~2015-03-28 12:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-28 12:51 Theo Buehler [this message]
2015-03-29 6:20 ` Daniel Shahaf
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=20150328125139.GB16118@math.ethz.ch \
--to=theo@math.ethz.ch \
--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).