# HG changeset patch # User John W. Eaton # Date 1263439908 18000 # Node ID b51848e95e4bf98f0526b331e12eefc6133baf35 # Parent dd4d4b14b340182f830bc738b0e8d4aaebb81506 cleanups to avoid valgrind warnings diff --git a/liboctave/ChangeLog b/liboctave/ChangeLog --- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,8 @@ +2010-01-13 John W. Eaton + + * idx-vector.cc (idx_vector::idx_scalar_rep::idx_scalar_rep (T x)): + Initialize dummy variable. + 2010-01-13 Jaroslav Hajek * Array.cc (Array::compute_index): Generalize to the case of diff --git a/liboctave/idx-vector.cc b/liboctave/idx-vector.cc --- a/liboctave/idx-vector.cc +++ b/liboctave/idx-vector.cc @@ -215,7 +215,7 @@ template 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 (); } diff --git a/src/ChangeLog b/src/ChangeLog --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,11 @@ +2010-01-13 John W. Eaton + + * 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 * DLD-FUNCTIONS/__magick_read__.cc (read_indexed_images): diff --git a/src/ov-builtin.h b/src/ov-builtin.h --- 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); diff --git a/src/ov-fcn.h b/src/ov-fcn.h --- 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;