Mercurial > hg > octave-lojdl
changeset 10101:b51848e95e4b
cleanups to avoid valgrind warnings
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 13 Jan 2010 22:31:48 -0500 |
parents | dd4d4b14b340 |
children | 8b4e3388a254 |
files | liboctave/ChangeLog liboctave/idx-vector.cc src/ChangeLog src/ov-builtin.h src/ov-fcn.h |
diffstat | 5 files changed, 17 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,8 @@ +2010-01-13 John W. Eaton <jwe@octave.org> + + * idx-vector.cc (idx_vector::idx_scalar_rep::idx_scalar_rep (T x)): + Initialize dummy variable. + 2010-01-13 Jaroslav Hajek <highegg@gmail.com> * Array.cc (Array<T>::compute_index): Generalize to the case of
--- a/liboctave/idx-vector.cc +++ b/liboctave/idx-vector.cc @@ -215,7 +215,7 @@ template <class T> idx_vector::idx_scalar_rep::idx_scalar_rep (T x) { - octave_idx_type dummy; + octave_idx_type dummy = 0; data = convert_index (x, err, dummy); if (err) gripe_invalid_index (); }
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,11 @@ +2010-01-13 John W. Eaton <jwe@octave.org> + + * ov-fcn.h (octave_function (const std::string&, const std::string&)): + Explicitly initialize all data members. + + * ov-builtin.h (octave_builtin::octave_builtin): + Explicitly initialize base class object and data member. + 2010-01-13 John W. Eaton <jwe@octave.org> * DLD-FUNCTIONS/__magick_read__.cc (read_indexed_images):
--- a/src/ov-builtin.h +++ b/src/ov-builtin.h @@ -40,7 +40,7 @@ { public: - octave_builtin (void) { } + octave_builtin (void) : octave_function (), f (0) { } typedef octave_value_list (*fcn) (const octave_value_list&, int);
--- a/src/ov-fcn.h +++ b/src/ov-fcn.h @@ -141,7 +141,8 @@ octave_function (const std::string& nm, const std::string& ds = std::string ()) - : relative (false), my_name (nm), doc (ds) { } + : relative (false), locked (false), private_function (false), + xdispatch_class (), my_name (nm), my_dir_name (), doc (ds) { } // TRUE if this function was found from a relative path element. bool relative;