apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julian Foad <julianf...@btopenworld.com>
Subject Re: svn commit: r106214 - /apr/apr/trunk/CHANGES /apr/apr/trunk/configure.in /apr/apr/trunk/include/apr.h.in /apr/apr/trunk/misc/unix/rand.c
Date Mon, 22 Nov 2004 23:10:00 GMT
Joe Orton wrote:
> On Mon, Nov 22, 2004 at 08:14:26PM -0000, Paul Querna wrote:
>>+    memcpy( (void*)uuid_data, (const void *)&g, sizeof( uuid_t ) );
> 
> Please watch the code style, Paul!

Not sure exactly what Joe is referring to, but note that it should never be 
necessary to cast anything to "const void *" - the whole point of accepting 
"const void *" is that it means "accept pointers to anything, writable or not". 
  You don't need to cast to "void *" either unless the value you're casting was 
a pointer to const and you're casting away the "const".

Casts are bad!

- Julian

Mime
View raw message