summaryrefslogtreecommitdiff
path: root/matrix.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2015-01-22 22:44:48 -0500
committerEric S. Raymond <esr@thyrsus.com>2015-01-22 22:46:20 -0500
commit78c5fe3fe60be3645e080ff14c5c843c811c82da (patch)
tree754f2bc8945acbdd288ad960d48285767ea2416b /matrix.c
parent842cb2f0004842e48b064786a3e258d9cd5f9b0f (diff)
downloadgpsd-78c5fe3fe60be3645e080ff14c5c843c811c82da.tar.gz
cppcheck cleanup.
Diffstat (limited to 'matrix.c')
-rw-r--r--matrix.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/matrix.c b/matrix.c
index 53fee223..45f524e3 100644
--- a/matrix.c
+++ b/matrix.c
@@ -101,15 +101,16 @@ bool matrix_invert(double mat[4][4], /*@out@*/ double inverse[4][4])
/*@ +fixedformalarray +mustdefine @*/
#ifdef __UNUSED_
+// cppcheck-suppress unusedFunction
void matrix_symmetrize(double mat[4][4], /*@out@*/ double prod[4][4])
/* symmetrize a matrix, multiply it by its transpose */
{
- int i, j, k, n;
+ int i, j, k;
for (i = 0; i < 4; ++i) { //< rows
for (j = 0; j < 4; ++j) { //< cols
prod[i][j] = 0.0;
- for (k = 0; k < n; ++k) {
+ for (k = 0; k < 4; ++k) {
prod[i][j] += mat[k][i] * mat[k][j];
}
}