[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #43383] Fix using uninitialized variable (idx-
From: |
John W. Eaton |
Subject: |
[Octave-bug-tracker] [bug #43383] Fix using uninitialized variable (idx-vector.cc) |
Date: |
Thu, 09 Oct 2014 21:45:08 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0 Iceweasel/31.0 |
Follow-up Comment #1, bug #43383 (project octave):
I think you are using memset incorrectly here. The last argument is the
number of bytes, so I think you should be multiplying by sizeof. But since
this is C++ code, maybe it would be better to use std::fill?
But in any case, I think the static analysis is showing a false positive here
because len is equal to the number of non-zero elements in the data vector, so
the loop should set all elements of idata.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?43383>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/