From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1163 invoked by alias); 28 Mar 2015 12:57:56 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 34792 Received: (qmail 1418 invoked from network); 28 Mar 2015 12:57:53 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.2 Date: Sat, 28 Mar 2015 13:51:39 +0100 From: Theo Buehler To: Subject: [Patch] incorrect pointer type of elem in getlanginfo() Message-ID: <20150328125139.GB16118@math.ethz.ch> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline X-Originating-IP: [82.130.119.79] 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;