[PD-dev] Memory leaks?

Dan Wilcox danomatika at gmail.com
Fri Mar 25 04:27:18 CET 2016


The last patch fixed some of the warnings. The rest I’m seeing from clang are simple stuff:

	warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
	aka
	assignments in for loops & if/while statements should be wrapped in parens
	
	warning: '&&' within '||' [-Wlogical-op-parentheses], so added paren wraps
	
	switch statement not handling all enumerations, so added default: break;

Note: this is only for sources used by libpd.

Here’s a patch:



>> On Mar 22, 2016, at 10:39 AM, Miller Puckette <msp at ucsd.edu <mailto:msp at ucsd.edu>> wrote:
>> 
>> It's already in and up - check away :)
>> 
>> M
>> On Tue, Mar 22, 2016 at 10:37:20AM -0600, Dan Wilcox wrote:
>>> Sweet. clang on OSX gives me about 100+ warnings when building the pure-data sources for libpd, most of which involve simple things like suggested paren wraps, “implicit conversion loses integer precision,” etc. These might be related to what iOhannes is seeing. I’ll wait to see if this bugfix work is accepted and then I can make a similar patch for the warnings.
>>> 
>>> --------
>>> Dan Wilcox
>>> @danomatika <https://twitter.com/danomatika <https://twitter.com/danomatika>>
>>> danomatika.com <http://danomatika.com/> <http://danomatika.com/ <http://danomatika.com/>>
>>> robotcowboy.com <http://robotcowboy.com/> <http://robotcowboy.com/ <http://robotcowboy.com/>>
>>>> On Mar 22, 2016, at 5:00 AM, pd-dev-request at lists.iem.at <mailto:pd-dev-request at lists.iem.at> wrote:
>>>> 
>>>> From: IOhannes m zmölnig <zmoelnig at iem.at <mailto:zmoelnig at iem.at> <mailto:zmoelnig at iem.at <mailto:zmoelnig at iem.at>>>
>>>> Subject: Re: [PD-dev] Memory leaks?
>>>> Date: March 21, 2016 at 3:29:25 PM MDT
>>>> To: pd-dev at lists.iem.at <mailto:pd-dev at lists.iem.at> <mailto:pd-dev at lists.iem.at <mailto:pd-dev at lists.iem.at>>
>>>> 
>>>> 
>>>> On 03/21/2016 09:51 PM, Miller Puckette wrote:
>>>>> Yep, thanks.  Fixing it now...
>>>> 
>>>> since you seem to be in bug-squashing mode: there are about 100 more
>>>> bugs waiting to be fixed :-)

--------
Dan Wilcox
@danomatika <https://twitter.com/danomatika>
danomatika.com <http://danomatika.com/>
robotcowboy.com <http://robotcowboy.com/>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20160324/0f18cdb1/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: warning_fixes.patch
Type: application/octet-stream
Size: 34013 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20160324/0f18cdb1/attachment-0001.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20160324/0f18cdb1/attachment-0003.html>


More information about the Pd-dev mailing list