From 04b7eb447f4cd7d24f67bc853771f11f473cfee7 Mon Sep 17 00:00:00 2001 From: goodale Date: Sat, 16 Dec 2000 01:35:45 +0000 Subject: Various things to reduce the number of compile time warnings. Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@1956 17b73243-c579-4c4c-a9d2-2d5706c11dac --- src/main/CommandLine.c | 48 +++++++++++++++++++++---------------------- src/main/ProcessCommandLine.c | 2 ++ src/main/ScheduleInterface.c | 10 ++++----- src/main/SetParams.c | 2 ++ src/main/Stagger.c | 1 + 5 files changed, 34 insertions(+), 29 deletions(-) (limited to 'src/main') diff --git a/src/main/CommandLine.c b/src/main/CommandLine.c index 7a12b0b5..16b1a125 100644 --- a/src/main/CommandLine.c +++ b/src/main/CommandLine.c @@ -83,7 +83,7 @@ int cctki_paramcheck_nprocs; @history @endhistory - @var optarg + @var argument @vdesc option argument @vtype const char * @vio in @@ -93,22 +93,22 @@ int cctki_paramcheck_nprocs; @@*/ -void CCTKi_CommandLineTestThornCompiled(const char *optarg) +void CCTKi_CommandLineTestThornCompiled(const char *argument) { int retval; - if((retval = CCTK_IsThornCompiled(optarg))) + if((retval = CCTK_IsThornCompiled(argument))) { if (CCTK_MyProc(NULL) == 0) { - printf("Thorn '%s' available.\n", optarg); + printf("Thorn '%s' available.\n", argument); } } else { if (CCTK_MyProc(NULL) == 0) { - printf("Thorn '%s' unavailable.\n", optarg); + printf("Thorn '%s' unavailable.\n", argument); } } @@ -128,7 +128,7 @@ void CCTKi_CommandLineTestThornCompiled(const char *optarg) @history @endhistory - @var optarg + @var argument @vdesc option argument @vtype const char * @vio in @@ -137,7 +137,7 @@ void CCTKi_CommandLineTestThornCompiled(const char *optarg) @endvar @@*/ -void CCTKi_CommandLineDescribeAllParameters(const char *optarg) +void CCTKi_CommandLineDescribeAllParameters(const char *argument) { int first; int n_thorns; @@ -159,15 +159,15 @@ void CCTKi_CommandLineDescribeAllParameters(const char *optarg) first = 1; while (CCTK_ParameterWalk (first, thornname, ¶m, &properties) == 0) { - if(optarg) + if(argument) { - switch(*optarg) + switch(*argument) { case 'v': CommandLinePrintParameter(properties); break; default : - fprintf(stderr, "Unknown verbosity option %s\n", optarg); + fprintf(stderr, "Unknown verbosity option %s\n", argument); CCTK_Exit(NULL,2); } } @@ -197,7 +197,7 @@ void CCTKi_CommandLineDescribeAllParameters(const char *optarg) @history @endhistory - @var optarg + @var argument @vdesc option argument @vtype const char * @vio in @@ -206,7 +206,7 @@ void CCTKi_CommandLineDescribeAllParameters(const char *optarg) @endvar @@*/ -void CCTKi_CommandLineDescribeParameter(const char *optarg) +void CCTKi_CommandLineDescribeParameter(const char *argument) { char *thorn; char *param; @@ -215,11 +215,11 @@ void CCTKi_CommandLineDescribeParameter(const char *optarg) if (CCTK_MyProc(NULL) == 0) { - Util_SplitString(þ, ¶m, optarg, "::"); + Util_SplitString(þ, ¶m, argument, "::"); if(!param) { - properties = CCTK_ParameterData(optarg, NULL); + properties = CCTK_ParameterData(argument, NULL); } else { @@ -253,7 +253,7 @@ void CCTKi_CommandLineDescribeParameter(const char *optarg) @history @endhistory - @var optarg + @var argument @vdesc option argument @vtype const char * @vio in @@ -262,17 +262,17 @@ void CCTKi_CommandLineDescribeParameter(const char *optarg) @endvar @@*/ -void CCTKi_CommandLineTestParameters(const char *optarg) +void CCTKi_CommandLineTestParameters(const char *argument) { int nprocs; - if(optarg == NULL) + if(argument == NULL) { nprocs = 1; } else { - nprocs = atoi(optarg); + nprocs = atoi(argument); } paramchecking = 1; @@ -293,7 +293,7 @@ void CCTKi_CommandLineTestParameters(const char *optarg) @history @endhistory - @var optarg + @var argument @vdesc option argument @vtype const char * @vio in @@ -303,11 +303,11 @@ void CCTKi_CommandLineTestParameters(const char *optarg) @@*/ -void CCTKi_CommandLineWarningLevel(const char *optarg) +void CCTKi_CommandLineWarningLevel(const char *argument) { int warninglevel; - warninglevel = atoi(optarg); + warninglevel = atoi(argument); CCTKi_SetWarnLevel(warninglevel); @@ -325,7 +325,7 @@ void CCTKi_CommandLineWarningLevel(const char *optarg) @history @endhistory - @var optarg + @var argument @vdesc option argument @vtype const char * @vio in @@ -334,11 +334,11 @@ void CCTKi_CommandLineWarningLevel(const char *optarg) @endvar @@*/ -void CCTKi_CommandLineErrorLevel(const char *optarg) +void CCTKi_CommandLineErrorLevel(const char *argument) { int errorlevel; - errorlevel = atoi(optarg); + errorlevel = atoi(argument); CCTKi_SetErrorLevel(errorlevel); diff --git a/src/main/ProcessCommandLine.c b/src/main/ProcessCommandLine.c index 61e22863..a4fa9929 100644 --- a/src/main/ProcessCommandLine.c +++ b/src/main/ProcessCommandLine.c @@ -9,9 +9,11 @@ @@*/ #include #include +#include #include "cctk_Flesh.h" #include "cctk_GNU.h" +#include "cctk_Misc.h" #include "CommandLine.h" diff --git a/src/main/ScheduleInterface.c b/src/main/ScheduleInterface.c index bac860e5..1126ac6d 100644 --- a/src/main/ScheduleInterface.c +++ b/src/main/ScheduleInterface.c @@ -2102,7 +2102,7 @@ static int CCTKi_ScheduleCallEntry(t_attribute *attribute, t_sched_data *data) { int i; - int index; + int indx; int last; int go; @@ -2115,11 +2115,11 @@ static int CCTKi_ScheduleCallEntry(t_attribute *attribute, /* In analysis, so check triggers */ for (i = 0; i < attribute->n_trigger_groups ; i++) { - index = CCTK_FirstVarIndexI(attribute->trigger_groups[i]); - last = index + CCTK_NumVarsInGroupI(attribute->trigger_groups[i]) -1; - for(; index <= last ; index++) + indx = CCTK_FirstVarIndexI(attribute->trigger_groups[i]); + last = indx + CCTK_NumVarsInGroupI(attribute->trigger_groups[i]) -1; + for(; indx <= last ; indx++) { - go = go || CCTKi_TriggerSaysGo(data->GH, index); + go = go || CCTKi_TriggerSaysGo(data->GH, indx); } } } diff --git a/src/main/SetParams.c b/src/main/SetParams.c index 03fc7e9d..461f6471 100644 --- a/src/main/SetParams.c +++ b/src/main/SetParams.c @@ -22,6 +22,8 @@ #include "cctk_Flesh.h" #include "cctk_Parameter.h" +#include "cctki_Parameter.h" + #include "ParameterBindings.h" static char *rcsid = "$Header$"; diff --git a/src/main/Stagger.c b/src/main/Stagger.c index b6f1b0df..ae930675 100644 --- a/src/main/Stagger.c +++ b/src/main/Stagger.c @@ -19,6 +19,7 @@ #include "cctk_Types.h" #include "cctk_WarnLevel.h" +#include "cctk_Stagger.h" #include "cctki_Stagger.h" static char *rcsid = "$Header$"; -- cgit v1.2.3