summaryrefslogtreecommitdiff
path: root/src/main/WarnLevel.c
diff options
context:
space:
mode:
authortradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac>2001-10-30 15:29:51 +0000
committertradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac>2001-10-30 15:29:51 +0000
commitc9080e678b4854181e65d681d3459310d543f0d3 (patch)
tree41b2c70336d28e89079d1d1241d4a201e09a8cb3 /src/main/WarnLevel.c
parentb61592d8657d5cd0009b1226494cafa2ce4c750e (diff)
Added missing includes and fixed a couple of 'cast from const pointer' warnings.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2442 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src/main/WarnLevel.c')
-rw-r--r--src/main/WarnLevel.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/main/WarnLevel.c b/src/main/WarnLevel.c
index bcbbddc9..94c4d9e9 100644
--- a/src/main/WarnLevel.c
+++ b/src/main/WarnLevel.c
@@ -288,7 +288,7 @@ int CCTK_VWarn (int level,
const char *format,
...)
{
- CCTK_INT *cctk_full_warnings;
+ const CCTK_INT *cctk_full_warnings;
int param_type;
int myproc;
va_list ap;
@@ -297,9 +297,9 @@ int CCTK_VWarn (int level,
{
myproc = CCTK_MyProc(NULL);
- cctk_full_warnings = (CCTK_INT *) CCTK_ParameterGet ("cctk_full_warnings",
- "Cactus",
- &param_type);
+ cctk_full_warnings = (const CCTK_INT *)
+ CCTK_ParameterGet ("cctk_full_warnings", "Cactus",
+ &param_type);
if ((level <= error_level) || (*cctk_full_warnings && cctk_full_warnings))
{
fprintf (stderr, "WARNING level %d in thorn %s processor %d\n"
@@ -391,15 +391,15 @@ int CCTK_ParameterLevel (void)
@@*/
int CCTK_ParamWarn (const char *thorn, const char *message)
{
- int cctk_strong_param_check;
+ const CCTK_INT *cctk_strong_param_check;
int param_type;
- cctk_strong_param_check = *((CCTK_INT *)
+ cctk_strong_param_check = (const CCTK_INT *)
CCTK_ParameterGet ("cctk_strong_param_check",
- "Cactus", &param_type));
+ "Cactus", &param_type);
fprintf (stderr, "PARAM %s (%s): %s\n",
- cctk_strong_param_check ? "ERROR" : "WARNING", thorn, message);
+ *cctk_strong_param_check ? "ERROR" : "WARNING", thorn, message);
fflush (stderr);
param_errors++;
@@ -765,15 +765,15 @@ void CCTK_FCALL CCTK_FNAME (CCTKi_ExpectOK)
void CCTKi_FinaliseParamWarn (void)
{
int param_type;
- int cctk_strong_param_check;
+ const CCTK_INT *cctk_strong_param_check;
if (param_errors)
{
- cctk_strong_param_check = *((CCTK_INT *)
+ cctk_strong_param_check = (const CCTK_INT *)
CCTK_ParameterGet ("cctk_strong_param_check",
- "Cactus", &param_type));
- if (cctk_strong_param_check)
+ "Cactus", &param_type);
+ if (*cctk_strong_param_check)
{
fprintf (stderr, "\nFailed parameter check (%d errors)\n\n", param_errors);
fflush (stderr);