From 418a63ae7bfd05d4c58aaba7e1d74585fd351007 Mon Sep 17 00:00:00 2001 From: Joachim Klein Date: Fri, 16 Mar 2018 17:59:42 +0100 Subject: [PATCH] hybrid.cc: initialise col_offset in hdd_negative_row_sums It looks like the value of col_offset is never actually used during the recursion steps. For the moment, we just initialise with 0 (can not be worse than starting with uninitialised value) and mark as candidate for refactoring after thorough inspections of the various code paths. (via linting) --- prism/src/hybrid/hybrid.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/prism/src/hybrid/hybrid.cc b/prism/src/hybrid/hybrid.cc index 33699da7..e31b2e0d 100644 --- a/prism/src/hybrid/hybrid.cc +++ b/prism/src/hybrid/hybrid.cc @@ -1563,7 +1563,13 @@ double *hdd_negative_row_sums(HDDMatrix *hddm, int n, bool transpose) int row_offset; int col_offset; HDDNode *node; - + + // TODO: it looks like col_offset is not actually used during the various + // recursion steps (including swapping when transpose is set); + // candidate for removal / refactoring + // initialise col_offset + col_offset = 0; + // loop through rows/columns of blocks h = 0; for (i = 0; i < b_n; i++) {