summaryrefslogtreecommitdiffstats
path: root/c++
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2015-04-03 19:10:39 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2015-04-03 19:10:39 (GMT)
commitaa13c0501d781ccbe83b19bc795e0c0241559789 (patch)
treedf91243000cdc309c6a81580d60130c131cfa395 /c++
parent5f68d05f9f8d41890c32d999a75e5d917a77e2a3 (diff)
downloadhdf5-aa13c0501d781ccbe83b19bc795e0c0241559789.zip
hdf5-aa13c0501d781ccbe83b19bc795e0c0241559789.tar.gz
hdf5-aa13c0501d781ccbe83b19bc795e0c0241559789.tar.bz2
[svn-r26723] Purpose: Fixed warnings
Description: Fixed base classes that were in wrong order on the prototype lines and some misc. warnings. Parameter had the same name as the class' member's. Replaced parameter with a different name. Missing initializing one of the base classes in multiple inheritance. Added CommonFG() to constructors' prototype. Merged from trunk r26454, r26455, and r26456. Platforms tested: Linux/64 (platypus) Linux/32 2.6 (jam) SunOS 5.11 (emu)
Diffstat (limited to 'c++')
-rw-r--r--c++/src/H5Attribute.cpp10
-rw-r--r--c++/src/H5DataSet.cpp6
-rw-r--r--c++/src/H5Exception.cpp48
-rw-r--r--c++/src/H5File.cpp8
-rw-r--r--c++/src/H5Group.cpp6
5 files changed, 40 insertions, 38 deletions
diff --git a/c++/src/H5Attribute.cpp b/c++/src/H5Attribute.cpp
index 0c135a9..8b43e80 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 83621f5..b0f49bf 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
diff --git a/c++/src/H5Exception.cpp b/c++/src/H5Exception.cpp
index daf6a74..f2aa38a 100644
--- a/c++/src/H5Exception.cpp
+++ b/c++/src/H5Exception.cpp
@@ -35,11 +35,11 @@ Exception::Exception() : detail_message(""), func_name("") {}
// Function: Exception overloaded constructor
///\brief Creates an exception with the name of the function,
/// in which the failure occurs, and an optional detailed message.
-///\param func_name - IN: Name of the function where failure occurs
+///\param func - IN: Name of the function where failure occurs
///\param message - IN: Message on the failure
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-Exception::Exception(const H5std_string& func_name, const H5std_string& message) : detail_message(message), func_name(func_name) {}
+Exception::Exception(const H5std_string& func, const H5std_string& message) : detail_message(message), func_name(func) {}
//--------------------------------------------------------------------------
// Function: Exception copy constructor
@@ -350,10 +350,10 @@ FileIException::FileIException():Exception(){}
// Function: FileIException overloaded constructor
///\brief Creates a FileIException with the name of the function,
/// in which the failure occurs, and an optional detailed message.
-///\param func_name - IN: Name of the function where failure occurs
+///\param func - IN: Name of the function where failure occurs
///\param message - IN: Message on the failure
//--------------------------------------------------------------------------
-FileIException::FileIException(const H5std_string& func_name, const H5std_string& message) : Exception(func_name, message) {}
+FileIException::FileIException(const H5std_string& func, const H5std_string& message) : Exception(func, message) {}
//--------------------------------------------------------------------------
// Function: FileIException destructor
///\brief Noop destructor.
@@ -373,10 +373,10 @@ GroupIException::GroupIException():Exception(){}
// Function: GroupIException overloaded constructor
///\brief Creates a GroupIException with the name of the function,
/// in which the failure occurs, and an optional detailed message.
-///\param func_name - IN: Name of the function where failure occurs
+///\param func - IN: Name of the function where failure occurs
///\param message - IN: Message on the failure
//--------------------------------------------------------------------------
-GroupIException::GroupIException(const H5std_string& func_name, const H5std_string& message) : Exception(func_name, message) {}
+GroupIException::GroupIException(const H5std_string& func, const H5std_string& message) : Exception(func, message) {}
//--------------------------------------------------------------------------
// Function: GroupIException destructor
///\brief Noop destructor.
@@ -396,10 +396,10 @@ DataSpaceIException::DataSpaceIException():Exception(){}
// Function: DataSpaceIException overloaded constructor
///\brief Creates a DataSpaceIException with the name of the function,
/// in which the failure occurs, and an optional detailed message.
-///\param func_name - IN: Name of the function where failure occurs
+///\param func - IN: Name of the function where failure occurs
///\param message - IN: Message on the failure
//--------------------------------------------------------------------------
-DataSpaceIException::DataSpaceIException(const H5std_string& func_name, const H5std_string& message) : Exception(func_name, message) {}
+DataSpaceIException::DataSpaceIException(const H5std_string& func, const H5std_string& message) : Exception(func, message) {}
//--------------------------------------------------------------------------
// Function: DataSpaceIException destructor
///\brief Noop destructor.
@@ -419,10 +419,10 @@ DataTypeIException::DataTypeIException():Exception(){}
// Function: DataTypeIException overloaded constructor
///\brief Creates a DataTypeIException with the name of the function,
/// in which the failure occurs, and an optional detailed message.
-///\param func_name - IN: Name of the function where failure occurs
+///\param func - IN: Name of the function where failure occurs
///\param message - IN: Message on the failure
//--------------------------------------------------------------------------
-DataTypeIException::DataTypeIException(const H5std_string& func_name, const H5std_string& message) : Exception(func_name, message) {}
+DataTypeIException::DataTypeIException(const H5std_string& func, const H5std_string& message) : Exception(func, message) {}
//--------------------------------------------------------------------------
// Function: DataTypeIException destructor
///\brief Noop destructor.
@@ -442,10 +442,10 @@ PropListIException::PropListIException():Exception(){}
// Function: PropListIException overloaded constructor
///\brief Creates a PropListIException with the name of the function,
/// in which the failure occurs, and an optional detailed message.
-///\param func_name - IN: Name of the function where failure occurs
+///\param func - IN: Name of the function where failure occurs
///\param message - IN: Message on the failure
//--------------------------------------------------------------------------
-PropListIException::PropListIException(const H5std_string& func_name, const H5std_string& message) : Exception(func_name, message) {}
+PropListIException::PropListIException(const H5std_string& func, const H5std_string& message) : Exception(func, message) {}
//--------------------------------------------------------------------------
// Function: PropListIException destructor
///\brief Noop destructor.
@@ -465,10 +465,10 @@ DataSetIException::DataSetIException():Exception(){}
// Function: DataSetIException overloaded constructor
///\brief Creates a DataSetIException with the name of the function,
/// in which the failure occurs, and an optional detailed message.
-///\param func_name - IN: Name of the function where failure occurs
+///\param func - IN: Name of the function where failure occurs
///\param message - IN: Message on the failure
//--------------------------------------------------------------------------
-DataSetIException::DataSetIException(const H5std_string& func_name, const H5std_string& message) : Exception(func_name, message) {}
+DataSetIException::DataSetIException(const H5std_string& func, const H5std_string& message) : Exception(func, message) {}
//--------------------------------------------------------------------------
// Function: DataSetIException destructor
///\brief Noop destructor.
@@ -488,10 +488,10 @@ AttributeIException::AttributeIException():Exception(){}
// Function: AttributeIException overloaded constructor
///\brief Creates an AttributeIException with the name of the function,
/// in which the failure occurs, and an optional detailed message.
-///\param func_name - IN: Name of the function where failure occurs
+///\param func - IN: Name of the function where failure occurs
///\param message - IN: Message on the failure
//--------------------------------------------------------------------------
-AttributeIException::AttributeIException(const H5std_string& func_name, const H5std_string& message) : Exception(func_name, message) {}
+AttributeIException::AttributeIException(const H5std_string& func, const H5std_string& message) : Exception(func, message) {}
//--------------------------------------------------------------------------
// Function: AttributeIException destructor
///\brief Noop destructor.
@@ -511,10 +511,10 @@ ReferenceException::ReferenceException():Exception(){}
// Function: ReferenceException overloaded constructor
///\brief Creates a ReferenceException with the name of the function,
/// in which the failure occurs, and an optional detailed message.
-///\param func_name - IN: Name of the function where failure occurs
+///\param func - IN: Name of the function where failure occurs
///\param message - IN: Message on the failure
//--------------------------------------------------------------------------
-ReferenceException::ReferenceException(const H5std_string& func_name, const H5std_string& message) : Exception(func_name, message) {}
+ReferenceException::ReferenceException(const H5std_string& func, const H5std_string& message) : Exception(func, message) {}
//--------------------------------------------------------------------------
// Function: ReferenceException destructor
///\brief Noop destructor.
@@ -534,10 +534,10 @@ LibraryIException::LibraryIException():Exception(){}
// Function: LibraryIException overloaded constructor
///\brief Creates a LibraryIException with the name of the function,
/// in which the failure occurs, and an optional detailed message.
-///\param func_name - IN: Name of the function where failure occurs
+///\param func - IN: Name of the function where failure occurs
///\param message - IN: Message on the failure
//--------------------------------------------------------------------------
-LibraryIException::LibraryIException(const H5std_string& func_name, const H5std_string& message) : Exception(func_name, message) {}
+LibraryIException::LibraryIException(const H5std_string& func, const H5std_string& message) : Exception(func, message) {}
//--------------------------------------------------------------------------
// Function: LibraryIException destructor
///\brief Noop destructor.
@@ -557,10 +557,10 @@ LocationException::LocationException():Exception(){}
// Function: LocationException overloaded constructor
///\brief Creates a LocationException with the name of the function,
/// in which the failure occurs, and an optional detailed message.
-///\param func_name - IN: Name of the function where failure occurs
+///\param func - IN: Name of the function where failure occurs
///\param message - IN: Message on the failure
//--------------------------------------------------------------------------
-LocationException::LocationException(const H5std_string& func_name, const H5std_string& message) : Exception(func_name, message) {}
+LocationException::LocationException(const H5std_string& func, const H5std_string& message) : Exception(func, message) {}
//--------------------------------------------------------------------------
// Function: LocationException destructor
///\brief Noop destructor.
@@ -580,10 +580,10 @@ IdComponentException::IdComponentException(): Exception() {}
// Function: IdComponentException overloaded constructor
///\brief Creates a IdComponentException with the name of the function,
/// in which the failure occurs, and an optional detailed message.
-///\param func_name - IN: Name of the function where failure occurs
+///\param func - IN: Name of the function where failure occurs
///\param message - IN: Message on the failure
//--------------------------------------------------------------------------
-IdComponentException::IdComponentException(const H5std_string& func_name, const H5std_string& message) : Exception(func_name, message) {}
+IdComponentException::IdComponentException(const H5std_string& func, const H5std_string& message) : Exception(func, message) {}
//--------------------------------------------------------------------------
// Function: IdComponentException destructor
///\brief Noop destructor.
diff --git a/c++/src/H5File.cpp b/c++/src/H5File.cpp
index 0620070..79d5999 100644
--- a/c++/src/H5File.cpp
+++ b/c++/src/H5File.cpp
@@ -50,7 +50,7 @@ namespace H5 {
///\brief Default constructor: creates a stub H5File object.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-H5File::H5File() : H5Location(), id(H5I_INVALID_HID) {}
+H5File::H5File() : H5Location(), CommonFG(), id(H5I_INVALID_HID) {}
//--------------------------------------------------------------------------
// Function: H5File overloaded constructor
@@ -86,7 +86,7 @@ H5File::H5File() : H5Location(), id(H5I_INVALID_HID) {}
// to catch then re-throw it. -BMR 2013/03/21
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-H5File::H5File( const char* name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist ) : H5Location(), id(H5I_INVALID_HID)
+H5File::H5File( const char* name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist ) : H5Location(), CommonFG(), id(H5I_INVALID_HID)
{
try {
p_get_file(name, flags, create_plist, access_plist);
@@ -111,7 +111,7 @@ H5File::H5File( const char* name, unsigned int flags, const FileCreatPropList& c
// to catch then re-throw it. -BMR 2013/03/21
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-H5File::H5File( const H5std_string& name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist ) : H5Location(), id(H5I_INVALID_HID)
+H5File::H5File( const H5std_string& name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist ) : H5Location(), CommonFG(), id(H5I_INVALID_HID)
{
try {
p_get_file(name.c_str(), flags, create_plist, access_plist);
@@ -164,7 +164,7 @@ void H5File::p_get_file(const char* name, unsigned int flags, const FileCreatPro
///\param original - IN: H5File instance to copy
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-H5File::H5File(const H5File& original) : H5Location(original)
+H5File::H5File(const H5File& original) : H5Location(), CommonFG()
{
id = original.getId();
incRefCount(); // increment number of references to this id
diff --git a/c++/src/H5Group.cpp b/c++/src/H5Group.cpp
index 41e7fc6..b523f89 100644
--- a/c++/src/H5Group.cpp
+++ b/c++/src/H5Group.cpp
@@ -51,7 +51,7 @@ namespace H5 {
///\brief Default constructor: creates a stub Group.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-Group::Group() : H5Object(), id(H5I_INVALID_HID) {}
+Group::Group() : H5Object(), CommonFG(), id(H5I_INVALID_HID) {}
//--------------------------------------------------------------------------
// Function: Group copy constructor
@@ -59,7 +59,7 @@ Group::Group() : H5Object(), id(H5I_INVALID_HID) {}
///\param original - IN: Original group to copy
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-Group::Group(const Group& original) : H5Object(original)
+Group::Group(const Group& original) : H5Object(), CommonFG()
{
id = original.getId();
incRefCount(); // increment number of references to this id
@@ -82,7 +82,7 @@ hid_t Group::getLocId() const
///\param existing_id - IN: Id of an existing group
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-Group::Group(const hid_t existing_id) : H5Object()
+Group::Group(const hid_t existing_id) : H5Object(), CommonFG()
{
id = existing_id;
}