zsh-workers
 help / color / mirror / code / Atom feed
* [Patch] incorrect pointer type of elem in getlanginfo()
@ 2015-03-28 12:51 Theo Buehler
  2015-03-29  6:20 ` Daniel Shahaf
  0 siblings, 1 reply; 2+ messages in thread
From: Theo Buehler @ 2015-03-28 12:51 UTC (permalink / raw)
  To: zsh-workers

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;
 


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Patch] incorrect pointer type of elem in getlanginfo()
  2015-03-28 12:51 [Patch] incorrect pointer type of elem in getlanginfo() Theo Buehler
@ 2015-03-29  6:20 ` Daniel Shahaf
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Shahaf @ 2015-03-29  6:20 UTC (permalink / raw)
  To: Theo Buehler; +Cc: zsh-workers

Theo Buehler wrote on Sat, Mar 28, 2015 at 13:51:39 +0100:
> 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.

Thanks for the detailed report, pushed.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-03-29  6:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-28 12:51 [Patch] incorrect pointer type of elem in getlanginfo() Theo Buehler
2015-03-29  6:20 ` Daniel Shahaf

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