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

Re: zsh 3.0.4 with IRIX 6.2/IDO



Andrew Main wrote:
> Jason R Mastaler wrote:
> 
> >BTW, compilation did yield one non-fatal warning I thought I'd bring
> >to your attention.  Otherwise, no problems.
> >
> >        cc -c -I.. -I. -I.  -DHAVE_CONFIG_H -O2 zle_tricky.c
> >cfe: Warning 709: zle_tricky.c, line 1553: Incompatible pointer type assignm
> ent
> >        cb.foreach = (int ((*) (void) )) match_username;
> >        -----------^
> 
> Question to developers: why was the (void) added?  It seems to have been
> fine with just ().

It's strange, because the (void) actually makes it wrong, implying it
takes no argument which is incorrect.  I would certainly suggest
either () or if there are compilers that like function pointers
to have arguments in their prototypes then the full
(int, char *, int, char *, int, char*)
which, even if it is sometimes the odd pointer out (though I would have
thought the NIS standard was fixed?), is nearer the mark than (void).

-- 
Peter Stephenson <pws@xxxxxx>       Tel: +49 33762 77366
WWW:  http://www.ifh.de/~pws/       Fax: +49 33762 77413
Deutsches Elektronen-Synchrotron --- Institut fuer Hochenergiephysik Zeuthen
DESY-IfH, 15735 Zeuthen, Germany.



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