Csound Csound-dev Csound-tekno Search About

[Cs-dev] incorrect memset usage in pvscent.c cent_i

Date2012-09-23 07:42
Fromandy fillebrown
Subject[Cs-dev] incorrect memset usage in pvscent.c cent_i
Howdy,

I'm getting a compiler warning at pvscent.c:158/159, something along
the lines of memset being called with a 0 count ...

memset(p->frame.auxp, p->fsize*sizeof(MYFLT), 0);

... should probably be ...
memset(p->frame.auxp, 0, p->fsize*sizeof(MYFLT));

Also, memset is being called twice with the same parameters.  It looks
like the second call should be on p->windowed.auxp instead of
p->frame.auxp.

Cheers,
~ andy.f

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://ad.doubleclick.net/clk;258768047;13503038;j?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2012-09-23 08:52
FromVictor Lazzarini
SubjectRe: [Cs-dev] incorrect memset usage in pvscent.c cent_i
Fixed.
On 23 Sep 2012, at 07:42, andy fillebrown wrote:

> Howdy,
> 
> I'm getting a compiler warning at pvscent.c:158/159, something along
> the lines of memset being called with a 0 count ...
> 
> memset(p->frame.auxp, p->fsize*sizeof(MYFLT), 0);
> 
> ... should probably be ...
> memset(p->frame.auxp, 0, p->fsize*sizeof(MYFLT));
> 
> Also, memset is being called twice with the same parameters.  It looks
> like the second call should be on p->windowed.auxp instead of
> p->frame.auxp.
> 
> Cheers,
> ~ andy.f
> 
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://ad.doubleclick.net/clk;258768047;13503038;j?
> http://info.appdynamics.com/FreeJavaPerformanceDownload.html
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie




------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://ad.doubleclick.net/clk;258768047;13503038;j?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net