summaryrefslogtreecommitdiff
path: root/src/comm/CactusDefaultComm.c
diff options
context:
space:
mode:
authorgoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>1999-11-03 09:23:10 +0000
committergoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>1999-11-03 09:23:10 +0000
commitf56ab00e21d175ef62608342f185c5e7977be078 (patch)
tree1bfc0473e7f51b54d1b276af0efb3ebe41238377 /src/comm/CactusDefaultComm.c
parent52b81606de9ddb65dd608424354a28a856a5daef (diff)
Changing various things pointed to by compiling with -Wall.
Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@1129 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src/comm/CactusDefaultComm.c')
-rw-r--r--src/comm/CactusDefaultComm.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/comm/CactusDefaultComm.c b/src/comm/CactusDefaultComm.c
index 592c9ad8..f01e4af8 100644
--- a/src/comm/CactusDefaultComm.c
+++ b/src/comm/CactusDefaultComm.c
@@ -76,6 +76,12 @@ cGH *CactusDefaultSetupGH(tFleshConfig *config, int convergence_level)
return retval;
}
+ /* Initialise this since it is used later and in exceptional
+ * circumstances might not be initialsed beforehand.
+ */
+
+ variable = -1;
+
/* Create a new Grid Hierarchy */
thisGH = (cGH *)malloc(sizeof(cGH));
@@ -85,14 +91,14 @@ cGH *CactusDefaultSetupGH(tFleshConfig *config, int convergence_level)
/* Need this to be at least one otherwise the memory allocation will fail. */
if(thisGH->cctk_dim == 0) thisGH->cctk_dim = 1;
- thisGH->cctk_iteration = 0;
- thisGH->cctk_gsh = (int *)malloc(thisGH->cctk_dim*sizeof(int));
- thisGH->cctk_lsh = (int *)malloc(thisGH->cctk_dim*sizeof(int));
- thisGH->cctk_lbnd = (int *)malloc(thisGH->cctk_dim*sizeof(int));
- thisGH->cctk_ubnd = (int *)malloc(thisGH->cctk_dim*sizeof(int));
- thisGH->cctk_to = (int *)malloc(thisGH->cctk_dim*sizeof(int));
- thisGH->cctk_from = (int *)malloc(thisGH->cctk_dim*sizeof(int));
- thisGH->cctk_bbox = (int *)malloc(2*thisGH->cctk_dim*sizeof(int));
+ thisGH->cctk_iteration = 0;
+ thisGH->cctk_gsh = (int *)malloc(thisGH->cctk_dim*sizeof(int));
+ thisGH->cctk_lsh = (int *)malloc(thisGH->cctk_dim*sizeof(int));
+ thisGH->cctk_lbnd = (int *)malloc(thisGH->cctk_dim*sizeof(int));
+ thisGH->cctk_ubnd = (int *)malloc(thisGH->cctk_dim*sizeof(int));
+ thisGH->cctk_to = (int *)malloc(thisGH->cctk_dim*sizeof(int));
+ thisGH->cctk_from = (int *)malloc(thisGH->cctk_dim*sizeof(int));
+ thisGH->cctk_bbox = (int *)malloc(2*thisGH->cctk_dim*sizeof(int));
thisGH->cctk_nghostzones = (int *)malloc(2*thisGH->cctk_dim*sizeof(int));
thisGH->cctk_levfac = (int *)malloc(2*thisGH->cctk_dim*sizeof(int));
thisGH->cctk_delta_space = (CCTK_REAL *)malloc(thisGH->cctk_dim*sizeof(CCTK_REAL));