REGRESSION: Fix issues found by by review 20130719030506/pspp 20130720030502/pspp 20130721030502/pspp 20130722030502/pspp 20130723030502/pspp
authorJohn Darrington <john@darrington.wattle.id.au>
Wed, 17 Jul 2013 14:12:07 +0000 (16:12 +0200)
committerJohn Darrington <john@darrington.wattle.id.au>
Wed, 17 Jul 2013 16:05:32 +0000 (18:05 +0200)
commitaf19e87064958dfbde7a6bf0d3d19c7b82068a11
tree4ec094c226105589806e9c37cae124f48e865d82
parent84dd482092424584843c36546b36afa23a41423d
REGRESSION: Fix issues found by by review

Ben reported following potential problems:

I think that if the DEPENDENT subcommand is given twice (a user error), then
the variables specified the first time will be silently leaked.

cmd_regression() has two local variables named 'i'.

I don't understand why "struct workspace" has a member 'psw' that is a
dynamically allocated array, because it looks like each element of the array
is used only during processing a single split file group.  That is, I think
that 'psw' could be just a singleton, instead of an array.

I think that fill_all_vars() is wrong: if an absent var follows a not-absent
var, then vars[] will be filled with a gap and there will be a write into
unallocated memory.

Reported-by: Ben Pfaff
Avoids shadowing variable in lower scope.  suggested by Ben Pfaff
src/language/stats/regression.c