Hi,

On Mon, Mar 11, 2013 at 09:10:49PM +0100, Arne Schwabe wrote:
> Clang in c mode warns about these. In C++ mode these are forbidden.

I'm not so sure about this chunk of changes.  I can see why you want this,
but OTOH, this is all perfectly correct C (freely converting pointers to
and from "void *" without(!) warnings), and some of these...

> -  char *p = gc_malloc (OPTION_PARM_SIZE, false, &gc);
> +  char *p = (char *) gc_malloc (OPTION_PARM_SIZE, false, &gc);

> -           p[ret] = gc_malloc (parm_len + 1, true, gc);
> +           p[ret] = (char *) gc_malloc (parm_len + 1, true, gc);

> -  struct route_option_list *ret = gc_malloc (rl_size, false, a);
> +  struct route_option_list *ret = (struct route_option_list *) gc_malloc 
> (rl_size, false, a);

... do not really improve readability, more to the contrary.

(Some of the other casts make the code more clear, so I'm not objecting
to all of it, just wondering... mostly about the gc_malloc() stuff... 
this really should be "malloc() return can be assigned to any pointer")

But I'm not strongly objecting.  If you (for some vague "you") feel
strongly about having the casts, I'll accept that.

gert
-- 
USENET is *not* the non-clickable part of WWW!
                                                           //www.muc.de/~gert/
Gert Doering - Munich, Germany                             g...@greenie.muc.de
fax: +49-89-35655025                        g...@net.informatik.tu-muenchen.de

Attachment: pgpeUKU0oig98.pgp
Description: PGP signature

Reply via email to