Strict C/C++ Conformance

When compiling with less forgiving compilers
('MSVC', 'g++ --pedantic') there are a few sections of
code that will fail. The attatched SVN diff file will
patch the code to remedy this.

The patch is as follows:
-- In several places arrays are initialized with a
variable for the length. As per Stroustrup arrays can
only be specified with constants or using 'new' .

-- in strict forms of C all variable declarations in a
function must be finished before any actual code is run
(cntr.c)

matplotlib-code_patch-vSVN-20060310_1355.diff (10.2 KB)

After testing this patch, I tried checking it in, but I'm getting an error:

$ svn commit src
Authentication realm: <https://svn.sourceforge.net:443> SourceForge
Subversion area
Password for 'astraw':
svn: Commit failed (details follow):
svn: MKACTIVITY of
'/svnroot/matplotlib/!svn/act/451cc94f-c20e-0410-914b-b8458948145c': 403
Forbidden (https://svn.sourceforge.net)
svn: Your commit message was left in a temporary file:
svn:
'/home/astraw/other-peoples-src/matplotlib/matplotlib.svn/svn-commit.2.tmp'

I tried a couple of times to make sure I got the password right, but it
still didn't go. Does anyone know what's going on? This would have been
my first commit since we switched to subversion.

Anyhow, it looks like I can't apply the other patches right now, so I'm
giving up for the time being.

James Evans wrote:

ยทยทยท

When compiling with less forgiving compilers
('MSVC', 'g++ --pedantic') there are a few sections of
code that will fail. The attatched SVN diff file will
patch the code to remedy this.

The patch is as follows:
-- In several places arrays are initialized with a
variable for the length. As per Stroustrup arrays can
only be specified with constants or using 'new' .

-- in strict forms of C all variable declarations in a
function must be finished before any actual code is run
(cntr.c)

Andrew Straw wrote:

After testing this patch, I tried checking it in, but I'm getting an error:

$ svn commit src
Authentication realm: <https://svn.sourceforge.net:443> SourceForge
Subversion area
Password for 'astraw':
svn: Commit failed (details follow):
svn: MKACTIVITY of
'/svnroot/matplotlib/!svn/act/451cc94f-c20e-0410-914b-b8458948145c': 403
Forbidden (https://svn.sourceforge.net)
svn: Your commit message was left in a temporary file:
svn:
'/home/astraw/other-peoples-src/matplotlib/matplotlib.svn/svn-commit.2.tmp'

I tried a couple of times to make sure I got the password right, but it
still didn't go. Does anyone know what's going on? This would have been
my first commit since we switched to subversion.

Weird, SF disables write access by default to the subversion repository:
http://sourceforge.net/tracker/?group_id=1&atid=200001&func=detail&aid=1443846

What's more bizarre is that apparently all the MPL devs aside from me
apparently had no problem committing despite this fact!

Anyhow, I found our permissions page and am in the process of adding
write access to all MPL devs.
https://sourceforge.net/project/admin/userperms.php?group_id=80706

James, your first patch (strict C/C++ conformance) is svn 2141 and I'll
work on your others in short order.