summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>1999-10-26 23:50:59 +0000
committergoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>1999-10-26 23:50:59 +0000
commitb738988168f0f33eb3bfabd27b0f854a14043d16 (patch)
tree16c8c52b3258b668287fb0dbc3a780f9ba6db2be
parentc5bca7cdda36fef2ceea06c5f5cb26b403b8fc70 (diff)
Various things pointed out by running Insure on the code.
Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@1109 17b73243-c579-4c4c-a9d2-2d5706c11dac
-rw-r--r--src/main/CactusDefaultEvolve.c1
-rw-r--r--src/main/Coord.c9
-rw-r--r--src/main/DefaultTimers.c3
-rw-r--r--src/main/ScheduleInterface.c1
-rw-r--r--src/schedule/ScheduleSorter.c8
-rw-r--r--src/util/File.c11
6 files changed, 24 insertions, 9 deletions
diff --git a/src/main/CactusDefaultEvolve.c b/src/main/CactusDefaultEvolve.c
index 7ee8d090..03467ced 100644
--- a/src/main/CactusDefaultEvolve.c
+++ b/src/main/CactusDefaultEvolve.c
@@ -69,6 +69,7 @@ static int iteration = 0;
int CCTK_SetMainLoopIndex (int main_loop_index)
{
iteration = main_loop_index;
+ return 0;
}
diff --git a/src/main/Coord.c b/src/main/Coord.c
index 716d30d8..bc29f0bf 100644
--- a/src/main/Coord.c
+++ b/src/main/Coord.c
@@ -9,6 +9,8 @@
/*#define DEBUG_COORD*/
+static char *rcsid = "$Header$";
+
#include <stdlib.h>
#include <stdio.h>
@@ -29,7 +31,8 @@ struct Coordprops
int direction;
};
-typedef struct COORD_RANGE {
+typedef struct COORD_RANGE
+{
cGH *GH;
@@ -396,9 +399,11 @@ int CCTK_CoordRange(cGH *GH, CCTK_REAL *lower, CCTK_REAL *upper, const char *nam
printf("Returning range (%f,%f) for %s (from %x)\n",*lower,*upper,name,curr);
#endif
- return;
+ return 0;
}
}
+
+ return -1;
}
diff --git a/src/main/DefaultTimers.c b/src/main/DefaultTimers.c
index 40778301..523ccd3b 100644
--- a/src/main/DefaultTimers.c
+++ b/src/main/DefaultTimers.c
@@ -64,7 +64,8 @@ int CCTKi_RegisterDefaultTimerFunctions(void)
CCTKi_RegisterTimersGetrUsage();
#endif
-}
+ return 0;
+}
diff --git a/src/main/ScheduleInterface.c b/src/main/ScheduleInterface.c
index d02d8dc5..4e0ba47a 100644
--- a/src/main/ScheduleInterface.c
+++ b/src/main/ScheduleInterface.c
@@ -757,6 +757,7 @@ static int SchedulePrint(const char *where)
data.GH = NULL;
data.schedpoint = schedpoint_misc;
+ data.whiling = 0;
if(where)
{
diff --git a/src/schedule/ScheduleSorter.c b/src/schedule/ScheduleSorter.c
index a3332742..56dad523 100644
--- a/src/schedule/ScheduleSorter.c
+++ b/src/schedule/ScheduleSorter.c
@@ -191,9 +191,13 @@ void CCTKi_ScheduleDestroyArray(int size, signed char **array)
{
int i;
- for(i=size-1; i >=0; i--)
+ if(array)
{
- free(array[i]);
+ for(i=size-1; i >=0; i--)
+ {
+ free(array[i]);
+ }
+ free(array);
}
}
diff --git a/src/util/File.c b/src/util/File.c
index 67fdfd55..b3adf8a6 100644
--- a/src/util/File.c
+++ b/src/util/File.c
@@ -9,8 +9,8 @@
@enddesc
@@*/
-#include <malloc.h>
#include <stdio.h>
+#include <stdlib.h>
#include "cctk_WarnLevel.h"
#include "cctk_FortranString.h"
@@ -75,10 +75,13 @@ int CCTK_mkdir(char *dir)
retval = system(command);
retval = 0;
- free(command);
-
- } else
+ }
+ else
+ {
retval = -1;
+ }
+
+ free(command);
return retval;