From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28109 invoked by alias); 10 Dec 2013 06:27:57 -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: 32099 Received: (qmail 1416 invoked from network); 10 Dec 2013 06:27:42 -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=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 From: Bart Schaefer Message-id: <131209222725.ZM8235@torch.brasslantern.com> Date: Mon, 09 Dec 2013 22:27:25 -0800 In-reply-to: <20131210032130.GA23075@ma.sdf.org> Comments: In reply to pda@sdf.org "Re: 5.0.2-test-3, arithmetic on pointer to void" (Dec 10, 3:21am) References: <20131201194653.7a98a4a4@pws-pc.ntlworld.com> <20131202151557.1636@binki> <20131202160801.23386d0f@pwslap01u.europe.root.pri> <131202083601.ZM3387@torch.brasslantern.com> <20131202165137.73259d8c@pwslap01u.europe.root.pri> <20131208202214.4df21a3b@pws-pc.ntlworld.com> <20131210032130.GA23075@ma.sdf.org> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: "Zsh Hackers' List" Subject: Re: 5.0.2-test-3, arithmetic on pointer to void MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Dec 10, 3:21am, pda@sdf.org wrote: } } Creating "init.c", line 287: error #3143: arithmetic on pointer to void or function type } void *ptr = base + (optno < 0 ? -optno : optno); } ^ As far as I can tell parseopts_insert is always passed a char* as base. Might as well declare it for the way it's called rather than for the way the pointer is used internally. diff --git a/Src/init.c b/Src/init.c index 7032ff8..53c4fbd 100644 --- a/Src/init.c +++ b/Src/init.c @@ -281,7 +281,7 @@ parseargs(char **argv, char **runscript) /**/ static void -parseopts_insert(LinkList optlist, void *base, int optno) +parseopts_insert(LinkList optlist, char *base, int optno) { LinkNode node; void *ptr = base + (optno < 0 ? -optno : optno);