From 66a7cc1289bcae4d2ad91d500b8b1f636cc7ffd6 Mon Sep 17 00:00:00 2001 From: Binh-Minh Ribler Date: Sun, 15 Mar 2015 01:45:24 -0500 Subject: [svn-r26456] Purpose: Fix warnings HDFFV-8658 Description: Fixed base classes that were in wrong order on the prototype lines and some misc. warnings. Platforms tested: Linux/64 (platypus) Linux/32 2.6 (jam) SunOS 5.11 (emu) --- c++/src/H5Attribute.cpp | 10 ++++++---- c++/src/H5DataSet.cpp | 10 +++++----- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/c++/src/H5Attribute.cpp b/c++/src/H5Attribute.cpp index a9e928d..6b5c753 100644 --- a/c++/src/H5Attribute.cpp +++ b/c++/src/H5Attribute.cpp @@ -392,10 +392,12 @@ H5std_string Attribute::getName() const //-------------------------------------------------------------------------- H5std_string Attribute::getName(size_t len) const { - H5std_string attr_name; - ssize_t name_size = getName(attr_name, len); - return(attr_name); - // let caller catch exception if any + H5std_string attr_name; + ssize_t name_size = getName(attr_name, len); + if (name_size < 0) + return(""); + else + return(attr_name); } //-------------------------------------------------------------------------- diff --git a/c++/src/H5DataSet.cpp b/c++/src/H5DataSet.cpp index 6728264..0374d95 100644 --- a/c++/src/H5DataSet.cpp +++ b/c++/src/H5DataSet.cpp @@ -52,7 +52,7 @@ namespace H5 { ///\brief Default constructor: creates a stub DataSet. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -DataSet::DataSet() : AbstractDs(), H5Object(), id(H5I_INVALID_HID) {} +DataSet::DataSet() : H5Object(), AbstractDs(), id(H5I_INVALID_HID) {} //-------------------------------------------------------------------------- // Function: DataSet overloaded constructor @@ -60,7 +60,7 @@ DataSet::DataSet() : AbstractDs(), H5Object(), id(H5I_INVALID_HID) {} ///\param existing_id - IN: Id of an existing dataset // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -DataSet::DataSet(const hid_t existing_id) : AbstractDs(), H5Object() +DataSet::DataSet(const hid_t existing_id) : H5Object(), AbstractDs() { id = existing_id; } @@ -71,7 +71,7 @@ DataSet::DataSet(const hid_t existing_id) : AbstractDs(), H5Object() ///\param original - IN: DataSet instance to copy // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -DataSet::DataSet(const DataSet& original) : AbstractDs(original), H5Object(original) +DataSet::DataSet(const DataSet& original) : H5Object(), AbstractDs() { id = original.getId(); incRefCount(); // increment number of references to this id @@ -95,7 +95,7 @@ DataSet::DataSet(const DataSet& original) : AbstractDs(original), H5Object(origi // Jul, 2008 // Added for application convenience. //-------------------------------------------------------------------------- -DataSet::DataSet(const H5Location& loc, const void* ref, H5R_type_t ref_type, const PropList& plist) : AbstractDs(), H5Object(), id(H5I_INVALID_HID) +DataSet::DataSet(const H5Location& loc, const void* ref, H5R_type_t ref_type, const PropList& plist) : H5Object(), AbstractDs(), id(H5I_INVALID_HID) { id = H5Location::p_dereference(loc.getId(), ref, ref_type, plist, "constructor - by dereferenced"); } @@ -114,7 +114,7 @@ DataSet::DataSet(const H5Location& loc, const void* ref, H5R_type_t ref_type, co // Jul, 2008 // Added for application convenience. //-------------------------------------------------------------------------- -DataSet::DataSet(const Attribute& attr, const void* ref, H5R_type_t ref_type, const PropList& plist) : AbstractDs(), H5Object(), id(H5I_INVALID_HID) +DataSet::DataSet(const Attribute& attr, const void* ref, H5R_type_t ref_type, const PropList& plist) : H5Object(), AbstractDs(), id(H5I_INVALID_HID) { id = H5Location::p_dereference(attr.getId(), ref, ref_type, plist, "constructor - by dereference"); } -- cgit v0.12