Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

[Patch] incorrect pointer type of elem in getlanginfo()



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