summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2017-09-07 15:12:43 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2017-09-07 15:12:43 (GMT)
commit47a2d5e48f5f3dcfed57c5be01178952030828c2 (patch)
tree1f898bbceea7c656ef4097334e4c96cf171f4940
parent7f8e7c6d15010bb722d3a18c1f90c03a81b0820b (diff)
downloadhdf5-47a2d5e48f5f3dcfed57c5be01178952030828c2.zip
hdf5-47a2d5e48f5f3dcfed57c5be01178952030828c2.tar.gz
hdf5-47a2d5e48f5f3dcfed57c5be01178952030828c2.tar.bz2
Adding variable initialization
Platforms tested: Linux/32 2.6 (jam) Linux/64 (platypus) Darwin (osx1010test)
-rw-r--r--c++/src/H5ArrayType.cpp2
-rw-r--r--c++/src/H5CompType.cpp2
-rw-r--r--c++/src/H5DataType.cpp2
-rw-r--r--c++/src/H5EnumType.cpp10
-rw-r--r--c++/src/H5FloatType.cpp2
-rw-r--r--c++/src/H5IntType.cpp2
-rw-r--r--c++/src/H5StrType.cpp2
-rw-r--r--c++/src/H5VarLenType.cpp2
8 files changed, 12 insertions, 12 deletions
diff --git a/c++/src/H5ArrayType.cpp b/c++/src/H5ArrayType.cpp
index c39ef35..15ac140 100644
--- a/c++/src/H5ArrayType.cpp
+++ b/c++/src/H5ArrayType.cpp
@@ -147,7 +147,7 @@ ArrayType& ArrayType::operator=(const ArrayType& rhs)
//--------------------------------------------------------------------------
DataType* ArrayType::decode() const
{
- hid_t encoded_arrtype_id;
+ hid_t encoded_arrtype_id = H5I_INVALID_HID;
try {
encoded_arrtype_id = p_decode();
}
diff --git a/c++/src/H5CompType.cpp b/c++/src/H5CompType.cpp
index 95fddc1..da7e3e2 100644
--- a/c++/src/H5CompType.cpp
+++ b/c++/src/H5CompType.cpp
@@ -132,7 +132,7 @@ CompType::CompType(const H5Location& loc, const H5std_string& dtype_name) : Data
//--------------------------------------------------------------------------
DataType* CompType::decode() const
{
- hid_t encoded_cmptype_id;
+ hid_t encoded_cmptype_id = H5I_INVALID_HID;
try {
encoded_cmptype_id = p_decode();
}
diff --git a/c++/src/H5DataType.cpp b/c++/src/H5DataType.cpp
index 11b30cc..28a670e 100644
--- a/c++/src/H5DataType.cpp
+++ b/c++/src/H5DataType.cpp
@@ -285,7 +285,7 @@ hid_t DataType::p_decode() const
//--------------------------------------------------------------------------
DataType* DataType::decode() const
{
- hid_t encoded_dtype_id;
+ hid_t encoded_dtype_id = H5I_INVALID_HID;
try {
encoded_dtype_id = p_decode();
}
diff --git a/c++/src/H5EnumType.cpp b/c++/src/H5EnumType.cpp
index f9046be..02ae5a3 100644
--- a/c++/src/H5EnumType.cpp
+++ b/c++/src/H5EnumType.cpp
@@ -154,16 +154,16 @@ EnumType::EnumType(const H5Location& loc, const H5std_string& dtype_name) : Data
//--------------------------------------------------------------------------
DataType* EnumType::decode() const
{
- hid_t encoded_cmptype_id;
+ hid_t encoded_enumtype_id = H5I_INVALID_HID;
try {
- encoded_cmptype_id = p_decode();
+ encoded_enumtype_id = p_decode();
}
catch (DataTypeIException &err) {
throw;
}
- EnumType *encoded_cmptype = new EnumType;
- encoded_cmptype->p_setId(encoded_cmptype_id);
- return(encoded_cmptype);
+ EnumType *encoded_enumtype = new EnumType;
+ encoded_enumtype->p_setId(encoded_enumtype_id);
+ return(encoded_enumtype);
}
//--------------------------------------------------------------------------
diff --git a/c++/src/H5FloatType.cpp b/c++/src/H5FloatType.cpp
index 66a7466..794c27d 100644
--- a/c++/src/H5FloatType.cpp
+++ b/c++/src/H5FloatType.cpp
@@ -136,7 +136,7 @@ FloatType::FloatType(const H5Location& loc, const H5std_string& dtype_name) : At
//--------------------------------------------------------------------------
DataType* FloatType::decode() const
{
- hid_t encoded_flttype_id;
+ hid_t encoded_flttype_id = H5I_INVALID_HID;
try {
encoded_flttype_id = p_decode();
}
diff --git a/c++/src/H5IntType.cpp b/c++/src/H5IntType.cpp
index 8408732..ef4e1a9 100644
--- a/c++/src/H5IntType.cpp
+++ b/c++/src/H5IntType.cpp
@@ -135,7 +135,7 @@ IntType::IntType(const H5Location& loc, const H5std_string& dtype_name) : AtomTy
//--------------------------------------------------------------------------
DataType* IntType::decode() const
{
- hid_t encoded_inttype_id;
+ hid_t encoded_inttype_id = H5I_INVALID_HID;
try {
encoded_inttype_id = p_decode();
}
diff --git a/c++/src/H5StrType.cpp b/c++/src/H5StrType.cpp
index cbb2103..d2d87e9 100644
--- a/c++/src/H5StrType.cpp
+++ b/c++/src/H5StrType.cpp
@@ -189,7 +189,7 @@ StrType::StrType(const H5Location& loc, const H5std_string& dtype_name) : AtomTy
//--------------------------------------------------------------------------
DataType* StrType::decode() const
{
- hid_t encoded_strtype_id;
+ hid_t encoded_strtype_id = H5I_INVALID_HID;
try {
encoded_strtype_id = p_decode();
}
diff --git a/c++/src/H5VarLenType.cpp b/c++/src/H5VarLenType.cpp
index fcea8cd..b5ca9c4 100644
--- a/c++/src/H5VarLenType.cpp
+++ b/c++/src/H5VarLenType.cpp
@@ -117,7 +117,7 @@ VarLenType::VarLenType(const H5Location& loc, const H5std_string& dtype_name) :
//--------------------------------------------------------------------------
DataType* VarLenType::decode() const
{
- hid_t encoded_vltype_id;
+ hid_t encoded_vltype_id = H5I_INVALID_HID;
try {
encoded_vltype_id = p_decode();
}