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

Re: 5.0.2-test-3, arithmetic on pointer to void



On Dec 10,  3:21am, pda@xxxxxxx 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);



Messages sorted by: Reverse Date, Date, Thread, Author