projects
/
pspp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c83f698
)
regression: Make sure dep_subscript is really initialized.
author
Ben Pfaff
<blp@cs.stanford.edu>
Wed, 2 Jan 2019 22:42:04 +0000
(14:42 -0800)
committer
Ben Pfaff
<blp@cs.stanford.edu>
Wed, 2 Jan 2019 22:50:14 +0000
(14:50 -0800)
Found by GCC 4.9.
src/language/stats/regression.c
patch
|
blob
|
history
diff --git
a/src/language/stats/regression.c
b/src/language/stats/regression.c
index ecc2279b45b879ddf68e8e81354f17cc1ab5c9a2..264a7c1ade150652131ad2b0fe2c0d96a7fb3bf7 100644
(file)
--- a/
src/language/stats/regression.c
+++ b/
src/language/stats/regression.c
@@
-561,7
+561,7
@@
fill_covariance (gsl_matrix * cov, struct covariance *all_cov,
{
size_t i;
size_t j;
- size_t dep_subscript;
+ size_t dep_subscript
= SIZE_MAX
;
size_t *rows;
const gsl_matrix *ssizes;
const gsl_matrix *mean_matrix;
@@
-589,6
+589,8
@@
fill_covariance (gsl_matrix * cov, struct covariance *all_cov,
dep_subscript = i;
}
}
+ assert (dep_subscript != SIZE_MAX);
+
mean_matrix = covariance_moments (all_cov, MOMENT_MEAN);
ssize_matrix = covariance_moments (all_cov, MOMENT_NONE);
for (i = 0; i < cov->size1 - 1; i++)