changeset 2362:977fb33fb36e

Added minor modification for windows compilation
author baghdadi <baghdadi>
date Mon, 15 Jan 2007 21:28:26 +0000
parents 39ac8142d7d2
children 971ac235ee66
files libsrc2/test/grpattr-test.c libsrc2/test/label-test.c
diffstat 2 files changed, 10 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/libsrc2/test/grpattr-test.c
+++ b/libsrc2/test/grpattr-test.c
@@ -24,6 +24,10 @@
     int intarr[TESTARRAYSIZE];
     char valstr[128];
     milisthandle_t hlist, h1list;
+    char pathbuf[256];
+    char namebuf[256];
+    char pathbuf1[256];
+    int count=0;
 
     r = micreate_volume("tst-grpa.mnc", 0, NULL, MI_TYPE_UINT, 
                         MI_CLASS_INT, NULL, &hvol);
@@ -217,9 +221,7 @@
 	TESTRPT("miget_attr_values failed", 0);
     }
 
-    char pathbuf[256];
-    char namebuf[256];
-    int count=0;
+    
     r = milist_start(hvol, "/", 1, &hlist);
     if (r == MI_NOERROR) {
       count++;
@@ -232,8 +234,6 @@
     
     printf("***************** \n");
     
-    char pathbuf1[256];
-    
     r = milist_start(hvol, "/", 1, &h1list);
     if (r == MI_NOERROR) {
       while( milist_grp_next(h1list, pathbuf1, sizeof(pathbuf1)) == MI_NOERROR) {
--- a/libsrc2/test/label-test.c
+++ b/libsrc2/test/label-test.c
@@ -23,6 +23,7 @@
   midimhandle_t hdim[3];
   unsigned long coords[3];
   int i,j,k;
+  int counter=0;
 
   result = micreate_dimension("xspace", MI_DIMCLASS_SPATIAL, 
 			      MI_DIMATTR_REGULARLY_SAMPLED, 10, &hdim[0]);
@@ -103,7 +104,7 @@
 
   micreate_volume_image(hvol);
 
-  int counter=0;
+  
   for (i=0; i < CX; i++) {
     for (j=0; j < CY ; j++) {
       for (k=0; k < CZ ; k++) {
@@ -154,6 +155,8 @@
   unsigned long coords[NDIMS];
   unsigned long count[NDIMS];
   int value;
+  int counter = 0;
+  int id;
   int *buf = (int *)malloc(CX * CY * CZ * sizeof(int));
   printf("Creating label image !! \n");
   error_cnt += create_label_image();
@@ -167,8 +170,7 @@
   coords[0] = coords[1] = coords[2] = 0;
   count[0] = CX; count[1] = CY; count[2] = CZ;
   error_cnt += miget_voxel_value_hyperslab(vol,MI_TYPE_INT, coords, count,buf); 
-  int counter = 0;
-  int id;
+  
   printf("Print label file with file order x,y,z \n");
   for (i=0; i < CX; i++) {
     for (j=0; j < CY; j++) {