Re: build failures from gcc warning about memset

2009-10-26 Thread Ludovic Courtès
Hello, Andy Wingo writes: > Actually scm_gc_malloc will give you back a zeroed array, afaik, as > GC_malloc does. The patch looks fine but if we can rely on > scm_gc_malloc's new behavior, we don't need the memset at all. Oh oh, good catch! It’s actually documented this way in gcinterface.html

Re: build failures from gcc warning about memset

2009-10-25 Thread Andy Wingo
Hi Julian, On Sun 25 Oct 2009 18:16, Julian Graham writes: > --- a/libguile/gc-malloc.c > +++ b/libguile/gc-malloc.c > @@ -206,7 +206,8 @@ void * > scm_gc_calloc (size_t size, const char *what) > { >void *ptr = scm_gc_malloc (size, what); > - memset (ptr, 0x0, size); > + if (size) > +

Re: build failures from gcc warning about memset

2009-10-25 Thread Ludovic Courtès
Applied, thanks! Ludo'.

build failures from gcc warning about memset

2009-10-25 Thread Julian Graham
Hi all, I've been fixing and reverting this locally for the past month or so, and I'm not sure if anyone else has seen this, but it looks like there's some static analysis code that's been added to GCC 4.3.3 that warns about code paths that could produce a call to `memset' with a size parameter of