aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortradke <tradke@0888f3d4-9f52-45d2-93bc-d00801ff5e46>2000-11-23 23:10:04 +0000
committertradke <tradke@0888f3d4-9f52-45d2-93bc-d00801ff5e46>2000-11-23 23:10:04 +0000
commitd0f4b9d5b116f7a960a1a317a20fd370485ee937 (patch)
tree85384c94af4a9913d54ea924a3450fc6f7da7610 /src
parentf11299667fb86982998d1985ec4860eb4cfaaf3c (diff)
Renamed variables 'index' into 'vindex' to suppress gcc warnings on
hiding a global routine index(3). git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IOStreamedHDF5/trunk@55 0888f3d4-9f52-45d2-93bc-d00801ff5e46
Diffstat (limited to 'src')
-rw-r--r--src/DumpGH.c8
-rw-r--r--src/Output.c38
-rw-r--r--src/RecoverGH.c6
-rw-r--r--src/Startup.c8
-rw-r--r--src/Write.c17
-rw-r--r--src/ioStreamedHDF5GH.h2
6 files changed, 49 insertions, 30 deletions
diff --git a/src/DumpGH.c b/src/DumpGH.c
index c31c1e1..6b6c8c5 100644
--- a/src/DumpGH.c
+++ b/src/DumpGH.c
@@ -35,7 +35,10 @@ static char *rcsid = "$Id$";
CCTK_FILEVERSION(BetaThorns_IOStreamedHDF5_DumpGH_c)
-/* local function prototypes */
+/* prototypes of routines defined in this source file */
+void IOStreamedHDF5_InitialDataCheckpoint (cGH *GH);
+void IOStreamedHDF5_EvolutionCheckpoint (cGH *GH);
+void IOStreamedHDF5_TerminationCheckpoint (cGH *GH);
static int IOStreamedHDF5_Checkpoint (cGH *GH, int called_from);
@@ -187,6 +190,9 @@ static int IOStreamedHDF5_Checkpoint (cGH *GH, int called_from)
CCTK_INT4 retval;
+ /* suppress compiler warning about unused variables */
+ called_from = called_from;
+
retval = 0;
file = -1;
diff --git a/src/Output.c b/src/Output.c
index 0539fdf..7f1bbd5 100644
--- a/src/Output.c
+++ b/src/Output.c
@@ -45,7 +45,7 @@ static void CheckSteerableParameters (ioStreamedHDF5GH *myGH);
int IOStreamedHDF5_OutputGH (cGH *GH)
{
DECLARE_CCTK_PARAMETERS
- int index;
+ int vindex;
ioStreamedHDF5GH *myGH;
const char *name;
char *fullname;
@@ -62,14 +62,14 @@ int IOStreamedHDF5_OutputGH (cGH *GH)
}
/* Loop over all variables */
- for (index = 0; index < CCTK_NumVars (); index++)
+ for (vindex = 0; vindex < CCTK_NumVars (); vindex++)
{
- if (IOStreamedHDF5_TimeFor (GH, index))
+ if (IOStreamedHDF5_TimeFor (GH, vindex))
{
- name = CCTK_VarName (index);
- fullname = CCTK_FullName (index);
+ name = CCTK_VarName (vindex);
+ fullname = CCTK_FullName (vindex);
if (verbose)
{
@@ -83,7 +83,7 @@ int IOStreamedHDF5_OutputGH (cGH *GH)
free (fullname);
/* Register variable as having output this iteration */
- myGH->out_last[index] = GH->cctk_iteration;
+ myGH->out_last[vindex] = GH->cctk_iteration;
}
}
@@ -124,10 +124,10 @@ int IOStreamedHDF5_OutputVarAs (cGH *GH,
const char *alias)
{
DECLARE_CCTK_PARAMETERS
- int index;
+ int vindex;
- index = CCTK_VarIndex (fullname);
+ vindex = CCTK_VarIndex (fullname);
if (verbose)
{
@@ -137,7 +137,7 @@ int IOStreamedHDF5_OutputVarAs (cGH *GH,
}
/* Do the output */
- IOStreamedHDF5_Write (GH, index, alias);
+ IOStreamedHDF5_Write (GH, vindex, alias);
return (0);
}
@@ -159,7 +159,7 @@ int IOStreamedHDF5_OutputVarAs (cGH *GH,
@vtype cGH *
@vio in
@endvar
- @var index
+ @var vindex
@vdesc index of variable
@vtype int
@vio in
@@ -172,7 +172,7 @@ int IOStreamedHDF5_OutputVarAs (cGH *GH,
@endreturndesc
@@*/
int IOStreamedHDF5_TimeFor (cGH *GH,
- int index)
+ int vindex)
{
ioStreamedHDF5GH *myGH;
@@ -189,13 +189,13 @@ int IOStreamedHDF5_TimeFor (cGH *GH,
}
/* Check this variable should be output */
- if (! (myGH->do_output[index] && GH->cctk_iteration % myGH->out_every == 0))
+ if (! (myGH->do_output[vindex] && GH->cctk_iteration % myGH->out_every == 0))
{
return (0);
}
/* Check variable not already output this iteration */
- if (myGH->out_last[index] == GH->cctk_iteration)
+ if (myGH->out_last[vindex] == GH->cctk_iteration)
{
CCTK_WARN (2, "Already done output in IOStreamedHDF5");
return (0);
@@ -221,14 +221,14 @@ int IOStreamedHDF5_TimeFor (cGH *GH,
@vtype cGH *
@vio in
@endvar
- @var index
+ @var vindex
@vdesc index of variable
@vtype int
@vio in
@endvar
@@*/
int IOStreamedHDF5_TriggerOutput (cGH *GH,
- int index)
+ int vindex)
{
DECLARE_CCTK_PARAMETERS
ioStreamedHDF5GH *myGH;
@@ -236,13 +236,13 @@ int IOStreamedHDF5_TriggerOutput (cGH *GH,
const char *varname;
- varname = CCTK_VarName (index);
+ varname = CCTK_VarName (vindex);
myGH = (ioStreamedHDF5GH *) CCTK_GHExtension (GH, "IOStreamedHDF5");
if (verbose)
{
- fullname = CCTK_FullName (index);
+ fullname = CCTK_FullName (vindex);
CCTK_VInfo (CCTK_THORNSTRING, "IOStreamedHDF5_TriggerOutput: "
"output of (varname, fullname) "
"= ('%s', '%s')", varname, fullname);
@@ -250,10 +250,10 @@ int IOStreamedHDF5_TriggerOutput (cGH *GH,
}
/* Do the output */
- IOStreamedHDF5_Write (GH, index, varname);
+ IOStreamedHDF5_Write (GH, vindex, varname);
/* Register variable as having output this iteration */
- myGH->out_last[index] = GH->cctk_iteration;
+ myGH->out_last[vindex] = GH->cctk_iteration;
return (0);
}
diff --git a/src/RecoverGH.c b/src/RecoverGH.c
index 9bdcf18..bcc074d 100644
--- a/src/RecoverGH.c
+++ b/src/RecoverGH.c
@@ -29,7 +29,8 @@ static char *rcsid = "$Id$";
CCTK_FILEVERSION(BetaThorns_IOStreamedHDF5_RecoverGH_c)
-/* local function prototypes */
+/* prototypes of routines defined in this source file */
+int IOStreamedHDF5_RecoverParameters (void);
static int IOStreamedHDF5_OpenFile (cGH *GH,
const char *basename,
int called_from,
@@ -292,6 +293,9 @@ static int IOStreamedHDF5_OpenFile (cGH *GH,
#endif
+ /* suppress compiler warnings about unused variables */
+ called_from = called_from;
+
#ifdef CCTK_MPI
/* Get the communicator for broadcasting the info structure */
/* NOTE: When recovering parameters thorn PUGH is not yet initialized
diff --git a/src/Startup.c b/src/Startup.c
index 4469e6c..b8b448c 100644
--- a/src/Startup.c
+++ b/src/Startup.c
@@ -26,7 +26,9 @@ static char *rcsid = "$Id$";
CCTK_FILEVERSION(BetaThorns_IOStreamedHDF5_Startup_c)
-/* local function prototypes */
+/* prototypes of routines defined in this source file */
+void IOStreamedHDF5_Startup (void);
+void IOStreamedHDF5_Terminate (cGH *GH);
static void *IOStreamedHDF5_SetupGH (tFleshConfig *config,
int convergence_level,
cGH *GH);
@@ -168,6 +170,10 @@ static void *IOStreamedHDF5_SetupGH (tFleshConfig *config,
ioStreamedHDF5GH *myGH;
+ /* suppress compiler warnings about unused variables */
+ config = config;
+ convergence_level = convergence_level;
+
myproc = CCTK_MyProc (GH);
/* Register IOStreamedHDF5 routines as output methods */
diff --git a/src/Write.c b/src/Write.c
index 0ce149a..a75b5e0 100644
--- a/src/Write.c
+++ b/src/Write.c
@@ -39,7 +39,7 @@ CCTK_FILEVERSION(BetaThorns_IOStreamedHDF5_Write_c)
@vtype cGH *
@vio in
@endvar
- @var index
+ @var vindex
@vdesc index of variable
@vtype int
@vio in
@@ -47,11 +47,11 @@ CCTK_FILEVERSION(BetaThorns_IOStreamedHDF5_Write_c)
@var alias
@vdesc alias name of variable to output
@vtype const char *
- @vio in
+ @vio unused
@endvar
@@*/
void IOStreamedHDF5_Write (cGH *GH,
- int index,
+ int vindex,
const char *alias)
{
DECLARE_CCTK_PARAMETERS
@@ -66,10 +66,13 @@ void IOStreamedHDF5_Write (cGH *GH,
H5FD_stream_fapl_t fapl;
+ /* suppress compiler warnings about unused variables */
+ alias = alias;
+
/* first, check if variable has storage assigned */
- if (! CCTK_QueryGroupStorageI (GH, CCTK_GroupIndexFromVarI (index)))
+ if (! CCTK_QueryGroupStorageI (GH, CCTK_GroupIndexFromVarI (vindex)))
{
- fullname = CCTK_FullName (index);
+ fullname = CCTK_FullName (vindex);
CCTK_VWarn (2, __LINE__, __FILE__, CCTK_THORNSTRING,
"No IOStreamedHDF5 output for '%s' (no storage)", fullname);
free (fullname);
@@ -122,14 +125,14 @@ void IOStreamedHDF5_Write (cGH *GH,
}
/* get the current timelevel */
- timelevel = CCTK_NumTimeLevelsFromVarI (index) - 1;
+ timelevel = CCTK_NumTimeLevelsFromVarI (vindex) - 1;
if (timelevel > 0)
{
timelevel--;
}
/* output the data */
- IOHDF5Util_DumpVar (GH, index, timelevel, &myGH->geo_output[index], file, 0);
+ IOHDF5Util_DumpVar (GH, vindex, timelevel, &myGH->geo_output[vindex], file, 0);
/* close the file */
if (file >= 0)
diff --git a/src/ioStreamedHDF5GH.h b/src/ioStreamedHDF5GH.h
index 6994ec2..852b847 100644
--- a/src/ioStreamedHDF5GH.h
+++ b/src/ioStreamedHDF5GH.h
@@ -53,7 +53,7 @@ int IOStreamedHDF5_OutputVarAs (cGH *GH, const char *var, const char *alias);
int IOStreamedHDF5_Recover (cGH *GH, const char *basename, int called_from);
/* other function prototypes */
-void IOStreamedHDF5_Write (cGH *GH, int index, const char *alias);
+void IOStreamedHDF5_Write (cGH *GH, int vindex, const char *alias);
#ifdef __cplusplus
} // extern "C"