changeset 1917:e646e65ddad0

Get rid of c99 compilation warnings
author bert <bert>
date Tue, 14 Dec 2004 23:37:25 +0000
parents 102de4def7fe
children f6bc7ec3e05d
files testdir/icv.c testdir/icv_dim1.c testdir/icv_fillvalue.c testdir/icv_range.c testdir/minc.c testdir/minc_types.c testdir/mincapi.c testdir/test_mconv.c testdir/test_xfm.c volume_io/Testing/test-xfm.c
diffstat 10 files changed, 14 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/testdir/icv.c
+++ b/testdir/icv.c
@@ -4,7 +4,7 @@
 #define TRUE 1
 #define FALSE 0
 
-main(int argc, char **argv)
+int main(int argc, char **argv)
 {
    int icv, cdfid, img, max, min, dimvar;
    static int dim[MAX_VAR_DIMS];
--- a/testdir/icv_dim1.c
+++ b/testdir/icv_dim1.c
@@ -4,7 +4,7 @@
 #define TRUE 1
 #define FALSE 0
 
-main(int argc, char **argv)
+int main(int argc, char **argv)
 {
    int icv, cdfid, img, max, min, dimvar;
    static int dim[MAX_VAR_DIMS];
--- a/testdir/icv_fillvalue.c
+++ b/testdir/icv_fillvalue.c
@@ -7,7 +7,7 @@
 #define TRUE 1
 #define FALSE 0
 
-main(int argc, char **argv)
+int main(int argc, char **argv)
 {
    int icv, mincid, img, i;
    static int dim[MAX_VAR_DIMS];
--- a/testdir/icv_range.c
+++ b/testdir/icv_range.c
@@ -10,7 +10,7 @@
 #define MAX_MAX 2
 #define MAX_VAL 2
 
-main(int argc, char **argv)
+int main(int argc, char **argv)
 {
    int icv, cdfid, img, max, min;
    static char *typenm[]={"short", "double"};
--- a/testdir/minc.c
+++ b/testdir/minc.c
@@ -14,7 +14,7 @@
 #include <stdio.h>
 #include <minc.h>
 
-main()
+int main()
 {
    int cdf, cdf2;
    int img, img2;
--- a/testdir/minc_types.c
+++ b/testdir/minc_types.c
@@ -30,7 +30,7 @@
            NC_DOUBLE, MI_SIGNED,   "double"};
 int ntypes = sizeof(types)/sizeof(types[0]);
 
-main(int argc, char **argv)
+int main(int argc, char **argv)
 {
    int cdf;
    int img, img2;
--- a/testdir/mincapi.c
+++ b/testdir/mincapi.c
@@ -1,8 +1,13 @@
+#define _GNU_SOURCE 1
+#include "config.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <minc.h>
 #include <limits.h>
 #include <float.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
 
 #define FUNC_ERROR(x) (fprintf(stderr, "On line %d, function %s failed unexpectedly\n", __LINE__, x), ++errors)
 
--- a/testdir/test_mconv.c
+++ b/testdir/test_mconv.c
@@ -4,7 +4,7 @@
 #  define NULL ((void *) 0)
 #endif
 
-main()
+int main()
 {
    char *file = "test.mnc";
    int cdfid;
--- a/testdir/test_xfm.c
+++ b/testdir/test_xfm.c
@@ -1,4 +1,4 @@
-
+#define _GNU_SOURCE 1
 #include <stdio.h>
 #include <stdlib.h>
 
--- a/volume_io/Testing/test-xfm.c
+++ b/volume_io/Testing/test-xfm.c
@@ -1,4 +1,4 @@
-
+#define _GNU_SOURCE 1
 #include <stdio.h>
 #include <stdlib.h>