aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortradke <tradke@d60812e6-3970-4df4-986e-c251b06effeb>2001-02-13 12:09:19 +0000
committertradke <tradke@d60812e6-3970-4df4-986e-c251b06effeb>2001-02-13 12:09:19 +0000
commit5523a6115fb6edb7d37bb6794ad960d06a236ef3 (patch)
tree52fa40f187b41c06f58264176d6025eadc63acd3
parent3444ee7db0e5e200643c58c150bd0c55620f4b0e (diff)
Fixed gcc warnings.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGHReduce/trunk@6 d60812e6-3970-4df4-986e-c251b06effeb
-rw-r--r--src/ReductionMax.c4
-rw-r--r--src/ReductionMin.c4
-rw-r--r--src/ReductionSum.c4
-rw-r--r--src/Startup.c60
4 files changed, 43 insertions, 29 deletions
diff --git a/src/ReductionMax.c b/src/ReductionMax.c
index 7d2c53d..7425c16 100644
--- a/src/ReductionMax.c
+++ b/src/ReductionMax.c
@@ -217,6 +217,10 @@ static int PUGH_ReductionMaxVal (cGH *GH,
#endif
+ /* prevent compiler warnings about the num_points parameter
+ which is unused in this reduction operator */
+ num_points = num_points;
+
/* macros to complete the ITERATE_ARRAY macro */
#define INITIAL_REDUCTION_VALUE(array) ((array)[0])
#define REDUCTION_OPERATION(max, scalar) if (max < scalar) max = scalar
diff --git a/src/ReductionMin.c b/src/ReductionMin.c
index 5e08255..4e32ff8 100644
--- a/src/ReductionMin.c
+++ b/src/ReductionMin.c
@@ -218,6 +218,10 @@ static int PUGH_ReductionMinVal (cGH *GH,
#endif
+ /* prevent compiler warnings about the num_points parameter
+ which is unused in this reduction operator */
+ num_points = num_points;
+
/* macros to complete the ITERATE_ARRAY macro */
#define INITIAL_REDUCTION_VALUE(array) ((array)[0])
#define REDUCTION_OPERATION(min, scalar) if (min > scalar) min = scalar
diff --git a/src/ReductionSum.c b/src/ReductionSum.c
index e4bde2b..5cee7de 100644
--- a/src/ReductionSum.c
+++ b/src/ReductionSum.c
@@ -217,6 +217,10 @@ static int PUGH_ReductionSum (cGH *GH,
#endif
+ /* prevent compiler warnings about the num_points parameter
+ which is unused in this reduction operator */
+ num_points = num_points;
+
/* macros to complete the ITERATE_ARRAY macro */
#define INITIAL_REDUCTION_VALUE(array) 0
#define REDUCTION_OPERATION(sum, scalar) sum += scalar
diff --git a/src/Startup.c b/src/Startup.c
index 56040da..cc872c4 100644
--- a/src/Startup.c
+++ b/src/Startup.c
@@ -2,14 +2,13 @@
@file Startup.c
@date Wed Feb 3 23:10:19 1999
@author Tom Goodale
- @desc
- Startup routines for PUGHReduce.
- @enddesc
+ @desc
+ Startup routines for PUGHReduce.
+ @enddesc
@version $Header$
- @@*/
+@@*/
#include "cctk.h"
-
#include "pugh_reductions.h"
static char *rcsid="$Header$";
@@ -17,35 +16,38 @@ static char *rcsid="$Header$";
CCTK_FILEVERSION(CactusPUGH_PUGHReduce_Startup_c)
+/* prototypes of routines defined in this source file */
+int PUGHReduce_Startup(void);
+
+
/*@@
@routine PUGHReduce_Startup
@date Wed Feb 3 23:14:38 1999
@author Tom Goodale
- @desc
- The startup registration routine for PUGHReduce.
- @enddesc
- @calls
- @calledby
- @history
-
- @endhistory
-
+ @desc
+ The startup registration routine for PUGHReduce.
+ @enddesc
+
+ @calls CCTK_RegisterReductionOperator
+ CCTK_RegisterReductionArrayOperator
+
+ @returntype void
+ @endreturndesc
@@*/
-int PUGHReduce_Startup(void)
+int PUGHReduce_Startup (void)
{
-
/* Register the reduction operators provided by PUGH */
- CCTK_RegisterReductionOperator(PUGH_ReductionMinValGVs, "minimum");
- CCTK_RegisterReductionOperator(PUGH_ReductionMaxValGVs, "maximum");
- CCTK_RegisterReductionOperator(PUGH_ReductionSumGVs, "sum");
- CCTK_RegisterReductionOperator(PUGH_ReductionNorm1GVs, "norm1");
- CCTK_RegisterReductionOperator(PUGH_ReductionNorm2GVs, "norm2");
-
- CCTK_RegisterReductionArrayOperator(PUGH_ReductionMinValArrays, "minimum");
- CCTK_RegisterReductionArrayOperator(PUGH_ReductionMaxValArrays, "maximum");
- CCTK_RegisterReductionArrayOperator(PUGH_ReductionSumArrays, "sum");
- CCTK_RegisterReductionArrayOperator(PUGH_ReductionNorm1Arrays, "norm1");
- CCTK_RegisterReductionArrayOperator(PUGH_ReductionNorm2Arrays, "norm2");
-
- return 0;
+ CCTK_RegisterReductionOperator (PUGH_ReductionMinValGVs, "minimum");
+ CCTK_RegisterReductionOperator (PUGH_ReductionMaxValGVs, "maximum");
+ CCTK_RegisterReductionOperator (PUGH_ReductionSumGVs, "sum");
+ CCTK_RegisterReductionOperator (PUGH_ReductionNorm1GVs, "norm1");
+ CCTK_RegisterReductionOperator (PUGH_ReductionNorm2GVs, "norm2");
+
+ CCTK_RegisterReductionArrayOperator (PUGH_ReductionMinValArrays, "minimum");
+ CCTK_RegisterReductionArrayOperator (PUGH_ReductionMaxValArrays, "maximum");
+ CCTK_RegisterReductionArrayOperator (PUGH_ReductionSumArrays, "sum");
+ CCTK_RegisterReductionArrayOperator (PUGH_ReductionNorm1Arrays, "norm1");
+ CCTK_RegisterReductionArrayOperator (PUGH_ReductionNorm2Arrays, "norm2");
+
+ return (0);
}