changeset 19910:2f2220bfd379

ov-base-int.cc, ov-float.cc: Fix build without HDF5 * ov-base-int.cc Without this, gcc 4.7 shows: "error: 'gripe_save' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive] note: declarations in dependent base 'octave_base_value' are not found by unqualified lookup. Use 'this->gripe_save' instead" * ov-float.cc: Move retval outside ifdef HAVE_HDF5 block
author Andreas Weber <andy.weber.aw@gmail.com>
date Sat, 28 Feb 2015 10:34:25 +0100
parents 6b7aee95c54c
children f799bf70350f
files libinterp/octave-value/ov-base-int.cc libinterp/octave-value/ov-float.cc
diffstat 2 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/octave-value/ov-base-int.cc	Fri Feb 27 16:29:14 2015 -0800
+++ b/libinterp/octave-value/ov-base-int.cc	Sat Feb 28 10:34:25 2015 +0100
@@ -380,7 +380,7 @@
   H5Sclose (space_hid);
 
 #else
-  gripe_save ("hdf5");
+  this->gripe_save ("hdf5");
 #endif
 
   return retval;
@@ -449,7 +449,7 @@
   H5Dclose (data_hid);
 
 #else
-  gripe_load ("hdf5");
+  this->gripe_load ("hdf5");
 #endif
 
   return retval;
@@ -589,7 +589,7 @@
   H5Sclose (space_hid);
 
 #else
-  gripe_save ("hdf5");
+  this->gripe_save ("hdf5");
 #endif
 
   return retval;
@@ -632,7 +632,7 @@
   return true;
 
 #else
-  gripe_load ("hdf5");
+  this->gripe_load ("hdf5");
   return false;
 #endif
 }
--- a/libinterp/octave-value/ov-float.cc	Fri Feb 27 16:29:14 2015 -0800
+++ b/libinterp/octave-value/ov-float.cc	Sat Feb 28 10:34:25 2015 +0100
@@ -188,12 +188,13 @@
 octave_float_scalar::save_hdf5 (octave_hdf5_id loc_id, const char *name,
                                 bool /* save_as_floats */)
 {
+  bool retval = false;
+
 #if defined (HAVE_HDF5)
 
   hsize_t dimens[3];
   hid_t space_hid, data_hid;
   space_hid = data_hid = -1;
-  bool retval = true;
 
   space_hid = H5Screate_simple (0, dimens, 0);
   if (space_hid < 0) return false;