diff options
author | tradke <tradke@7842ec3a-9562-4be5-9c5b-06ba18f2b668> | 2001-04-19 21:10:39 +0000 |
---|---|---|
committer | tradke <tradke@7842ec3a-9562-4be5-9c5b-06ba18f2b668> | 2001-04-19 21:10:39 +0000 |
commit | d18b858c0be9b0ff2a68db8271a2f04be9d3a46e (patch) | |
tree | 2c3f49acffaca6158781e954e2009aa931061800 /src/ioHDF5UtilGH.h | |
parent | fb4dafb0cd8c3d6e2db422ccdc46679bbf2c26f8 (diff) |
Fixed minor gcc compiler warnings.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IOHDF5Util/trunk@25 7842ec3a-9562-4be5-9c5b-06ba18f2b668
Diffstat (limited to 'src/ioHDF5UtilGH.h')
-rw-r--r-- | src/ioHDF5UtilGH.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/ioHDF5UtilGH.h b/src/ioHDF5UtilGH.h index 073e400..a5d1a16 100644 --- a/src/ioHDF5UtilGH.h +++ b/src/ioHDF5UtilGH.h @@ -38,13 +38,19 @@ { \ int len; \ hid_t attr; \ - void *val = value; \ + /* this union is only there to fix a bug in the HDF5 API */ \ + union \ + { \ + const void *const_val; \ + void *non_const_val; \ + } v; \ hsize_t arrayDim = dim; \ \ \ + v.const_val = value; \ if (H5Tget_class (datatype) == H5T_STRING) \ { \ - len = strlen ((char *) val); \ + len = strlen ((const char *) v.const_val); \ if (len == 0) /* HDF5 doesn't like zero-len strings */ \ { \ len++; \ @@ -58,7 +64,7 @@ } \ IOHDF5_ERROR (attr = H5Acreate (dataset, name, datatype, \ dataspace, H5P_DEFAULT)); \ - IOHDF5_ERROR (H5Awrite (attr, datatype, val)); \ + IOHDF5_ERROR (H5Awrite (attr, datatype, v.non_const_val)); \ IOHDF5_ERROR (H5Aclose (attr)); \ } while (0); @@ -154,6 +160,9 @@ typedef struct int ioproc; /* the associated IO processor */ int ioproc_every; /* how many IO processors there are */ int unchunked; /* whether data was written chunked or unchunked */ + int has_version; /* whether file contains a Cactus version ID + (this is used to distinguish checkpoint files + with old/new timelevel naming scheme) */ } fileinfo_t; |