octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Help needed with suspicious code in Sparse.cc


From: John W. Eaton
Subject: Help needed with suspicious code in Sparse.cc
Date: Wed, 24 Feb 2016 12:19:00 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.5.0

Clang is generating the following warning:

Sparse.cc:136:18: warning: explicitly assigning value of variable of type 'octave_idx_type' (aka 'int') to itself [-Wself-assign]
    for (i = i; i < u; i++)
         ~ ^ ~

The same thing appears on line 946 in that file.

It looks to me as if the code is correct, but the warning could be avoided if the loop were written as

  for (; i < u; i++)

Could someone who understands the sparse matrix code comment?

Thanks,

jwe



reply via email to

[Prev in Thread] Current Thread [Next in Thread]