Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[Patch] incorrect pointer type of elem in getlanginfo()
- X-seq: zsh-workers 34792
- From: Theo Buehler <theo@xxxxxxxxxxxx>
- To: <zsh-workers@xxxxxxx>
- Subject: [Patch] incorrect pointer type of elem in getlanginfo()
- Date: Sat, 28 Mar 2015 13:51:39 +0100
- 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
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;
Messages sorted by:
Reverse Date,
Date,
Thread,
Author