some warnings 25/10025/2
Antoine ELIAS [Thu, 13 Dec 2012 13:54:12 +0000 (14:54 +0100)]
Change-Id: I6946a51b7c22f3db6b9ee44a1d47a9402887e95c

23 files changed:
scilab/modules/hdf5/sci_gateway/cpp/sci_h5read.cpp
scilab/modules/hdf5/sci_gateway/cpp/sci_h5write.cpp
scilab/modules/hdf5/sci_gateway/cpp/sci_percent_H5Object_e.cpp
scilab/modules/hdf5/src/c/DllmainHdf5.c
scilab/modules/hdf5/src/c/hdf5.vcxproj
scilab/modules/hdf5/src/c/hdf5.vcxproj.filters
scilab/modules/hdf5/src/cpp/H5ArrayData.cpp
scilab/modules/hdf5/src/cpp/H5Attribute.cpp
scilab/modules/hdf5/src/cpp/H5AttributesList.cpp
scilab/modules/hdf5/src/cpp/H5BasicData.hxx
scilab/modules/hdf5/src/cpp/H5DataFactory.cpp
scilab/modules/hdf5/src/cpp/H5Dataset.cpp
scilab/modules/hdf5/src/cpp/H5Dataspace.cpp
scilab/modules/hdf5/src/cpp/H5ExternalLink.cpp
scilab/modules/hdf5/src/cpp/H5File.cpp
scilab/modules/hdf5/src/cpp/H5Group.cpp
scilab/modules/hdf5/src/cpp/H5HardLink.cpp
scilab/modules/hdf5/src/cpp/H5NamedObjectsList.hxx
scilab/modules/hdf5/src/cpp/H5OpaqueData.hxx
scilab/modules/hdf5/src/cpp/H5ReferenceData.cpp
scilab/modules/hdf5/src/cpp/H5StringData.cpp
scilab/modules/hdf5/src/cpp/H5VlenData.cpp
scilab/modules/hdf5/src/cpp/HDF5Scilab.hxx

index 9ce0687..f3245ca 100644 (file)
@@ -178,7 +178,7 @@ int sci_h5read(char *fname, unsigned long fname_len)
         }
     }
 
-    for (unsigned int i = 3; i <= nbIn; i++)
+    for (int i = 3; i <= nbIn; i++)
     {
         err = getVarAddressFromPosition(pvApiCtx, i, &addr);
         if (err.iErr)
index 35687b3..cb47b05 100644 (file)
@@ -171,7 +171,7 @@ int sci_h5write(char *fname, unsigned long fname_len)
             rhsBegin = 4;
         }
 
-        for (unsigned int i = rhsBegin; i <= nbIn; i++)
+        for (int i = rhsBegin; i <= nbIn; i++)
         {
             err = getVarAddressFromPosition(pvApiCtx, i, &addr);
             if (err.iErr)
index b34c51a..155583e 100644 (file)
@@ -86,7 +86,7 @@ int sci_percent_H5Object_e(char * fname, unsigned long fname_len)
         double d;
         index = new unsigned int[nbIn - 1];
 
-        for (unsigned int i = 1; i <= nbIn - 1; i++)
+        for (int i = 1; i <= nbIn - 1; i++)
         {
             err = getVarAddressFromPosition(pvApiCtx, i, &addr);
             if (err.iErr)
index bb7a622..940a531 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2009 - DIGITEO  - 
+ * Copyright (C) 2009 - DIGITEO  -
  *
  * This file must be used under the terms of the CeCILL.
  * This source file is licensed as described in the file COPYING, which
  *
  */
 
-#include <windows.h> 
-/*--------------------------------------------------------------------------*/ 
+#include <windows.h>
+/*--------------------------------------------------------------------------*/
 #pragma comment(lib,"../../../../bin/libintl.lib")
 #pragma comment(lib,"../../../../bin/hdf5dll.lib")
-/*--------------------------------------------------------------------------*/ 
+#pragma comment(lib,"../../../../bin/hdf5_hldll.lib")
+/*--------------------------------------------------------------------------*/
 int WINAPI DllMain (HINSTANCE hInstance , DWORD reason, PVOID pvReserved)
 {
-  switch (reason) 
+    switch (reason)
     {
-    case DLL_PROCESS_ATTACH:
-      break;
-    case DLL_PROCESS_DETACH:
-      break;
-    case DLL_THREAD_ATTACH:
-      break;
-    case DLL_THREAD_DETACH:
-      break;
+        case DLL_PROCESS_ATTACH:
+            break;
+        case DLL_PROCESS_DETACH:
+            break;
+        case DLL_THREAD_ATTACH:
+            break;
+        case DLL_THREAD_DETACH:
+            break;
     }
-  return 1;
+    return 1;
 }
-/*--------------------------------------------------------------------------*/ 
+/*--------------------------------------------------------------------------*/
 
index 58c43ea..3b61027 100644 (file)
@@ -77,7 +77,7 @@
     <ClCompile>
       <Optimization>Disabled</Optimization>
       <AdditionalIncludeDirectories>.;../../includes;../../../../libs/MALLOC/includes;../../../output_stream/includes;../../../core/includes;../../../api_scilab/includes;../../../localization/includes;../../../../libs/intl;../../../../libs/hdf5/include;../../../windows_tools/includes;../../../fileio/includes;../../../commons/src/jni;../../../jvm/includes;../../../../java/jdk/include;../../../../java/jdk/include/win32;../jni;../cpp;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;_DEBUG;_WINDOWS;_USRDLL;HDF5_SCILAB_EXPORTS;WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;H5Topen_vers=2 -DH5Dcreate_vers=2;H5Aiterate_vers=2;H5Gcreate_vers=2;H5Gopen_vers=2;H5Tget_array_dims_vers=2;H5Acreate_vers=2;NO_DEPRECATED_SYMBOLS;_DEBUG;_WINDOWS;_USRDLL;HDF5_SCILAB_EXPORTS;WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
       <WarningLevel>Level3</WarningLevel>
       <DisableSpecificWarnings>4251;%(DisableSpecificWarnings)</DisableSpecificWarnings>
     <ClCompile>
       <Optimization>Disabled</Optimization>
       <AdditionalIncludeDirectories>.;../../includes;../../../../libs/MALLOC/includes;../../../output_stream/includes;../../../core/includes;../../../api_scilab/includes;../../../localization/includes;../../../../libs/intl;../../../../libs/hdf5/include;../../../windows_tools/includes;../../../fileio/includes;../../../commons/src/jni;../../../jvm/includes;../../../../java/jdk/include;../../../../java/jdk/include/win32;../jni;../cpp;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;_DEBUG;_WINDOWS;_USRDLL;HDF5_SCILAB_EXPORTS;WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;H5Topen_vers=2;H5Dcreate_vers=2;H5Aiterate_vers=2;H5Gcreate_vers=2;H5Gopen_vers=2;H5Tget_array_dims_vers=2;H5Acreate_vers=2;_DEBUG;_WINDOWS;_USRDLL;HDF5_SCILAB_EXPORTS;WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
       <WarningLevel>Level3</WarningLevel>
       <DisableSpecificWarnings>4251;%(DisableSpecificWarnings)</DisableSpecificWarnings>
       <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
       <WholeProgramOptimization>false</WholeProgramOptimization>
       <AdditionalIncludeDirectories>.;../../includes;../../../../libs/MALLOC/includes;../../../output_stream/includes;../../../core/includes;../../../api_scilab/includes;../../../localization/includes;../../../../libs/intl;../../../../libs/hdf5/include;../../../windows_tools/includes;../../../fileio/includes;../../../commons/src/jni;../../../jvm/includes;../../../../java/jdk/include;../../../../java/jdk/include/win32;../jni;../cpp;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;NDEBUG;_WINDOWS;_USRDLL;HDF5_SCILAB_EXPORTS;WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;H5Topen_vers=2 -DH5Dcreate_vers=2;H5Aiterate_vers=2;H5Gcreate_vers=2;H5Gopen_vers=2;H5Tget_array_dims_vers=2;H5Acreate_vers=2;NO_DEPRECATED_SYMBOLS;NDEBUG;_WINDOWS;_USRDLL;HDF5_SCILAB_EXPORTS;WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>true</StringPooling>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
       <WarningLevel>Level3</WarningLevel>
       <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
       <WholeProgramOptimization>false</WholeProgramOptimization>
       <AdditionalIncludeDirectories>.;../../includes;../../../../libs/MALLOC/includes;../../../output_stream/includes;../../../core/includes;../../../api_scilab/includes;../../../localization/includes;../../../../libs/intl;../../../../libs/hdf5/include;../../../windows_tools/includes;../../../fileio/includes;../../../commons/src/jni;../../../jvm/includes;../../../../java/jdk/include;../../../../java/jdk/include/win32;../jni;../cpp;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;NDEBUG;_WINDOWS;_USRDLL;HDF5_SCILAB_EXPORTS;WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;H5Topen_vers=2;H5Dcreate_vers=2;H5Aiterate_vers=2;H5Gcreate_vers=2;H5Gopen_vers=2;H5Tget_array_dims_vers=2;H5Acreate_vers=2;NO_DEPRECATED_SYMBOLS;NDEBUG;_WINDOWS;_USRDLL;HDF5_SCILAB_EXPORTS;WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>true</StringPooling>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
       <WarningLevel>Level3</WarningLevel>
     <ClCompile Include="..\..\sci_gateway\cpp\sci_h5group.cpp" />
     <ClCompile Include="..\..\sci_gateway\cpp\sci_h5isfoo.cpp" />
     <ClCompile Include="..\..\sci_gateway\cpp\sci_h5label.cpp" />
+    <ClCompile Include="..\..\sci_gateway\cpp\sci_h5ln.cpp" />
     <ClCompile Include="..\..\sci_gateway\cpp\sci_h5ls.cpp" />
     <ClCompile Include="..\..\sci_gateway\cpp\sci_h5mount.cpp" />
     <ClCompile Include="..\..\sci_gateway\cpp\sci_h5mv.cpp" />
     <ClCompile Include="..\..\sci_gateway\cpp\sci_h5open.cpp" />
     <ClCompile Include="..\..\sci_gateway\cpp\sci_h5read.cpp" />
+    <ClCompile Include="..\..\sci_gateway\cpp\sci_h5readattr.cpp" />
     <ClCompile Include="..\..\sci_gateway\cpp\sci_h5rm.cpp" />
     <ClCompile Include="..\..\sci_gateway\cpp\sci_h5umount.cpp" />
     <ClCompile Include="..\..\sci_gateway\cpp\sci_h5write.cpp" />
index 859422a..592f0ec 100644 (file)
     <ClCompile Include="..\..\sci_gateway\cpp\sci_percent_H5Object_p.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
+    <ClCompile Include="..\..\sci_gateway\cpp\sci_h5ln.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\sci_gateway\cpp\sci_h5readattr.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="..\..\includes\dynlib_hdf5_scilab.h">
index fc88341..5bbdc85 100644 (file)
@@ -57,7 +57,7 @@ H5Object & H5ArrayData::getData(const unsigned int size, const unsigned int * in
 
     for (unsigned int i = 0; i < size; i++)
     {
-        pos += cumprod[i] * index[i];
+        pos += (int)cumprod[i] * index[i];
     }
 
     if (pos >= totalSize)
index 4622ff7..238f090 100644 (file)
@@ -113,7 +113,7 @@ std::string H5Attribute::dump(std::map<haddr_t, std::string> & alreadyVisited, c
     {
         data = &const_cast<H5Attribute *>(this)->getData();
     }
-    catch (const H5Exception & e)
+    catch (const H5Exception & /*e*/)
     {
 
     }
@@ -252,7 +252,7 @@ void H5Attribute::copy(const hid_t src, const hid_t dest, const std::string & na
         delete[] dims;
         delete[] data;
     }
-    catch (const H5Exception & e)
+    catch (const H5Exception & /*e*/)
     {
         H5Sclose(space);
         H5Tclose(type);
index b11bf3f..22fc88c 100644 (file)
@@ -67,7 +67,7 @@ H5Attribute & H5AttributesList::getObject(const int pos, const bool checkPos)
     if (checkPos)
     {
         unsigned int size = getSize();
-        if (pos < 0 || pos >= size)
+        if (pos < 0 || pos >= (int)size)
         {
             throw H5Exception(__LINE__, __FILE__, _("Invalid index %u: must be between 0 and %u."), pos, size);
         }
index be0ca17..0133585 100644 (file)
@@ -222,6 +222,7 @@ public:
 #endif
 
     __SCILAB_STACK_CREATOR__(char *, String)
+    static void alloc(void * pvApiCtx, const int position, const int rows, const int cols, int * list, const int listPosition, char*** ptr) {}
 };
 }
 
index 7654ddf..510bb18 100644 (file)
@@ -39,7 +39,7 @@ H5Data & H5DataFactory::getData(H5Object & parent, const hid_t obj, H5Dataspace
 
         return ret;
     }
-    catch (const H5Exception & e)
+    catch (const H5Exception & /*e*/)
     {
         H5Tclose(type);
         H5Tclose(nativeType);
@@ -166,7 +166,7 @@ H5Data & H5DataFactory::getObjectData(H5Object & parent, const hsize_t totalSize
             int nmembers = H5Tget_nmembers(type);
             std::string * names = nmembers > 0 ? new std::string[nmembers] : 0;
 
-            for (unsigned int i = 0; i < nmembers; i++)
+            for (int i = 0; i < nmembers; i++)
             {
                 char * mname = H5Tget_member_name(type, i);
                 names[i] = std::string(mname);
@@ -268,7 +268,7 @@ void H5DataFactory::getNativeData(const hid_t obj, const hid_t space, hsize_t *
             *data = static_cast<void *>(new char[(size_t)size]);
         }
     }
-    catch (const std::bad_alloc & e)
+    catch (const std::bad_alloc & /*e*/)
     {
         H5Tclose(nativeType);
         if (space < 0)
index b1f518d..934a9b4 100644 (file)
@@ -159,7 +159,7 @@ void H5Dataset::getAccessibleAttribute(const std::string & _name, const int pos,
             obj.createOnScilabStack(pos, pvApiCtx);
             return;
         }
-        catch (const H5Exception & e) { }
+        catch (const H5Exception & /*e*/) { }
     }
 
     H5Object::getAccessibleAttribute(_name, pos, pvApiCtx);
@@ -218,7 +218,7 @@ std::string H5Dataset::dump(std::map<haddr_t, std::string> & alreadyVisited, con
     {
         data = &const_cast<H5Dataset *>(this)->getData();
     }
-    catch (const H5Exception & e)
+    catch (const H5Exception & /*e*/)
     {
 
     }
@@ -388,7 +388,7 @@ hid_t H5Dataset::create(H5Object & loc, const std::string & name, const hid_t ty
                 }
                 else
                 {
-                    for (unsigned int i = 0; i < ndims; i++)
+                    for (int i = 0; i < ndims; i++)
                     {
                         if (maxdims[i] != dmaxdims[i])
                         {
@@ -412,7 +412,7 @@ hid_t H5Dataset::create(H5Object & loc, const std::string & name, const hid_t ty
                 delete[] dmaxdims;
 
             }
-            catch (const H5Exception & e)
+            catch (const H5Exception & /*e*/)
             {
                 delete[] dims;
                 delete[] ddims;
index 7d45c3e..2b04274 100644 (file)
@@ -107,7 +107,7 @@ void H5Dataspace::getAccessibleAttribute(const std::string & _name, const int po
     if (lower == "dims" || lower == "dimensions")
     {
         std::vector<unsigned int> dims = getDims(true);
-        err = createMatrixOfUnsignedInteger32(pvApiCtx, pos, 1, dims.size(), &(dims[0]));
+        err = createMatrixOfUnsignedInteger32(pvApiCtx, pos, 1, (int)dims.size(), &(dims[0]));
         if (err.iErr)
         {
             throw H5Exception(__LINE__, __FILE__, _("Cannot create an array of integer on the stack."));
@@ -118,7 +118,7 @@ void H5Dataspace::getAccessibleAttribute(const std::string & _name, const int po
     else if (lower == "extents")
     {
         std::vector<unsigned int> dims = getDims(false);
-        err = createMatrixOfUnsignedInteger32(pvApiCtx, pos, 1, dims.size(), &(dims[0]));
+        err = createMatrixOfUnsignedInteger32(pvApiCtx, pos, 1, (int)dims.size(), &(dims[0]));
         if (err.iErr)
         {
             throw H5Exception(__LINE__, __FILE__, _("Cannot create an array of integer on the stack."));
index 36061fe..7be6889 100644 (file)
@@ -23,7 +23,6 @@ std::vector<std::string *> H5ExternalLink::getLinkTargets() const
     std::vector<std::string *> ret;
     const char * filename = 0;
     const char * obj_path = 0;
-    unsigned int flags;
 
     err = H5Lget_info(getParent().getH5Id(), getName().c_str(), &info, H5P_DEFAULT);
     if (err < 0)
index 62ba85e..ba47e6d 100644 (file)
@@ -135,7 +135,7 @@ H5File::H5File(const std::string & _filename, const std::string & _path, const s
         init(fapl);
         H5Pclose(fapl);
     }
-    catch (const H5Exception & e)
+    catch (const H5Exception & /*e*/)
     {
         H5Pclose(fapl);
         throw;
@@ -161,7 +161,7 @@ H5File::H5File(const std::string & _filename, const std::string & _path, const s
         init(fapl);
         H5Pclose(fapl);
     }
-    catch (const H5Exception & e)
+    catch (const H5Exception & /*e*/)
     {
         H5Pclose(fapl);
         throw;
@@ -186,7 +186,7 @@ H5File::H5File(const std::string & _filename, const std::string & _path, const s
         init(fapl);
         H5Pclose(fapl);
     }
-    catch (const H5Exception & e)
+    catch (const H5Exception & /*e*/)
     {
         H5Pclose(fapl);
         throw;
@@ -222,7 +222,7 @@ H5File::H5File(const std::string & _filename, const std::string & _path, const s
         init(fapl);
         H5Pclose(fapl);
     }
-    catch (const H5Exception & e)
+    catch (const H5Exception & /*e*/)
     {
         H5Pclose(fapl);
         throw;
@@ -274,7 +274,7 @@ H5Object & H5File::getRoot()
     {
         return H5Object::getObject(*this, obj);
     }
-    catch (const H5Exception & e)
+    catch (const H5Exception & /*e*/)
     {
         H5Oclose(obj);
         throw;
@@ -340,7 +340,7 @@ void H5File::getAccessibleAttribute(const std::string & _name, const int pos, vo
             obj->createOnScilabStack(pos, pvApiCtx);
             return;
         }
-        catch (const H5Exception & e)
+        catch (const H5Exception & /*e*/)
         {
             if (obj)
             {
index 66d8cba..158a3f4 100644 (file)
@@ -223,7 +223,7 @@ void H5Group::getAccessibleAttribute(const std::string & _name, const int pos, v
             obj.createOnScilabStack(pos, pvApiCtx);
             return;
         }
-        catch (const H5Exception & e) { }
+        catch (const H5Exception & /*e*/) { }
     }
 
     H5Object::getAccessibleAttribute(_name, pos, pvApiCtx);
index 553b59e..0e2e412 100644 (file)
@@ -38,7 +38,7 @@ H5Object & H5HardLink::getLinkedObject() const
     {
         return H5Object::getObject(*const_cast<H5HardLink *>(this), obj);
     }
-    catch (const H5Exception & e)
+    catch (const H5Exception & /*e*/)
     {
         H5Oclose(obj);
         throw;
index a3d9bf2..9bdcccd 100644 (file)
@@ -252,7 +252,7 @@ private:
 
         if (H5ListObject<T>::indexList)
         {
-            if (pos >= 0 && pos < H5ListObject<T>::indexSize)
+            if (pos >= 0 && pos < (int)H5ListObject<T>::indexSize)
             {
                 _pos = H5ListObject<T>::indexList[pos];
             }
index 25284f9..37cd66b 100644 (file)
@@ -69,7 +69,7 @@ public:
                 alloc(pvApiCtx, lhsPosition, 1, (int)(totalSize * dataSize), list, 3, &newData);
                 H5DataConverter::C2FHypermatrix((int)ndims + 1, _dims, (int)(totalSize * dataSize), static_cast<unsigned char *>(getData()), newData);
             }
-            catch (const H5Exception & e)
+            catch (const H5Exception & /*e*/)
             {
                 delete[] _dims;
                 throw;
index bf45b2c..bb62d88 100644 (file)
@@ -235,7 +235,7 @@ void H5ReferenceData::printData(std::ostream & os, const unsigned int pos, const
                 const hsize_t N = ndims * npoints;
                 hsize_t * buf = new hsize_t[N];
                 herr_t err =  H5Sget_select_elem_pointlist(space, 0, npoints, buf);
-                for (hssize_t i = 0; i < N; i += ndims)
+                for (hssize_t i = 0; i < (hssize_t)N; i += ndims)
                 {
                     os << "(";
                     for (unsigned int j = 0; j < ndims - 1; j++)
@@ -263,7 +263,7 @@ void H5ReferenceData::printData(std::ostream & os, const unsigned int pos, const
                     const hsize_t N = 2 * ndims * nblocks;
                     hsize_t * buf = new hsize_t[N];
                     herr_t err = H5Sget_select_hyper_blocklist(space, 0, nblocks, buf);
-                    for (hssize_t i = 0; i < N; i += 2 * ndims)
+                    for (hssize_t i = 0; i < (hssize_t)N; i += 2 * ndims)
                     {
                         os << "(";
                         for (unsigned int j = 0; j < ndims - 1; j++)
index 5c02b41..3b62cdf 100644 (file)
@@ -53,13 +53,19 @@ H5StringData::~H5StringData()
     else
     {
         char ** _data = reinterpret_cast<char **>(getData());
-        for (hsize_t i = 0; i < totalSize; i++)
+        hid_t space = H5Screate_simple(1, &totalSize, 0);
+        hid_t type = H5Tcopy(H5T_C_S1);
+        H5Tset_size(type, H5T_VARIABLE);
+        H5Tset_strpad(type, H5T_STR_NULLTERM);
+
+        herr_t err = H5Dvlen_reclaim(type, space, H5P_DEFAULT, _data);
+        if (err < 0)
         {
-            if (_data[i])
-            {
-                free(_data[i]);
-            }
+            throw H5Exception(__LINE__, __FILE__, _("Cannot free the memory associated with String data"));
         }
+
+        H5Tclose(type);
+        H5Sclose(space);
     }
 }
 
index 788c65b..b788d47 100644 (file)
@@ -46,7 +46,7 @@ H5Object & H5VlenData::getData(const unsigned int size, const unsigned int * ind
 
     for (unsigned int i = 0; i < size; i++)
     {
-        pos += cumprod[i] * index[i];
+        pos += (int)cumprod[i] * index[i];
     }
 
     if (pos >= totalSize)
index 7e61899..a9d35d8 100644 (file)
@@ -304,8 +304,8 @@ public:
         unsigned int rank;
         hsize_t * dims = 0;
         void * data = 0;
-        bool mustDelete;
-        bool mustDeleteContent;
+        bool mustDelete = false;
+        bool mustDeleteContent = false;
         H5Object * hobj = 0;
         T * newobj = 0;
         bool isReference = false;