necpp icon indicating copy to clipboard operation
necpp copied to clipboard

Unreachable code found.

Open livep2000 opened this issue 8 years ago • 0 comments

Very small enhancement:

In matrix_algebra.cpp, void solves, line 791:

Snip*

for (int64_t k = 0; k < nop; k++ ) {
      if ( k != 0 )  {
        int64_t ia = np-1;
        for (int64_t i = 0; i < np; i++ ) {
          ia++;
          j++;
          b[ia+column_offset]= scm[j];
        }

        if ( k == nop)
          continue;
      } /* if ( k != 0 ) */

This part:

if ( k == nop)
          continue;

k can never reach the value nop since the loop defines k < nop

Imre Biacsics

livep2000 avatar Nov 01 '17 05:11 livep2000