Patches item #1841002, was opened at 2007-11-29 08:11 Message generated for change (Comment added) made by russellbryant You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=478072&aid=1841002...
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: puredata Group: bugfix Status: Open Resolution: None Priority: 5 Private: No Submitted By: Russell Bryant (russellbryant) Assigned to: Miller Puckette (millerpuckette) Summary: Add format string error checking, and fix related errors
Initial Comment: This patch adds format string error checking for bug(), error(), verbose(), and pd_error(). It also fixes the errors in the pd core that were pointed out by this change.
There are some other functions that take printf style format strings that would benefit from this same change, but I wanted to address pieces of it at a time.
----------------------------------------------------------------------
Comment By: Russell Bryant (russellbryant)
Date: 2007-11-30 07:32
Message: Logged In: YES user_id=1942915 Originator: YES
I assume you meant seems "not" very likely to do any harm. :)
Good point about MSVC. I am used to only caring about gcc. I have provided an updated patch that only uses the attribute if GNUC is in use. It is also implemented as a macro in one spot so that addressing it for other compilers in the future can be done in one spot.
----------------------------------------------------------------------
Comment By: Hans-Christoph Steiner (eighthave) Date: 2007-11-29 12:15
Message: Logged In: YES user_id=27104 Originator: NO
Looks like the right thing to do, and seems very likely to do any harm. I'm going to try it in Pd-extended. The only concern I can think of is whether the __attribute__ stuff causes any problems when building with MSVC, since some people still build Pd with MSVC. This site seems to claim it does not:
http://ocliteracy.com/techtips/gnu-c-attributes.html
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=478072&aid=1841002...