From 46cab3392cc9d814a75ac62a66e2b50fcaeac489 Mon Sep 17 00:00:00 2001 From: tradke Date: Fri, 16 Feb 2001 18:59:34 +0000 Subject: Fixed gcc warnings. Untabified. Fixed PR 365. git-svn-id: http://svn.cactuscode.org/flesh/trunk@2023 17b73243-c579-4c4c-a9d2-2d5706c11dac --- src/main/Groups.c | 129 +++++++++++++++++++++++++++--------------------------- 1 file changed, 65 insertions(+), 64 deletions(-) (limited to 'src/main/Groups.c') diff --git a/src/main/Groups.c b/src/main/Groups.c index 32b270af..3e6d6169 100644 --- a/src/main/Groups.c +++ b/src/main/Groups.c @@ -156,8 +156,8 @@ int CCTK_GroupIndex(const char *fullgroupname) case 1: CCTK_VWarn(2,__LINE__,__FILE__,"Cactus", - "CCTK_GroupIndex: Group name %s not in format implementation::group", - fullgroupname); + "CCTK_GroupIndex: Group name %s not in format implementation::group", + fullgroupname); retval = -3; break; @@ -185,8 +185,8 @@ int CCTK_GroupIndex(const char *fullgroupname) else { CCTK_VWarn(2,__LINE__,__FILE__,"Cactus", - "CCTK_GroupIndex: No group %s found", - fullgroupname); + "CCTK_GroupIndex: No group %s found", + fullgroupname); retval = -1; } } @@ -201,10 +201,10 @@ int CCTK_GroupIndex(const char *fullgroupname) void CCTK_FCALL CCTK_FNAME(CCTK_GroupIndex) - (int *index,ONE_FORTSTRING_ARG) + (int *vindex,ONE_FORTSTRING_ARG) { ONE_FORTSTRING_CREATE(name) - *index = CCTK_GroupIndex(name); + *vindex = CCTK_GroupIndex(name); free(name); } @@ -251,20 +251,20 @@ void CCTKi_PrintGroupInfo(void) { @@*/ int CCTKi_CreateGroup(const char *gname, - const char *thorn, - const char *imp, - const char *gtype, - const char *vtype, - const char *gscope, - int dimension, - int ntimelevels, - const char *stype, - const char *dtype, - const char *size, - const char *ghostsize, - int n_variables, - ... - ) + const char *thorn, + const char *imp, + const char *gtype, + const char *vtype, + const char *gscope, + int dimension, + int ntimelevels, + const char *stype, + const char *dtype, + const char *size, + const char *ghostsize, + int n_variables, + ... + ) { int retval; int groupscope; @@ -295,7 +295,7 @@ int CCTKi_CreateGroup(const char *gname, else { CCTK_Warn(1,__LINE__,__FILE__,"Cactus", - "CCTKi_CreateGroup: Unrecognised group scope"); + "CCTKi_CreateGroup: Unrecognised group scope"); } /* Allocate storage for the group and setup some stuff. */ @@ -317,7 +317,7 @@ int CCTKi_CreateGroup(const char *gname, variable_name = va_arg(ap, char *); group->variables[variable].name = - (char *)malloc((strlen(variable_name)+1*sizeof(char))); + (char *)malloc((strlen(variable_name)+1*sizeof(char))); if(group->variables[variable].name) { @@ -339,11 +339,11 @@ int CCTKi_CreateGroup(const char *gname, { if (dimension > maxdim) { - maxdim = dimension; + maxdim = dimension; } if (staggercode > 0) { - staggered = 1; + staggered = 1; } group->size = CCTKi_ExtractSize(dimension, thorn, size); group->ghostsize = CCTKi_ExtractSize(dimension, thorn, ghostsize); @@ -390,7 +390,7 @@ static cGroupDefinition *CCTKi_SetupGroup(const char *implementation, char *fullname1; fullname1 = (char *) malloc( (strlen(implementation)+strlen(name)+3) - *sizeof(char)); + *sizeof(char)); sprintf(fullname1,"%s::%s",implementation,name); if((group_num = CCTK_GroupIndex(fullname1)) == -1) @@ -517,16 +517,17 @@ int CCTK_VarIndex(const char *variable_name) impname = realimpname; varname = realvarname; - for (gnum = 0; gnum < n_groups; gnum++) + for (gnum = 0; gnum < n_groups && retval < 0; gnum++) { - - for(variable=0; variable::" */ if (selection == CCTK_GROUP || selection == CCTK_GROUP_OR_VAR) { - index = CCTK_GroupIndex (before); + idx = CCTK_GroupIndex (before); } else { - index = -1; + idx = -1; } - if (index >= 0) + if (idx >= 0) { /* We have a group so now need all the variables in the group */ - first = CCTK_FirstVarIndexI (index); - last = first + CCTK_NumVarsInGroupI (index) - 1; + first = CCTK_FirstVarIndexI (idx); + last = first + CCTK_NumVarsInGroupI (idx) - 1; } else if (CCTK_Equals (before, "all")) /* Look for any special tokens */ { @@ -2051,9 +2052,9 @@ int CCTK_TraverseString (const char *parsestring, } if (first >= 0) { - for (index = first; index <= last; index++) + for (idx = first; idx <= last; idx++) { - (*callback) (index, optstring, callback_arg); + (*callback) (idx, optstring, callback_arg); } retval += last - first + 1; } -- cgit v1.2.3