diff options
author | tradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2001-10-30 15:29:51 +0000 |
---|---|---|
committer | tradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2001-10-30 15:29:51 +0000 |
commit | c9080e678b4854181e65d681d3459310d543f0d3 (patch) | |
tree | 41b2c70336d28e89079d1d1241d4a201e09a8cb3 /src/main/WarnLevel.c | |
parent | b61592d8657d5cd0009b1226494cafa2ce4c750e (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.c | 24 |
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", - ¶m_type); + cctk_full_warnings = (const CCTK_INT *) + CCTK_ParameterGet ("cctk_full_warnings", "Cactus", + ¶m_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", ¶m_type)); + "Cactus", ¶m_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", ¶m_type)); - if (cctk_strong_param_check) + "Cactus", ¶m_type); + if (*cctk_strong_param_check) { fprintf (stderr, "\nFailed parameter check (%d errors)\n\n", param_errors); fflush (stderr); |