aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortradke <tradke@7842ec3a-9562-4be5-9c5b-06ba18f2b668>2001-04-19 21:10:39 +0000
committertradke <tradke@7842ec3a-9562-4be5-9c5b-06ba18f2b668>2001-04-19 21:10:39 +0000
commitd18b858c0be9b0ff2a68db8271a2f04be9d3a46e (patch)
tree2c3f49acffaca6158781e954e2009aa931061800 /src
parentfb4dafb0cd8c3d6e2db422ccdc46679bbf2c26f8 (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')
-rw-r--r--src/ParseVars.c2
-rw-r--r--src/ioHDF5UtilGH.h15
2 files changed, 14 insertions, 3 deletions
diff --git a/src/ParseVars.c b/src/ParseVars.c
index 202b09d..89d74e0 100644
--- a/src/ParseVars.c
+++ b/src/ParseVars.c
@@ -346,7 +346,9 @@ static ioHDF5Geo_t *IOHDF5Util_DefaultIORequest (int vindex)
DECLARE_CCTK_PARAMETERS
int i;
ioHDF5Geo_t *request;
+#if 0
const char *argument, *token;
+#endif
/* allocate a new IO request structure */
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;