[Commits] [svn:einsteintoolkit] EOS_Base/trunk/src/ (Rev. 21)
knarf at cct.lsu.edu
knarf at cct.lsu.edu
Wed Nov 14 22:55:32 CST 2012
User: knarf
Date: 2012/11/14 10:55 PM
Modified:
/trunk/src/
Register.c
Log:
silence compiler warnings about unused variables and missing function declarations
File Changes:
Directory: /trunk/src/
======================
File [modified]: Register.c
Delta lines: +17 -4
===================================================================
--- trunk/src/Register.c 2012-11-05 14:45:23 UTC (rev 20)
+++ trunk/src/Register.c 2012-11-15 04:55:30 UTC (rev 21)
@@ -7,8 +7,6 @@
@enddesc
@@*/
-static const char *rcsid = "$Header$";
-
#include <stdlib.h>
#include "cctk.h"
@@ -79,6 +77,7 @@
return handle;
}
+void CCTK_FCALL CCTK_FNAME(EOS_RegisterMethod)(int *handle, ONE_FORTSTRING_ARG);
void CCTK_FCALL CCTK_FNAME(EOS_RegisterMethod)(int *handle, ONE_FORTSTRING_ARG)
{
ONE_FORTSTRING_CREATE(name)
@@ -113,6 +112,7 @@
return handle;
}
+void CCTK_FCALL CCTK_FNAME(EOS_Handle)(int *handle, ONE_FORTSTRING_ARG);
void CCTK_FCALL CCTK_FNAME(EOS_Handle)(int *handle, ONE_FORTSTRING_ARG)
{
ONE_FORTSTRING_CREATE(name)
@@ -152,8 +152,10 @@
REGISTER_FUNCTION(DPressByDEps)
+#define REGISTER_FORTRAN_FUNCTION_ARGS \
+(int *retval, int *handle, CCTK_REAL (*func)(CCTK_REAL *, CCTK_REAL *))
#define REGISTER_FORTRAN_FUNCTION(x)\
-(int *retval, int *handle, CCTK_REAL (*func)(CCTK_REAL *, CCTK_REAL *)) \
+REGISTER_FORTRAN_FUNCTION_ARGS \
{ \
method_t *method; \
\
@@ -173,10 +175,15 @@
}
/* Functions to register Fortran EOS functions */
+void CCTK_FCALL CCTK_FNAME(EOS_RegisterPressure) REGISTER_FORTRAN_FUNCTION_ARGS;
void CCTK_FCALL CCTK_FNAME(EOS_RegisterPressure) REGISTER_FORTRAN_FUNCTION(Pressure)
+void CCTK_FCALL CCTK_FNAME(EOS_RegisterSpecificIntEnergy) REGISTER_FORTRAN_FUNCTION_ARGS;
void CCTK_FCALL CCTK_FNAME(EOS_RegisterSpecificIntEnergy) REGISTER_FORTRAN_FUNCTION(SpecificIntEnergy)
+void CCTK_FCALL CCTK_FNAME(EOS_RegisterRestMassDens) REGISTER_FORTRAN_FUNCTION_ARGS;
void CCTK_FCALL CCTK_FNAME(EOS_RegisterRestMassDens) REGISTER_FORTRAN_FUNCTION(RestMassDens)
+void CCTK_FCALL CCTK_FNAME(EOS_RegisterDPressByDRho) REGISTER_FORTRAN_FUNCTION_ARGS;
void CCTK_FCALL CCTK_FNAME(EOS_RegisterDPressByDRho) REGISTER_FORTRAN_FUNCTION(DPressByDRho)
+void CCTK_FCALL CCTK_FNAME(EOS_RegisterDPressByDEps) REGISTER_FORTRAN_FUNCTION_ARGS;
void CCTK_FCALL CCTK_FNAME(EOS_RegisterDPressByDEps) REGISTER_FORTRAN_FUNCTION(DPressByDEps)
#define CALL_FUNC(x) \
@@ -212,8 +219,9 @@
CALL_FUNC(DPressByDRho)
CALL_FUNC(DPressByDEps)
+#define CALL_FORTRAN_FUNC_ARGS (int *handle, CCTK_REAL *a, CCTK_REAL *b)
#define CALL_FORTRAN_FUNC(x) \
-(int *handle, CCTK_REAL *a, CCTK_REAL *b) \
+CALL_FORTRAN_FUNC_ARGS \
{ \
CCTK_REAL retval; \
method_t *method; \
@@ -239,9 +247,14 @@
}
/* Functions to call EOS functions from Fortran*/
+CCTK_REAL CCTK_FCALL CCTK_FNAME(EOS_Pressure) CALL_FORTRAN_FUNC_ARGS;
CCTK_REAL CCTK_FCALL CCTK_FNAME(EOS_Pressure) CALL_FORTRAN_FUNC(Pressure)
+CCTK_REAL CCTK_FCALL CCTK_FNAME(EOS_SpecificIntEnergy) CALL_FORTRAN_FUNC_ARGS;
CCTK_REAL CCTK_FCALL CCTK_FNAME(EOS_SpecificIntEnergy) CALL_FORTRAN_FUNC(SpecificIntEnergy)
+CCTK_REAL CCTK_FCALL CCTK_FNAME(EOS_RestMassDens) CALL_FORTRAN_FUNC_ARGS;
CCTK_REAL CCTK_FCALL CCTK_FNAME(EOS_RestMassDens) CALL_FORTRAN_FUNC(RestMassDens)
+CCTK_REAL CCTK_FCALL CCTK_FNAME(EOS_DPressByDRho) CALL_FORTRAN_FUNC_ARGS;
CCTK_REAL CCTK_FCALL CCTK_FNAME(EOS_DPressByDRho) CALL_FORTRAN_FUNC(DPressByDRho)
+CCTK_REAL CCTK_FCALL CCTK_FNAME(EOS_DPressByDEps) CALL_FORTRAN_FUNC_ARGS;
CCTK_REAL CCTK_FCALL CCTK_FNAME(EOS_DPressByDEps) CALL_FORTRAN_FUNC(DPressByDEps)
More information about the Commits
mailing list