[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: CVS update: subversion/subversion/libsvn_subr svn_string.c

From: Branko Èibej <brane_at_xbc.nu>
Date: 2000-10-14 00:45:15 CEST

> - str->data = (char *) my__realloc (str->data,
> - str->len,
> - str->blocksize,
> - str->pool);
> + str->data = (char *) my__realloc (str->data,
> + str->len,
> + str->blocksize,
> + str->pool);
> + }
> }

This hasn't got much to do with GregH's change, but ...

Could someone enlighten me as to why we're explicitly casting a void*
to a char* here? I also see

    memcpy (start_address, (void *) bytes, count);

later on in the same file. I thought we were using ANSI C, and
-Wmissing-prototypes, so why the cast? The only effect of such
casts is that they hide potential bugs the compiler might warn
about. I'd go as far as adding a note to the HACKING file that
Subversion code should have no typecasts whatsoever, except where
necessary for interfacing with foreign libraries.

-- 
Brane �ibej
  home:   <brane_at_xbc.nu>            http://www.xbc.nu/brane/
   ACM:   <brane_at_acm.org>           http://www.acm.org/
Received on Sat Oct 21 14:36:11 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.